🌾
ATGrow Architecture
Enter your access code to continue
style="position:fixed;inset:0;background:#0a1a0f;display:flex;align-items:center;justify-content:center;z-index:9999;flex-direction:column;gap:24px;font-family:'DM Sans',sans-serif;">
🌾
ATGrow Architecture
Enter your access code to continue
System Architecture

Poultry ERP

Marginal cost tracking for layer operations — day-old chick through point-of-lay. Built for Southwest Nigeria.

Production · Railway Session 8 · v0.8 atgrow.shop
Entry channels
Owner
Farm owner
Reports, admin commands, schedule management
WhatsApp+18133308855
Manager
Farm manager
Daily operations — mortality, feed, sick birds, vaccines
WhatsAppmanagerWhatsapp
Super admin
Platform admin
Add farms, manage onboarding invites across tenants
SUPER_ADMIN_WHATSAPP
Server
Express 5 — /webhook
Twilio inbound · MessageSid deduplication · role resolution (roles.ts) · state machine dispatch
Node 22.12+ TypeScript tsx runtime Prisma 7 node-cron radfalc/poultry-erp
Flows (stateMachine.ts)
Manager
Mortality
Pen · cause · count decrement · cost ledger
Manager
Feed
Bags · phase · JIT price · inventory · reorder
Manager
Sick birds
Pen · count · symptoms · health event
Manager
Vaccination
Name · pen · JIT cost · inventory decrement
Owner
Reports
On-demand + scheduled cron · Excel · email
Owner
Onboarding
9-question agent · breed selection · defaults
Owner
Admin commands
Update manager · email · report schedule
Super admin
ADD FARM
Invite · nudge · multi-farm confirm
Data layer
Supabase Postgres · 13 tables
Core
Farm data
Multi-tenant from day one — every table carries farm_id
FarmPenBatchCostLedger ConversationHealthEventInventory SupplierOnboardingInvite
Defaults library
Nigerian norms
Seeded reference data for breeds, feed phases, vaccine schedule, mortality benchmarks
4 breeds3 feed phases 8 vaccines4 benchmarks
External services
Messaging
Twilio WhatsApp
Inbound webhook · outbound messages · sandbox → production one env var swap
+14155238886Paid $20
Email + storage
Resend + Supabase Storage
Excel report upload · 7-day signed URL · email from reports@atgrow.shop
atgrow.shopbucket: reports
Deployment
Railway
Docker · auto-deploy from GitHub main · cron scheduled reports
hearty-possibilitypoultry-erp