Café Combate
2024–presentA 13-app ERP for a coffee roaster spanning warehouse and inventory, CFDI invoicing, sales, purchasing, and production planning, plus a full e-commerce storefront with Mercado Libre integration, with role-based access and offline-capable sync.
- Express ·
- React ·
- MongoDB ·
- Next.js ·
- PostgreSQL ·
- Facturapi ·
- Stripe
The problem
A coffee roaster does not run on a single workflow. There is the warehouse and its inventory, purchasing of supplies, production planning, sales, and fiscal invoicing, and in most businesses each of those lives in its own spreadsheet or disconnected tool. When the parts do not talk to each other, the same numbers get entered several times and nobody trusts the totals.
There is also a constraint that is easy to overlook from a desk: the warehouse floor does not always have a reliable connection, so a system that only works online is a system that stops working exactly where the inventory actually moves.
The approach
Café Combate is an ERP made up of many apps under one roof, covering warehouse and inventory, purchasing, production, sales, and CFDI invoicing. It is built as a monorepo, so the apps share common modules, utilities, and domain logic instead of each one reimplementing the same pieces, which keeps thirteen apps consistent and far cheaper to maintain. It runs on Express, React, and MongoDB. The pieces I built include the role-based access control that gates every app, the shared customers domain module, the purchasing and sales workflows, and the v2 product-request system that the warehouse and production floors run on, with draft and read-only views, transfers, and downloadable PDF reports.
The part I am most proud of is how it handles connectivity. Rather than a plain online app, it is built local-first: data is held in the browser with IndexedDB so the apps keep working offline, sync back when the connection returns, and stay consistent across tabs. Warehouse and sales work never has to stop and wait for the network.
Invoicing runs through Facturapi for CFDI, and it reuses the same compliance work that powers Facturalandia rather than reinventing it, so the fiscal logic is shared across the systems.
In 2026 the ERP gained a public face: a full e-commerce storefront for the roaster’s coffee and equipment, built as its own Next.js and PostgreSQL app on the same architecture as Agates From Mexico and the zql data layer. I built its commerce core: a server-backed cart with cross-device sync, checkout priced entirely server-side so client amounts are never trusted, Stripe payment with two-step refund approval, Envia shipping labels with webhook-driven tracking and notification emails, and a quotation generator that turns an inquiry into a versioned, branded PDF. The store is not a silo, either: inventory transfers are requested straight against the ERP’s warehouse, and a Mercado Libre integration publishes products and syncs marketplace orders back through webhooks with idempotent inventory movements, so the floor, the online store, and the marketplace all draw down the same stock.
The outcome
Café Combate replaces a scatter of separate tools with one connected system: inventory, purchasing, production, sales, invoicing, and now an online storefront sharing the same data, with access scoped by role and a local-first design that holds up where the business actually operates, online or not.