AI-powered clinical intelligence platform connecting doctors, patients, and administrators.
- 🧠 AI clinical assistant with Gemini integration and local fallback
- 🚨 Real-time clinical alerts over Server-Sent Events
- 🔐 JWT authentication with role-scoped access
- 👨⚕️ Doctor dashboard for risk, cohorts, appointments, alerts, and patient context
- 🧑💼 Patient dashboard with health timeline, AI help, and appointment booking
- ⚙️ Admin dashboard with analytics and privileged user role management
- 📊 Recharts visualizations for risk and utilisation
- 🎙️ Voice input through the Web Speech API
- 🧬 Animated risk gauges, skeleton loaders, toast notifications, and responsive glass UI
Browser
↓
React + Vite frontend
↓
Node.js + Express API
↓
MongoDB Atlas + Gemini AI + MCP tools
- Node.js 18+
- MongoDB Atlas connection string
- Gemini API key
git clone <your-repo-url>
cd MediMindAI
npm run install:all
cp backend/.env.example backend/.env
cp web/.env.example web/.env
npm run seed
npm run devFrontend: http://localhost:5173
Backend: http://localhost:8080
| Variable | Description | Where to get it | Required |
|---|---|---|---|
PORT |
Backend port | Local choice | Yes |
MONGODB_URI |
MongoDB Atlas connection string | MongoDB Atlas | Yes for persistent data |
MONGODB_DB |
Database name | Local choice | No |
JWT_SECRET |
JWT signing secret, 32+ chars | Generate locally | Yes |
GEMINI_API_KEY |
Gemini API key | Google AI Studio | No, fallback works |
GEMINI_MODEL |
Gemini model name | Google AI Studio | No |
AGENT_DAILY_LIMIT |
Daily AI message limit per user | Local choice | No |
VITE_API_URL |
Frontend API base URL | Local backend URL | Yes |
Run npm run seed first.
| Role | Password | |
|---|---|---|
| Doctor | doctor@medimind.ai |
MediMind2026! |
| Doctor | nwosu@medimind.ai |
MediMind2026! |
| Doctor | adeyemi@medimind.ai |
MediMind2026! |
| Patient | patient@medimind.ai |
MediMind2026! |
| Admin | admin@medimind.ai |
MediMind2026! |
Admin access is intentionally privileged. A fresh install gets admin access only from the seeded admin@medimind.ai account or from an existing admin promoting another user.
Doctors and patients can self-register. Public signup never offers or accepts the admin role. Passwords are hashed with bcrypt, sessions use JWTs, and all clinical routes derive access from the signed token rather than trusting client-provided roles.
Patients see only their linked record and appointments. Doctors see assigned patients and appointments. Admins see the full operational dataset and can promote or demote users from the Admin Dashboard.
MediMind AI can summarize risk, explain patient context, search cohorts, identify high-risk patients, answer operational questions, and respond to general non-medical prompts. Gemini powers live model responses when configured; if quota or network access is unavailable, the backend returns deterministic clinical demo responses using the same patient, cohort, alert, and MCP tool context. AGENT_DAILY_LIMIT controls per-user daily usage.
MediMindAI/
backend/ Express API, auth, seed, clinical data, MCP tools
web/ React Vite frontend
backend/routes/ Auth, admin, alerts, agent, clinical routes
backend/middleware/ JWT and role guards
web/src/components/ Shared dashboard widgets
web/src/pages/ Login, doctor, patient, admin dashboards
web/src/api/ Axios API client
web/src/store/ Auth localStorage helpers
| Method | Endpoint | Access |
|---|---|---|
POST |
/api/auth/register |
Public doctor/patient only |
POST |
/api/auth/login |
Public |
GET |
/api/auth/me |
Authenticated |
GET |
/api/patients |
Authenticated, role-scoped |
GET |
/api/patients/me |
Patient |
GET |
/api/records/me |
Patient |
GET |
/api/doctors |
Authenticated |
GET |
/api/appointments |
Authenticated, role-scoped |
POST |
/api/appointments/book |
Patient |
GET |
/api/alerts |
Authenticated, role-scoped |
GET |
/api/alerts/stream?token=JWT |
Authenticated SSE |
GET |
/api/cohorts |
Authenticated, role-scoped |
GET |
/api/search |
Authenticated, role-scoped |
POST |
/api/agent |
Authenticated |
GET |
/api/admin/users |
Admin |
PATCH |
/api/admin/users/:id/role |
Admin |
Fork the repository, create a feature branch, run npm run check and cd web && npm run lint && npm run build, then open a pull request with a clear description.
MIT
Built for Google Cloud Rapid Agent Hackathon 2026.