Full-stack · side project
A child health app for families, from schema to deploy
A child growth, vaccination and health-record app for families: Next.js 16 (App Router), PostgreSQL on Neon with Drizzle, Better Auth and Resend; owner, editor and viewer roles, an installable PWA, a demo mode, and end-to-end tests with Playwright and axe.
- Stack
- Next.js, PostgreSQL, Drizzle, Better Auth, Playwright
Why build it
Notch is a child growth, vaccination and health-record app for families. Parents record a child's measurements, vaccinations and illnesses, and see growth against the WHO Child Growth Standards, the next vaccine on the national schedule, and how the last illness went. It runs in Vietnamese and English at notch-tmd.vercel.app, where a demo with a fictional child, Mây, needs no account.
It is my full-stack project: one person, from the database schema to the deployment, with the same standards as client work.
The stack: Next.js 16 (App Router, Server Components, Server Actions), React 19, PostgreSQL on Neon with Drizzle, Zod, Better Auth, Resend, Sen UI and Tailwind CSS, deployed on Vercel.
Principles that shaped it
- Each screen answers one question: is the child growing well, which vaccine is next, how did the last illness go.
- Only occasional events are recorded, and recording one takes at most three taps.
- It tracks; it never diagnoses or calculates medicine doses.
- Health data is sensitive. No child names or health details in emails, calendar entries or error reports.

From schema to screen
The domain logic lives in plain TypeScript packages with no React: @notch/growth computes WHO z-scores and percentiles from the LMS tables, @notch/vaccines holds the vaccine catalog and the national schedule from Circular 52/2025 of the Ministry of Health, and @notch/db holds the Drizzle schema, migrations and queries. The app reads through Server Components and writes through Server Actions, each of which checks the session, the family and the role before it touches the database.
A measurement is never shown as a bare z-score. It comes with WHO's own name for it (normal, stunted, underweight and so on), the normal range at the child's age in kilograms or centimetres, and a note when the curve crosses a line of the chart. The advice stops at "watch the next measurements" or "take the chart to a paediatrician".

Sign-in, roles and sharing
- Email links only, with Better Auth's magic-link plugin, sent through Resend. There is no password to leak, and a link works once, for ten minutes. Only the owners and the relatives they invite can get one, and the form answers the same for any address.
- Roles. An owner invites a relative as an editor or a viewer. Viewers see no edit controls, and every Server Action checks the role again on the server.
- Sharing without an account. An owner or editor can share a child's page for 7 days, 30 days or until revoked. The link carries a random 32-byte token, the page is
noindexandno-store, and it never shows the health log or the birth details. A page left open notices within a minute that its link was revoked.

Installable, but nothing stored on the phone
Notch is a progressive web app, so it can be added to the home screen. Its service worker caches only an offline page: records always come from the network and are never stored on the device. The demo reads an in-memory PGlite database built on each server instance, so visitors never touch real data.
Tested like a product
- 1,227 unit tests with Vitest: WHO z-scores, the vaccine schedule, database queries on in-memory PGlite, and app logic.
- 405 end-to-end tests with Playwright and axe (WCAG 2.2 AA), in light and dark, on desktop and mobile. They sign in through the real email-link flow, reading the link from a file outbox, against fresh PGlite databases, so they need no
.envand no Docker. - Deployment runs on Vercel in Singapore with Neon in the same region. Every build applies pending migrations before it goes live, and preview deployments use a separate database branch that only holds the fictional child.
Live: notch-tmd.vercel.app · source on GitHub.