π₯ 2nd Place β Udhbhav 2k26 π
π₯ 2nd Place β Udhbhav 2k26
| Name | GitHub |
|---|---|
| Aharon Kosetti | @aharon-kumar-kosetti |
| Bhanu Prakash Yirri | @bhanuprakashyirri |
| Mohith Kumar Baggu | @mohithkumar64 |
| Abishai Jogi | @abishai-jogi |
| Saketh | @reddyvenkatasaketh |
| Ram Sai | @ramsaik3339-cloud |
Every year, patients repeat tests, face delayed diagnoses, and receive unsafe care β all because their records are scattered across different hospitals and providers.
Healthcare data is fragmented, inaccessible, and out of the patient's hands. In emergencies, this costs lives.
MediVault fixes this.
MediVault is a secure, role-based medical records platform that puts patients in full control of their health data. Patients own their records. Doctors request access. Hospitals stay accountable. AI makes it all understandable.
- π Patient-owned encrypted records
- β Explicit, auditable consent flows
- π¨ Emergency break-glass access with guardrails
- π€ AI-powered report summaries
| Feature | Description |
|---|---|
| π§ββοΈ Role-Based Dashboards | Separate, purpose-built flows for Patients, Doctors, and Hospitals |
| ποΈ Secure Document Vault | Encrypted upload/download with strict role-based authorization |
| π€ Consent & Access Governance | Request, approve, reject, grant, revoke β full lifecycle control |
| π¨ Emergency Access Workflow | 24-hour break-glass access with full audit trail |
| π€ AI Medical Summarization | GPT-4o powered structured summaries of uploaded medical records |
- βοΈ React 19 + React Router 7
- β‘ Vite 7
- π¨ Custom CSS (landing, auth, dashboards)
- π’ Node.js + Express 5
- π Custom HMAC-signed bearer token auth (role-aware)
- π‘οΈ Rate limiting, CORS controls, bcrypt password hashing
- π PostgreSQL + Drizzle ORM
- βοΈ Appwrite Storage (document files)
- π€ OpenRouter β GPT-4o (medical document summarization)
- ESLint 9 Β· Concurrently Β· dotenv
- Node.js (LTS)
- npm
- PostgreSQL database
- Appwrite project + bucket
- OpenRouter API key (for AI summaries)
# 1. Clone the repo
git clone https://github.com/aharon-kumar-kosetti/medivault-react.git
cd medivault-react
# 2. Install dependencies
npm installCreate a single .env file in the project root (you can copy from .env.example).
# Frontend (Vite)
# Keep empty to use relative paths (recommended for Vercel rewrites).
VITE_API_BASE_URL=
VITE_ENABLE_MOCK_AUTH=false
# Backend (Node/Express)
DATABASE_URL=your_postgres_url
SESSION_SECRET=your_secret_key
API_PORT=3001
API_HOST=0.0.0.0
ALLOWED_ORIGINS=http://localhost:5173
NODE_ENV=development
# Appwrite
APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
APPWRITE_PROJECT_ID=your_project_id
APPWRITE_API_KEY=your_appwrite_key
APPWRITE_BUCKET_ID=medivault-documents
# AI
GEMINI_API_KEY=your_openrouter_key# Generate and run migrations
npx drizzle-kit generate
npx drizzle-kit migrate# Full stack (recommended)
npm run dev:all
# Frontend only
npm run dev
# Backend only
npm run dev:api
# Production build
npm run build
npm run preview- Push your repo to GitHub.
- Import the project in Vercel.
- Build settings are auto-read from
vercel.json:
- Build command:
npm run build - Output directory:
dist
- Add environment variables in Vercel Project Settings β Environment Variables:
DATABASE_URLSESSION_SECRETAPPWRITE_ENDPOINTAPPWRITE_PROJECT_IDAPPWRITE_API_KEYAPPWRITE_BUCKET_IDGEMINI_API_KEY- Optional:
ALLOWED_ORIGINS
- Redeploy.
Operational notes:
/api/*,/auth/*, and/healthare rewritten to the Express serverless function inapi/server.js.- The catch-all rewrite sends other routes to
index.html, so React Router works on refresh/deep links. - Leave
VITE_API_BASE_URLempty in production to use relative URLs through Vercel rewrites.
See full architecture diagram:
public/docs/MediVault-Architecture.pdf
βββββββββββββββββββββββββββββββββββββββββββββββ
β React Frontend β
β Patient Β· Doctor Β· Hospital Dashboards β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β HMAC Bearer Token Auth
ββββββββββββββββββββΌβββββββββββββββββββββββββββ
β Express API (Node.js) β
β Auth Β· Records Β· Consent Β· Emergency Β· AI β
ββββββββ¬ββββββββββββ¬βββββββββββββββ¬ββββββββββββ
β β β
ββββββΌβββββ ββββββΌββββββ βββββββΌβββββββ
βPostgreSQLβ β Appwrite β β GPT-4o AI β
β (Data) β β(Documentsβ β (Summaries)β
βββββββββββ ββββββββββββ ββββββββββββββ
- Object storage migration β Backfill blob payloads from DB to object storage at scale
- Token revocation table β
revoked_tokensfor immediate session invalidation - Legacy path cleanup β Retire compatibility branches post-migration
- Mobile app β React Native patient portal
- HL7 FHIR integration β Interoperability with hospital systems
MediVault β Encrypted. Consent-driven. AI-augmented. Patient-first.
β Star this repo if you found it useful!