← cd ../projects case study

Prescripto

A full-stack, multi-portal hospital prescription management system — three independent Next.js portals for Patients, Doctors, and Admins, all running on a single shared REST API.

role

Solo Full Stack Developer

status

Live · 3 portals on Vercel

stack

Next.js · Express · MongoDB

Overview

Prescripto is a healthcare platform that runs an entire 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 whole system — every role working off the same backend, but never seeing more than it should.

The challenge

A hospital workflow has three very different kinds of users with very different needs and permission levels. Cramming them into one interface is confusing and insecure; building three disconnected apps means three sources of truth. The platform needed three tailored experiences that still shared one consistent, authoritative data layer.

Architecture

I architected the platform as three independent Next.js frontends — Patient, Doctor, and Admin — backed by a single shared Express REST API with MongoDB as the database. Each frontend deploys separately on Vercel; the API runs on Render. Cross-origin requests between the portals and the API are handled with explicit CORS configuration and environment-scoped settings.

architecture — prescripto
$ ./describe --stack

  ┌─────────────┐   ┌─────────────┐   ┌─────────────┐
  │  Patient    │   │  Doctor     │   │  Admin      │
  │  (Next.js)  │   │  (Next.js)  │   │  (Next.js)  │
  └──────┬──────┘   └──────┬──────┘   └──────┬──────┘
         │                 │                 │
         └────────┬────────┴────────┬────────┘
                  ▼   REST / JSON   ▼
          ┌───────────────────────────┐
          │  Express API · JWT · RBAC │   (Render)
          └─────────────┬─────────────┘
                        ▼
              ┌─────────────────────┐
              │  MongoDB + Mongoose │
              └─────────────────────┘

Three portals, one system

Each portal is a focused product in its own right — but they all read and write through the same API, so the data never forks.

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. This keeps appointment booking, prescription issuance, and hospital administration cleanly separated across all three portals.

Data modelling

Hospital records — patients, doctors, prescriptions, and appointments — are modelled in MongoDB through Mongoose schemas. Mongoose gives each collection a clear, validated shape while keeping records flexible enough to evolve, 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.

Key features

  • Three independent Next.js frontends on one shared API
  • Role-based access control (RBAC) across every portal
  • Appointment booking and scheduling workflow
  • Digital prescription issuance from doctor to patient
  • Hospital-wide administration and record management
  • JWT authentication with bcrypt-hashed credentials

Tech stack

frontend

Next.js 14React 18Tailwind CSS 3.4PostCSSAutoprefixernext-themesAxiosreact-iconsSharpESLintVercel

backend

Node.js 22Express 4MongoDBMongoose 6JWTbcryptexpress-validatorHelmetexpress-rate-limitCORSdotenvNodemonmongodb-memory-serverRender

Outcome

Prescripto delivered a complete hospital prescription workflow as a single coherent system — built solo, end-to-end. The multi-portal architecture proved that role-specific frontends and a shared, secured API can scale together without the data ever drifting apart.