Receituário Agronômico
Grupo Coagro's agronomic prescription system: a Flutter app for agronomists (desktop and web) and a NestJS API on the Winthor and SIAGRI Oracle databases, with e-signature.

// Overview
An agronomic prescription is a legal document: product, crop, target, dose, area and the responsible agronomist, within what the law allows. The system issues, cancels and batch-registers prescriptions from what is already in the ERP, with automatic dose and area calculation.
// The challenge
A distribution ERP does not carry agronomic rules — they do not apply to whoever sells screws. Without them, agronomists retyped what the system already knew, and a wrong prescription is not rework, it is regulatory risk. And the prescription has to be signed by the responsible agronomist, with no paper moving between branches.
// Constraints
The prescription is a legal document: it must stay within what the law allows, be signed by the responsible agronomist, with no paper between branches — and the agronomic rules do not exist in the distribution ERP.
// Engineering decisions
Idempotent issuing
- Choice
- every issue request carries an Idempotency-Key.
- Why
- a retry must never duplicate a legal document.
- Trade-off
- the API stores and checks the key on every issue.
Signing without wasted credits
- Choice
- the document goes to Autentique, and a resend reuses the same document instead of creating another.
- Why
- every new document on the signing service costs a credit.
- Trade-off
- the system keeps the link between the prescription and the external document.
// The solution
A Flutter app with BLoC and Clean Architecture for Windows and web, and a NestJS API in hexagonal architecture over three Oracle connections (SIAGRI, Winthor and integration). Issuing is idempotent through an Idempotency-Key, so a retry never duplicates a prescription; the customer's signature is stamped on the PDF in the same transaction; the document goes to Autentique, where the agronomist signs it, and resending reuses it without spending another credit. Once issued, the prescription number and the responsible agronomist are written back to the order in Winthor. The API also accepts the CRM Loja login, so sellers need no extra password.
My role
Author and maintainer of the app and the API (about 98% of commits), from the first commit, in June 2025, to deployment: business rules, API, app, tests and releases. A Grupo Coagro system, in partnership with NWERP.
Tech stack
// Screens



// Outcome and evidence
In production, with the app at version 3.12 and the API at 2.12, releases automated by Release Please and CI running lint, typecheck, build and tests on both sides.
- test files
- ~400
- across app and API
- Oracle connections
- 3
- SIAGRI, Winthor and integration
- of the commits
- ~98%