Caipira Plus

Context and problem
Small and mid-sized free-range poultry farmers track their farms in spreadsheets and notebooks. Caipira Plus brings it all into one subscription app: batches, egg collection, mortality, tasks, weather and performance reports. It's in development, with about 40% of the plan done. The code is closed; this page covers the thinking behind it.
Technical decisions
Why permissions live in the database
Each farm has members with roles (owner, admin, worker, guest), and the rule for who sees what lives in Postgres, with Row Level Security. The database is the only place that decides permissions: a bug in the UI can't leak another farm's data.
Why weather comes from the postal code
The forecast comes from a free API and is located by the center of the postal code, without asking for GPS. Farms in the same postal code share the same forecast. Weather is stored day by day so it can later be compared with production; today it already triggers heat-stress alerts.
Why the Stripe webhook doesn't trust event order
Payment events can arrive out of order or repeated. Instead of applying each event, the webhook re-reads the subscription's current state from Stripe and handles each event only once.
How I build with AI
Work follows a spec-driven flow with Skills do Matt Pocock: an interview about the idea (grill), the spec, splitting it into tickets, implementation and code review; sometimes wayfinder and a retro. What to do and what's done lives in the repo's issues, and every commit goes up to a GitHub PR, where I approve it or not. That way the work can pick up from any point.
Challenges
- 01Readable in sunlight: the app is used on a phone, inside the poultry house.
- 02Not abusing the weather API: the forecast is saved in the database and works as a cache, and farms in the same postal code share the same request. It's a philosophy I follow across the system: cut usage and cost by keeping information that's already been fetched.
Outcome
- 16
- MVP steps shipped in July 2026
- 34
- genetic lines in the catalog
- ~40%
- of the plan done
Next case study
Grana →