The brief
A small clinic runs on two people: the doctor, recording a visit with a pet in one hand, and the front desk, finding owners by mobile number. Visit notes went on cards, prescriptions were handwritten, and the next vaccine date was written wherever it might be found again. Old lab reports lived in owners' phone galleries.
The constraints: owners reached on WhatsApp, medicines by Indian brand name, a prescription that prints on letterhead, and a phone screen the doctor can use one-handed between patients.
Engineering
One table, built for the questions the clinic asks
Everything lives in a single DynamoDB table with three sparse indexes: pets by name, visits newest-first, and open reminders by due date. The main lists, such as patients, recent visits and reminders due, are each one query. A done reminder drops out of the index, so the due list never scans history. Owners are found by mobile number, and patient numbers work both ways: #12 on screen, P-00012 on paper.
Vaccines tracked by dose, not by visit
One schedule file defines every vaccine, its doses and intervals, and the visit form, the reminders and the pet's vaccine card all read it. A visit closes exactly the doses it gave. In final testing I found a puppy's second dose could silently drop off the due list when two doses shared a date; reminders now record which doses they cover, and 15 tests keep it that way.
Prescriptions that stay safe
The builder searches by generic or Indian brand name, sets doses as 1-0-1 slots with food timing and duration, and prints on the clinic's letterhead with the doctor's signature. It never fills in a dose. It warns, without blocking, about a drug class the pet is allergic to or a dog-only medicine on a cat.
WhatsApp without the API
The official WhatsApp Business API needs approved message templates and charges per message. Instead, one tap opens WhatsApp with the reminder already written; the receptionist presses send and the app marks it done, with an undo. It costs nothing and comes from the clinic's own number. Owners without WhatsApp get a Call button instead.
Self-registration that strangers can't abuse
A QR poster at the counter opens a one-minute form on the owner's phone. Nothing from it touches patient records until the front desk approves it. Behind it: a bot trap, rate limits shared across server instances through DynamoDB counters, and photo uploads accepted only once those checks pass.
Photos shrink on the phone
Images are resized in the browser before upload: photos to 2,000 px, lab reports to 2,400 px so small print stays legible, and 400 px thumbnails for lists. X-rays keep every original pixel.
AI that reads the paper
A photographed lab report becomes searchable text, and a long history becomes a short summary for the doctor. Only the animal's clinical record is sent to the model; the owner's name, phone number and address never leave the clinic's database.
Hosted next to the data
Server functions run in Mumbai, next to the DynamoDB table and S3 bucket. They first ran in the US, which sent every page across the world and back.
Locked down
A clinic passcode gates the app, with attempt limits. Every server action checks the session again on its own, so no form can be posted around the login.
Outcome
Live at the clinic since 3 December 2026, three weeks after the first commit: on the doctor's phone, on the counter's computer, and on a QR poster at the counter.