🔗 Live Demo → medverify-nws7.onrender.com
🏆 Ideathon 2nd Prize Winner — AI-powered medical certificate fraud detection
- 🔐 JWT Authentication — Multi-user login with Admin, Faculty, and Doctor roles
- 📄 OCR + AI Extraction — Extracts doctor, hospital, patient, diagnosis, dates from any certificate image
- ✅ 12-Point Rule Validation — Doctor registration, date logic, hospital legitimacy, phone format, and more
- 🤖 Gemini AI Deep Analysis — Detects template design, grammatical errors, role conflicts, fake signatures
- 📊 Authenticity Score — 0–100 score with HIGH / MEDIUM / LOW risk classification
- 📋 Audit Log — Full history of all analyses with user attribution
- 📤 Export Reports — Download full JSON analysis report
git clone https://github.com/yourusername/medverify.git
cd medverify
npm run install:allcd backend
cp .env.example .env
# Add your GEMINI_API_KEY to .envGet a free Gemini API key at: https://aistudio.google.com/app/apikey
# Terminal 1 — Backend
cd backend && npm run dev
# Terminal 2 — Frontend
cd frontend && npm start| Username | Password | Role |
|---|---|---|
| admin | admin123 | Administrator |
| prof.sharma | sharma123 | Faculty |
| dr.mehta | mehta123 | Doctor |
- Upload — Drag & drop a medical certificate (JPG, PNG, PDF)
- OCR — Gemini AI reads and extracts all fields from the document
- Rule Check — 12 deterministic rules validate the certificate
- AI Analysis — Gemini analyzes for fraud indicators (templates, grammatical errors, role conflicts)
- Score — Get an authenticity score with detailed findings
| Layer | Technology |
|---|---|
| Frontend | React 18, React Router, react-dropzone |
| Backend | Node.js, Express, Multer |
| AI | Google Gemini 1.5 Flash (free tier) |
| Auth | JWT + bcrypt |
| Styling | Custom CSS (dark theme) |
medverify/
├── frontend/ # React app
│ └── src/
│ ├── pages/ # Login, Dashboard, Result, Audit
│ └── components/ # Layout/Navbar
├── backend/ # Express API
│ └── src/
│ └── server.js
rule.js
# All API routes + Gemini integration
├── render.yaml # Render deployment config
└── railway.toml # Railway deployment config
- Push your repo to GitHub
- Go to render.com → New Web Service
- Connect your GitHub repo
- Render auto-detects
render.yaml - Add
GEMINI_API_KEYin Environment Variables - Deploy!
- Push your repo to GitHub
- Go to railway.app → New Project
- Select Deploy from GitHub repo
- Add
GEMINI_API_KEYas an environment variable - Done!
MedVerify is primarily optimized for desktop browsers. The dashboard, result cards, and audit log are best experienced on a screen ≥ 768px wide. Key pages (Dashboard, Result) include basic responsive breakpoints at 640px so they reflow to a single-column layout on narrower viewports — meaning it is usable on mobile but not pixel-perfect. For the best experience, use a laptop or desktop browser.
If no GEMINI_API_KEY is set, the app runs in demo mode — returning mock analysis results so you can explore the full UI without an API key.
Made with ❤️ for Ideathon • MedVerify v2.0