FIVO
We built FIVO end to end: an agricultural credit and factoring platform for Mexican growers. At its core is a parallel validation engine —we made the three areas (Legal, Mesa de Control and Documents) review an application at the same time, each with its own configurable checklist and SLA, and the credit only advances to committee once all three approve; where there used to be a queue of weeks, there's now a simultaneous process. The point was never the form, it was the flow between areas. On top of that we built same-day factoring: we advance up to 90% of the value of a harvest delivery still pending payment, and to make that number real we wired it to the buyer's system via OAuth2, signed webhooks and reconciliation against their receptions. The proof is in the scale: a single centralized API of 150 route handlers feeds four frontends (public web, grower dashboard, role-based backoffice and the Collect portal for buyers), over 51 Prisma models on PostgreSQL, with an 11-step onboarding of 170+ fields the client edits without touching code. It runs on Next.js, Prisma and IBM Carbon, with CI/CD to staging and production.
Category
Fintech
Stack
Next.js, TypeScript, PostgreSQL
Status
In development
The problem
Agricultural credit in Mexico stalls because the money arrives late. An application moves through Legal, then Mesa de Control, then Committee —in series— and the grower waits weeks while the harvest is already on the truck. And factoring against deliveries lives in a separate world: the buyer keeps receiving data in its own system, and FIVO needs it to advance funds. The problem isn't inside any one system; it's between them.
What we built
- —Parallel validation engine: submitting an application opens all 3 areas (Legal, Mesa de Control, Documents) at once, each with its own configurable checklist, hour-based SLA and observation cycle; the application advances to Committee only when all 3 reach APPROVED.
- —No-code, versioned onboarding wizard: 11 steps / 170+ typed fields (RFC, CURP, CLABE, etc.) that the Admin area edits without touching code; fields map to credit-application columns.
- —16-state credit state machine (DRAFT → SUBMITTED → per-area review → IN_COMMITTEE → SIGNED → ACTIVE → SETTLED) with a committee that votes Approve/Conditional/Reject/Defer.
- —Same-day factoring (advances): up to 90% of the value of a harvest delivery pending payment, with rates, origination fee, late interest and eligibility score parameterized in business code.
- —Collect, the buyers' portal: they register deliveries, see linked growers, configure their API integration and resolve discrepancies —10 pages, 13 hooks, strict per-buyer scoping.
- —OAuth2 integration with buyer APIs (verify grower, delivery capacity, history, register advance, deduction) plus a signed payments webhook.
- —FIVO ↔ buyer reconciliation: detects data discrepancies, logs every sync (HTTP status, request/response) and lets an operator pick the correct source of truth.
- —Role-based backoffice: Legal, Mesa de Control and Committee inboxes, case files, disbursements, collections, portfolio/turnaround reports, plus administration of roles, permissions and catalogs.
- —Own CMS on PayloadCMS for the public site (6 collections + 11 globals) with content seed and typed clients to migrate the hardcoded copy.
- —Documented mapping of the buyer's real traceability database into FIVO's Entrega model, handling dates stored as text, string foreign keys and inconsistent status values.
Results
150 route handlers (centralized API) feeding 4 frontends
106 application pages built
51 models and 35 enums in the Prisma schema
11-step wizard with 170+ configurable fields
Validation system with 3 parallel areas and 16 application states
Collect portal: 10 pages + 13 React Query hooks
Integration with 6 buyer OAuth2 endpoints + signed webhook
Credit range $50K–$50M MXN; factoring advance up to 90% of delivery value
Buyer traceability mapping: 195,514 receptions, 1,279 growers, 2,860 orchards, 16 sites