Pashupaalak
A dairy farm app where workers log milk, feed and health in their own language and owners see today's milk, the cow that needs attention and the month's real profit.
My role: Designed and built the monorepo: NestJS API, Next.js owner dashboard, worker web app and Expo mobile app, plus the MCP server.
- NestJS
- Prisma
- PostgreSQL
- Next.js
- Expo
- React Native
- MCP
- TypeScript
Screen 1 of 4: Pashupaalak owner app: today's milk and animals that need attention
The problem
Dairy owners rarely see what happens in the shed. Records are kept on paper or not at all, workers may not read English, the internet drops, and owners can't trust the numbers they do get.
How it fits together
Worker app — Expo / React Native and web worker apps. Events queue on the device and sync when the network returns.
- 01
Worker app · offline queue · PIN/QR
Expo / React Native and web worker apps. Events queue on the device and sync when the network returns.
- 02
NestJS API · multi-tenant auth
Owner OTP auth, worker PIN/QR auth and admin, farm scoping and plan limits.
- 03
Event log · SHA-256 hash chain
Append-only events per farm, each linked to the previous hash. GET /events/farm/:id/verify checks the chain.
- 04
Owner dashboard · Next.js · mobile
Today's milk, animals needing attention, vaccines due and real profit.
Key decisions
A hash-chained event log as the source of truth
Every worker action is an append-only event carrying the SHA-256 hash of the previous one, per farm. Editing history breaks the chain, and the owner can verify the whole farm's log from the Integrity tab.
Offline first, with two clocks
The worker app queues events on the device. Each event keeps when it happened (device time) separately from when it reached the server (sync time and a server sequence), so late syncs don't corrupt the timeline.
Designed for the shed floor
Workers sign in with a PIN or QR code, not a password. Big tiles, a weigh pad and voice prompts work for low-literacy users, in English, Hindi and Marathi.
AI that can only read
An MCP server lets owners ask their farm questions from Claude or ChatGPT. The tools are read-only, and every number comes from Pashupaalak's own calculations, never from the model.
What I traded, and why
- An append-only log makes corrections explicit events instead of edits. That's more work in the UI, but it's the whole point: the record can be trusted.
- Per-animal baselines in the health-rules engine flag fewer false alarms than farm-wide thresholds, at the cost of needing a few days of history per animal.
What I'd do next, or differently
- Real milking is per animal, in kg, twenty times a shift. The first worker flow was designed per event; field testing earlier would have caught that sooner, and the logging flow has since been rebuilt around it.



