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.
- 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
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
cd backend
cp .env.example .envUpdate .env values:
MONGO_URI(your MongoDB connection string)JWT_SECRET(any strong random secret)
Run backend:
npm install
npm run devBackend runs at http://localhost:5000.
cd frontend
npm install
npm run devFrontend runs at http://localhost:5173.
- Splash page auto-redirects after 1.5 seconds.
- Home page has "Start Now".
- Portal has split layout:
- Left: Login/Signup (MongoDB + JWT)
- Right: Upload report (works with or without login)
- File is analyzed:
- OCR text extraction
- Medical value detection (Hemoglobin, Blood Sugar, Cholesterol)
- Normal/Low/High comparison
- Natural language explanation
- Results page shows extracted text, parameter cards, and explanation with language toggle.
POST /api/auth/signupPOST /api/auth/loginPOST /api/analyze(multipart file field:report)GET /api/history(optional logged-in history)GET /api/health
- 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.