ZiaShips
Ongoing·Client project·Mar 2025 – Present·Chief Technology Officer

Dr Smart

A preventive healthcare platform for Pakistan: EMR, patient app and admin portal on one multi-org backend, serving 50 locations.

NestJSPostgreSQLReactReact NativeAWSFirebase
Dr Smart platform
My role
Chief Technology Officer
Duration
Mar 2025 – Present
Platforms
iOS · Android · Web
Status
Live and maintained
Impact · measured in the field
0health encounters conducted through the platform
0locations served across Pakistan
0new diabetes and hypertension diagnoses identified
0individuals identified with unhealthy weights
0nutrition consultations delivered
0health education seminars
0podcasts produced

Figures reported by the client

01 · The problem

Preventive care fails when no one owns the record

Preventive healthcare in Pakistan is largely inaccessible. People have no practical way to monitor chronic conditions like diabetes and hypertension, or to reach a specialist without travelling to a clinic.

The deeper problem sits underneath that one. Clinics, labs and pharmacies each keep their own records, and none of them follow the patient. A blood test at one provider is invisible to the doctor at the next. Every visit starts from nothing, which is exactly the condition under which preventive medicine stops working: you cannot spot a trend in a patient you are meeting for the first time, every time.

So the brief wasn't an app. It was a record that outlives the appointment, and a way for three different kinds of organisation to write to it without being able to read each other's business.

02 · The architecture

One record, three kinds of organisation

System architecture
1The core

One API over one schema

A single NestJS service owns every write. Clinics, labs and pharmacies are organisations inside it, not separate deployments, so a lab result lands in the same patient record a doctor reads from, with no sync job in between.

2The clients

Two front ends, one contract

The React admin portal and the React Native patient app were built against the same API contract. Vitals, lab reports, episodes, allergies and medicines behave identically in both, because there is only one place they can come from.

3The delivery

Shipped, then kept shipping

CodeBuild and CodeDeploy push the API to AWS on merge; Firebase carries messaging and push. The portal went live in March 2025 and the mobile app followed in January 2026, against a schema that had to stay stable for both.

03 · The product

What it actually does

The Dr Smart health record timeline
Dr Smart doctor session scheduling
Dr Smart permission and sharing controls
Dr Smart goals and engagement screens
The Dr Smart admin portal
04 · Decisions

What I chose, and what it cost

BackendNestJS, TypeScript end to end

A health record has a large, highly relational domain model. Structure and strong typing keep that model honest as it grows, and make onboarding a matter of reading types.

Trade-offMore boilerplate and slower first-week velocity than a thinner framework. Worth it by month three.
DataPostgreSQL, single schema

Health records are relational and query-heavy: episodes join to vitals join to labs join to prescriptions. Multi-org isolation is enforced in the schema rather than by running separate databases.

Trade-offMigrations get heavier as the record model evolves, and tenancy bugs become data-integrity bugs. Both worth it for one queryable truth.
MobileReact Native with Expo

One codebase across iOS and Android, sharing types with the API. Two native codebases would have meant shipping one platform and promising the other.

Trade-offNative module ceilings, and store submissions still need platform-specific attention.
PortalReact on an established component system

The admin portal's value is in the data model, not in bespoke interface design. An off-the-shelf component library bought months of build time.

Trade-offA heavier bundle and a portal that looks like other portals. Acceptable for internal staff tooling.
DeliveryAWS CodeBuild and CodeDeploy

Automated pipeline from merge to deploy, so releases are routine rather than events.

Trade-offTied to AWS tooling. Fine while the platform is AWS-hosted; a migration cost if that changes.
05 · Tenancy and consent

Health data with three organisations reading it

Clinics, labs and pharmacies share one backend and must never share each other’s business. I read Information Security at NUST, so isolation and consent were schema decisions taken in the first migration rather than a hardening pass bolted on before launch.

  • Organisation is a first-class entity: every readable row is scoped to one, and the scope is enforced at the query layer, not in the controller.
  • Consent is data, not configuration: a patient grants an organisation access to a defined slice of their record, and revoking it is a write, not a support ticket.
  • Least privilege by role: a lab technician, a clinician and an org admin see three different records from the same query.
  • Auditability: who read what, and when, because in health data the read is as sensitive as the write.
06 · Delivery

Ten months from API to app store

Mar 2025

API and admin portal live

The NestJS service and React portal shipped first, so clinics could work before there was an app to hand to patients.

Jan 2026

DrSmartGo on both stores

The React Native app launched on iOS and Android against a schema already stable in production for ten months.

Present

Maintained and extended

Both platforms are actively developed. Fifty locations are live and the record model keeps growing.

07 · In hindsight

Shipping the portal ten months before the app is the decision I'd defend hardest. It meant the schema was proven by real clinic use before a single patient installed anything.

What I'd change: I'd model consent before modelling the record, not alongside it. Retrofitting permission boundaries onto a schema that already held data cost more than designing them first would have, and it's the advice I now give every team building anything multi-tenant.