Prescripto
Three role-based portals (patient, doctor, admin) on one shared API.
- Personal project
- Solo Full Stack Developer
- Personal
Client and context
Prescripto runs a hospital's prescription workflow through three role-specific portals: patients book appointments and receive prescriptions, doctors manage their queues and issue prescriptions, and admins oversee the system.
Problem
A hospital has three very different kinds of users with different permission levels. One shared interface is confusing and insecure; three disconnected apps mean three sources of truth.
What I built
- Three independent Next.js frontends (Patient, Doctor, Admin) on Vercel, backed by one shared Express REST API on Render.
- Role-based access control enforced at the API layer, with JWT auth and bcrypt-hashed credentials.
- Appointment booking, digital prescription issuance and hospital-wide administration.
- Patients, doctors, prescriptions and appointments modelled in MongoDB through Mongoose, linked by reference.
Results
- All three portals are live, and every role reads and writes through the same API, so the data never forks.
How it works
Architecture
Three independent Next.js frontends (Patient, Doctor and Admin) sit on one shared Express REST API, with MongoDB as the database. Each frontend deploys separately on Vercel; the API runs on Render. Requests between the portals and the API use explicit CORS configuration and environment-scoped settings.
Role-based access control
RBAC is enforced at the API layer, not just hidden in the UI. Authentication runs on JWT, and every request is scoped to its role: a patient can never reach an admin endpoint, and a doctor can only issue prescriptions for their own appointments.
Data modelling
Patients, doctors, prescriptions and appointments are modelled in MongoDB through Mongoose schemas. Each collection has a clear, validated shape, and the relationships between them (a prescription belongs to a doctor, an appointment to a patient) are linked by reference, so the data stays consistent across every portal.
Stack
- Next.js
- React
- Express
- MongoDB
- Mongoose
- JWT