Food Acquisition Program — Incentive for Milk Production and Consumption
System built for the State Agrarian Development Secretariat of Ceará (SDA) to run PAA-Leite: it validates family-farming producers' documentation, registers beneficiaries, monitors dairy tanks and milk deliveries per plant, and generates the reports behind both producer payment and the free milk distribution to vulnerable families.
PAA-Leite is the system that runs, in Ceará, the Food Acquisition Program's Incentive for Milk Production and Consumption modality: it validates family-farming producers, registers beneficiaries and tracks every milk delivery, from the dairy plant's tank through to the producer's payment.
PAA Leite (Food Acquisition Program, Incentive for Milk Production and Consumption modality) is a public policy that buys milk from small family-farming producers and distributes it for free to families in social vulnerability. In Ceará, the program is operated by the State Agrarian Development Secretariat (SDA), which has to sustain both ends of the policy in the same system: who produces the milk and who receives it.
Administration module: producer, beneficiary, dairy plant and entity representative registration
No producer enters the payment flow without validation. The Validate Producer screen cross-checks the registration against the DAP number (Family Farming Aptitude Declaration), its expiry date and the status with Adagri, and also lets staff cancel a fortnightly cycle or fix invoice data when documentation shows an inconsistency. It's this validated registration — not a simple list of names — that authorizes a producer to deliver milk to a partner dairy plant.
Producer Validation: DAP status, Pronaf type and validation status per municipality
Alongside the producer registry, the system keeps a separate beneficiary registry — the families who receive the milk distributed by the program — with civil records (ID document, voter registration, place of birth) and eligibility criteria for other social programs, such as Mais Infância Ceará. It's a completely different data and validation profile from the producer's, which is why it lives in its own dedicated registration module rather than as a variation of the producer registry.
Beneficiary Registration: civil records and ID document, validated in required fields distinct from the producer registry
CPF, RG and other identifiers shown in this case study's images were blurred to protect the privacy of the program's producers and beneficiaries.
PAA-Leite's operational core runs in fortnightly cycles: each validated producer delivers their milk to a cooling tank linked to a partner dairy plant, and the system logs that delivery by type (bovine or goat milk), tying it to the current cycle. It's this record — not an estimate — that moves the producer's status to Payment Generated, closing the loop between actual production and pay.
Dairy Plant Intake: each delivery links producer, milk type and payment status to the fortnightly cycle
From the recorded intakes, the Stock Report by Dairy Plant consolidates, per plant and per milk specification, the available volume — the view the Secretariat uses to track which plants are receiving production and which need attention. It's a simple operational report on the surface, but one that only exists because every individual intake was correctly linked to a validated producer and a registered dairy plant.
Stock Report by Dairy Plant: volume consolidated per plant and specification (bovine/goat)
PAA-Leite follows the same infrastructure pattern as SDA's other systems: a .NET/C# core holds the producer and beneficiary validation rules, while the operational panels for registration, tank monitoring and reporting are generated in PHP via Scriptcase, with grid screens, filters, sorting and Excel/PDF export ready for the Secretariat teams' daily use. An Angular layer covers more specific expression-of-interest and document flows. The whole application runs containerized with Docker and is version-controlled via Git.
Eligibility rules live in the .NET/C# core, separate from the presentation layer — the same rule holds across every screen that consumes it.
Distinct documentation rules for producer (DAP, Pronaf, Adagri) and for beneficiary (civil ID and social criteria), in the same system.
Producer eligibility is checked against DAP/Pronaf and Adagri as the source of truth — the system validates, it doesn't re-register what's already official.
Every delivery inherits the producer → tank → dairy plant → cycle link before it becomes Payment Generated: no valid delivery, no payment.
Scriptcase/PHP grids deliver search, columns, sorting and Excel/PDF export without rewriting CRUD — delivery speed for the Secretariat's operation.
Docker isolating dev and production, version-controlled via Git — the same infrastructure pattern as SDA's other systems.
High-level architecture: a web layer (Scriptcase/PHP + Angular) over a .NET/C# validation core, with official eligibility sources and a single PostgreSQL base, all containerized.
The model revolves around the dairy plant as an aggregator: each partner plant gathers its tanks, its staff and the producers who deliver there. Every milk intake is born tied to that chain, letting the system answer, for any payment, exactly whose milk it was, in which tank, under which dairy plant's responsibility and in which cycle — the traceability a public producer-payment policy demands.
Dairy Plant Staff: part of the dairy plant → tanks → staff → producers chain
Behind a simple "milk intake" screen, PAA-Leite moves public money to real producers and food to real families. That's why the architecture was designed with the rigor of a financial system: validation before payment, end-to-end traceability and a single source of truth for every piece of data.
Across 9 months in production, PAA-Leite came to sustain over 5,000 milk-delivery records per fortnightly cycle, spread across dozens of partner dairy plants, each with its own producers, tanks and staff registered in the system. It's the system that guarantees a family-farming producer only gets paid when milk was actually delivered and validated — and that the milk distributed to beneficiary families has traceable origin, from a producer's first registration through to each dairy plant's stock report.
Public data from the Government of Ceará (2026).
PAA-Leite has two very concrete human ends: the small producer who depends on their DAP being correctly validated to get paid for the milk delivered, and the beneficiary family who depends on that same milk reaching them. Designing the validation rules, the fortnightly-cycle flow and the reports that sustain that loop — without losing traceability anywhere between the milking and the payment — demanded the same rigor as any financial system, even though the end product is, literally, milk.
PAA-Leite connects two ends of a public policy in the same system: the family-farming producer's formal registration and the daily milk delivery behind both the producer's payment and the beneficiary's food supply.
Validating the producer against the DAP (Family Farming Aptitude Declaration) and Adagri data before releasing their link to a dairy plant, without duplicating registrations that already exist in SDA's other systems
Tracking the producer → dairy plant → tank → fortnightly-cycle chain while keeping payment status (Payment Generated, Cancel Cycle) always consistent with the volume actually delivered
Keeping the beneficiary registry (families receiving the milk) and the producer registry (who supplies it) in the same system, each with its own documentation and validation rules