Skip to content

Code-AkarshMishra/MedRx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MedRx - Medical Report Analyzer

MedRx is a full-stack MVP that lets users upload medical reports (JPG/PNG/PDF), extract report text via OCR, detect key health parameters, and generate simple explanations in English or Hinglish.

Tech Stack

  • Frontend: React + Vite + Tailwind CSS
  • Backend: Express + Next.js (custom server integration)
  • Database: MongoDB (Mongoose)
  • Auth: JWT + bcrypt
  • OCR/PDF Parsing: Tesseract.js + pdf-parse

Folder Structure

PROJECT FOR SEM 6/
├── frontend/
│   ├── src/
│   │   ├── components/
│   │   ├── pages/
│   │   ├── services/
│   │   └── utils/
│   └── ...
└── backend/
    ├── next-client/pages/index.js
    ├── src/
    │   ├── config/
    │   ├── controllers/
    │   ├── middleware/
    │   ├── models/
    │   ├── routes/
    │   └── services/
    ├── server.js
    └── .env.example

Step-by-Step Setup

1) Backend Setup

cd backend
cp .env.example .env

Update .env values:

  • MONGO_URI (your MongoDB connection string)
  • JWT_SECRET (any strong random secret)

Run backend:

npm install
npm run dev

Backend runs at http://localhost:5000.

2) Frontend Setup

cd frontend
npm install
npm run dev

Frontend runs at http://localhost:5173.

App Flow

  1. Splash page auto-redirects after 1.5 seconds.
  2. Home page has "Start Now".
  3. Portal has split layout:
    • Left: Login/Signup (MongoDB + JWT)
    • Right: Upload report (works with or without login)
  4. File is analyzed:
    • OCR text extraction
    • Medical value detection (Hemoglobin, Blood Sugar, Cholesterol)
    • Normal/Low/High comparison
    • Natural language explanation
  5. Results page shows extracted text, parameter cards, and explanation with language toggle.

API Endpoints

  • POST /api/auth/signup
  • POST /api/auth/login
  • POST /api/analyze (multipart file field: report)
  • GET /api/history (optional logged-in history)
  • GET /api/health

Notes for Production

  • Replace local storage token strategy with HTTP-only cookies.
  • Add request validation (e.g., Zod/Joi).
  • Integrate queue/worker for OCR at scale.
  • Use object storage (S3/GCS) instead of local temp uploads.

About

MedRx is an AI-driven platform that simplifies medical reports and prescriptions into patient-friendly explanations. By analysing diagnostic data, it identifies key health indicators, explains medical terminology in plain language, and provides insights that help patients understand their condition and make informed health decisions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors