
Problem / Context
A greenfield ERP for farm and hatchery operations requiring traceable batch genealogy across the 9-stage hatchery workflow, with hard fail-closed multi-tenancy.
What it does
- Multi-tenant (company/farm) RBAC with farm-level row access
- Stock ledger with batch genealogy, master data (farms, sheds, breeds, products, UOM)
- 9-stage hatchery workflow: intake → incubation → hatch → dispatch
- Incubation parameters, egg grading, hatchability norms
- Hatchery performance and lineage reports
- Docker staging with auto-update and build-info endpoint
Engineering notes
Laravel 12, PHP 8.2, PostgreSQL, JWT; StockLedgerService as sole writer; fail-closed tenancy with CompanyScope; 47 tests; Docker staging with GitHub-polling auto-update.
Outcome / Value
Niche agri/poultry vertical with clean, well-documented architecture and hard tenancy.


