Your Personal AI-Powered Health Companion
MedTrack is a full-stack web application designed to simplify the understanding of medical lab reports. By leveraging advanced AI (Google Gemini), MedTrack analyzes complex medical data from PDF or image uploads and translates it into clear, actionable insights for both patients and clinicians.
- Instant Interpretation: Upload any lab report (PDF/Image) and get results in seconds.
- Dual Perspectives:
- Patient Summary: Simple, jargon-free explanation of health status.
- Clinician Summary: Technical insights for medical professionals.
- Context Awareness: AI considers user age and sex for accurate reference range analysis.
- Automated Digitization: Converts static report images/PDFs into structured digital data.
- Flagging System: Automatically highlights values that are High, Low, or Critical.
- Trend Tracking: Visualizes historical data for specific biomarkers (e.g., Hemoglobin trends over 6 months).
- Secure Authentication: Robust JWT-based signup and login system.
- Data Encryption: Passwords hashed with Bcrypt; secure environment variable management.
- Private Records: Users can only access their own uploaded reports.
- Responsive Design: Fully optimized for desktops, tablets, and mobile devices.
- Interactive Dashboard: Clean interface with drag-and-drop file upload.
- Profile Management: Easy updates for personal details and password management.
- Framework: Next.js 15 (App Router)
- Styling: Tailwind CSS 4
- Icons: Lucide React
- Visualization: Chart.js & React-Chartjs-2
- HTTP Client: Axios
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB Atlas (Mongoose ODM)
- AI Model: Google Gemini 1.5 Flash
- Email Service: Nodemailer (Gmail SMTP)
Follow these steps to run MedTrack locally.
- Node.js (v18 or higher)
- MongoDB Atlas Account (or local MongoDB)
- Google Cloud API Key (for Gemini)
git clone https://github.com/ayush2635/MedTrack.git
cd medtrackNavigate to the server directory and install dependencies:
cd server
npm installCreate a .env file in the server folder with the following credentials:
PORT=5000
MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/?appName=medtrack
JWT_SECRET=your_super_secure_random_secret_key
GEMINI_API_KEY=your_google_gemini_api_key
EMAIL_SERVICE=gmail
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_app_specific_passwordStart the backend server:
npm start
# Server will run on http://localhost:5000Open a new terminal, navigate to the client directory, and install dependencies:
cd client
npm installCreate a .env.local file in the client folder:
NEXT_PUBLIC_API_URL=http://localhost:5000Start the frontend development server:
npm run dev
# Client will run on http://localhost:3000- POST
/api/auth/signup: Register a new user. - POST
/api/auth/login: Authenticate user and return JWT. - POST
/api/auth/forgotpassword: Send password reset email. - PUT
/api/auth/resetpassword/:token: Reset password using token.
- POST
/api/interpret: Upload file for AI analysis (Multipart/Form-Data). - POST
/api/records: Save a new analyzed record. - GET
/api/records: Fetch all user records. - GET
/api/records/:id: Fetch a specific record. - DELETE
/api/records/:id: Delete a record.
- GET
/api/history/:testName: Get historical trend data for a specific test.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.