Welcome to MedMitra
MedMitra is an AI-powered medical case management system that helps healthcare professionals analyze patient data, process medical documents, and generate comprehensive clinical insights. This quickstart guide will get you from zero to your first working case in minutes.What You’ll Build
By the end of this guide, you’ll have:- A running MedMitra backend and frontend
- A configured Supabase database
- Your first medical case with AI-powered analysis
Prerequisites
Before you begin, ensure you have:Node.js
Version 18.x or 20.x LTS
Python
Version 3.9 or higher
Supabase Account
Free account at supabase.com
API Keys
Groq, LlamaParse, and Gladia
Quick Setup
Set Up the Backend
Navigate to the backend directory and install dependencies:Create a
.env file in the backend/ directory:backend/.env
Set Up the Frontend
In a new terminal, navigate to the frontend directory:Create a
.env.local file in the frontend/ directory:frontend/.env.local
Configure Supabase Database
Create the following tables in your Supabase project:Cases Table:Case Files Table:AI Insights Table:
Start the Servers
Backend: In the backend directory with the virtual environment activated:The backend API will be available at The frontend will be available at
http://localhost:8000Frontend: In a new terminal, from the frontend directory:http://localhost:3000Create Your First Case
- Open your browser and navigate to
http://localhost:3000 - Sign up or log in using the Supabase authentication
- Click “New Case” to create your first patient case
- Fill in patient information:
- Patient Name
- Age
- Gender
- Initial case notes
- Upload medical documents:
- Lab reports (PDF format)
- Radiology images (JPG, PNG)
- Click “Create Case” and watch the AI analyze the documents
Verify Your Setup
Once both servers are running, verify your setup:Backend Health Check
Backend Health Check
Visit
http://localhost:8000 in your browser. You should see:API Documentation
API Documentation
FastAPI provides automatic interactive documentation:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
Frontend Status
Frontend Status
Visit
http://localhost:3000. You should see the MedMitra login page with:- Supabase authentication form
- Modern, responsive UI
- Dark/light mode toggle
What Happens During AI Analysis?
When you create a case with documents, MedMitra’s AI workflow:- Parses PDF Lab Reports using LlamaParse to extract structured data
- Analyzes Radiology Images using Groq’s Vision AI (LLaVA model)
- Generates Case Summary by synthesizing all medical information
- Creates SOAP Note with Subjective, Objective, Assessment, and Plan sections
- Suggests Primary Diagnosis with ICD-10 codes and confidence scores
The AI analysis typically takes 30-60 seconds depending on the number and size of documents uploaded.
Next Steps
Full Installation Guide
Detailed setup instructions for production environments
Configuration Reference
Complete guide to all environment variables and settings
API Reference
Explore all available API endpoints
AI Workflow
Learn about MedMitra’s AI-powered workflow
Troubleshooting
Backend Won't Start
Backend Won't Start
- Verify Python version:
python3 --version(should be 3.9+) - Check if port 8000 is available:
lsof -i :8000 - Ensure all environment variables are set in
.env - Verify virtual environment is activated
Frontend Build Errors
Frontend Build Errors
- Verify Node.js version:
node --version(should be 18.x or 20.x) - Clear node_modules and reinstall:
rm -rf node_modules package-lock.json && npm install - Check if
.env.localfile exists and has correct values
Supabase Connection Issues
Supabase Connection Issues
- Verify Supabase URL format:
https://your-project.supabase.co - Check that API keys are copied correctly (no extra spaces)
- Ensure database tables are created with the exact schema
- Verify RLS (Row Level Security) policies if authentication fails
AI Analysis Not Working
AI Analysis Not Working
- Verify Groq API key is valid and has available credits
- Check LlamaParse API key is active
- Review backend logs for error messages: check terminal output
- Ensure uploaded files are in supported formats (PDF for labs, JPG/PNG for radiology)
Getting Help
If you encounter issues:- Check the Installation Guide for detailed setup steps
- Review Configuration for environment variable reference
- Visit the GitHub repository for issue tracking and discussions
- Check API logs in the terminal for detailed error messages
