MediFlow AI
Under the Hood

Technology

MediFlow AI is built on a modern, secure, scalable stack — real components chosen for reliability, not a marketing slide. Here is exactly what runs underneath the platform.

Backend

  • FastAPI (Python) — the REST API that powers every workflow
  • SQLAlchemy ORM for typed, maintainable data access
  • PostgreSQL as the system of record, Supabase-hosted
  • Interactive Swagger/OpenAPI docs generated automatically at /docs

Authentication & Access Control

  • JWT-based authentication (PyJWT) with token expiry
  • Password hashing with bcrypt — passwords are never stored in plain text
  • Role-based access control across admin, doctor, pharmacist, and patient roles
  • Every protected endpoint requires a valid Bearer token

AI & Clinical Intelligence

  • Groq-hosted large language model (llama-3.3-70b-versatile)
  • Used for AI-assisted clinical assessment and patient counselling generation
  • Structured JSON responses with explicit confidence scores
  • Every AI output is labeled as decision support, not a diagnosis, and requires clinician review

Frontend

  • React 19 for the UI layer
  • TanStack Start & TanStack Router for file-based routing and SSR
  • TanStack Query for data fetching and caching
  • Tailwind CSS v4 for styling

Data & Documents

  • Relational schema covering patients, vitals, symptoms, assessments, prescriptions, and audit logs
  • Server-generated prescription PDFs via ReportLab
  • Structured audit log table capturing who, what, when, before-state, and after-state

Security by Design

  • Encrypted connections to the PostgreSQL database
  • Least-privilege access enforced at the API layer per role
  • Full audit trail for every create, update, and review action
  • Secrets and API keys managed via environment configuration, never hard-coded

Curious about the exact API surface? See the API Reference for every endpoint, or run the backend locally and browse the interactive Swagger docs at /docs.