Poultry Manager — Broiler Farm Operations

Web DevMar 2026By Tinotenda Linton

Broiler farm management across an Expo app and an Express/Prisma API: batch lifecycle, sales, inventory, and staff workflows, live at poultry.linton.co.zw.

ExpoReact NativeTypeScriptExpressPrismaPostgreSQL

Poultry Manager runs the daily operations of a broiler farm — built for a real business, not a demo. Batches, feed, sales, and staff workflows live in one system instead of a notebook.

What it covers

The Express + Prisma API (20 models on PostgreSQL/Neon) carries the domain: batch lifecycle from placement to clearance, sales and stock, and the operational records a farm manager actually needs. It's deployed at poultry.linton.co.zw with auth handled by Auth.js for Express.

The app

The Expo / React Native client is what the farm team holds — built with TypeScript and shipped with an Android build via EAS. It's the only project in my portfolio with a test suite on the mobile side from day one, because a farm manager finding a broken screen at 5am is not a bug report, it's a lost morning.

Built from a master spec document, the system grew feature-by-feature against the real workflow it manages.


The domain rules

Broiler farming has hard constraints, and the system encodes them literally:

  • Six-week (42-day) batches, with sales opening at day 35
  • Derived sellable inventory: liveBirds = chicksAcquired − mortality − sold — computed, never hand-entered
  • FIFO allocation — orders pull from the oldest eligible sellable batch first, with an admin override when reality disagrees
  • Overselling is prevented in database transactions, and cancelled orders release their reserved birds back
  • Partial payments and cancelled-order flows are first-class, not afterthoughts

Batches move through phases (BROODING → SELLABLE → CLOSEOUT → CLOSED) with generated codes like BATCH-20260326-001. Each batch carries mortality logs, feed records with unit costs, health interventions with next-due dates, expenses across 11 categories, and daily observations (weight, water, temperature).

Accountability by design

Three roles — ADMIN, STAFF, VIEWER — with users created by admins only, and an AuditLog model on every key action. Reporting covers batch profitability, mortality rates, feed cost, receivables, and sales by date range, with KPIs like active batches, birds alive, birds sellable now, and outstanding balances.

Under the hood

The API is Express 5 with modular route and service layers, Prisma 7 on a Neon Postgres adapter, Auth.js as a credentials bridge plus mobile token endpoints, Zod validation, and server-side PDF receipts with @react-pdf/renderer — logos and receipts stored in Vercel Blob. It exposes an OpenAPI document at /api/v1/openapi.json.

The client is an Expo Router app with bottom tabs, one-time onboarding, and one detail worth copying: API reads fall back to bundled demo data when the server is unreachable (typed from the OpenAPI spec) — the farm team never sees a blank screen.