Production-ready AI-powered healthcare dashboard built for Render and PostgreSQL.
backend/: Node.js + Express APIfrontend/: React + Vite dashboard- PostgreSQL with raw SQL migrations and seed data
- JWT auth with RBAC for
doctor,nurse, andadmin
- Create a root
.envfrom.env.example. - Start PostgreSQL with
docker compose up -d postgres. - In
backend/, runnpm install,npm run migrate,npm run seed, thennpm start. - In
frontend/, runnpm installandnpm run dev.
The backend listens on http://localhost:10000 and the frontend runs on http://localhost:5173.
Render services are defined in render.yaml:
medflow-backend: Node web servicemedflow-frontend: Static sitemedflow-postgres: Render PostgreSQL database
Required backend environment variables:
DATABASE_URLJWT_SECRETOPENAI_API_KEYoptional
Required frontend environment variable:
VITE_API_URL
npm run migrate: apply SQL migrationsnpm run reset-db: drop and recreate schema, then reapply migrationsnpm run seed: create demo staff, 60 realistic patients, appointments, records, prescriptions, treatments, logs, and alerts
- Rule-based AI patient summaries in
backend/src/services/aiSummary.js - DB-driven alerts for no-show risk and high cardiovascular risk
- SQL analytics for doctor load, missed appointments, and consultation time
- Heuristic missed-appointment prediction model for patient detail views
The application now supports full CRUD (Create, Read, Update, Delete) operations for:
- Create: Add new patients with full medical history via the Patient List page
- Read: View patient list with search, and detailed patient profiles
- Update: Edit patient information (name, contact, condition, care status, etc.)
- Delete: Remove patients from the system (with confirmation)
- Create: Schedule new appointments for patients
- Read: View all appointments for a patient on the Patient Detail page
- Update: Mark appointments as attended/missed, or modify appointment details
- Delete: Cancel or remove appointments
- List: View all available doctors for selection when creating/managing patients and appointments
- Search and filter patients
- Quick action buttons to view, edit, or delete patients
- Add new patient form
- Inline edit form for updating patient details
- View complete patient profile with AI-generated risk summary
- Manage appointments with ability to create, update status, and delete
- View medical records, treatments, prescriptions, and alerts
- Monitor no-show prediction probability