Godines Inventario
Private client systemAn inventory ERP for a construction company: they upload their CFDI invoice XMLs and stock updates itself. Multi-company with real tenant isolation, role-based access control, and an audit trail on every movement.

Project Context
Godines Construcciones ran its inventory by hand: someone opened every supplier invoice and typed it in product by product on a spreadsheet. With several companies in the same group and dozens of invoices a month, the inventory never matched reality and nobody knew for certain what material was on site. We built them a bespoke panel that inverts the flow: the invoice they already receive from the tax authority is the source of truth, and inventory is derived from it.
Technical Challenge
The challenge was not drawing a product table, but three problems at once: parsing the Mexican CFDI tax standard without errors, keeping several group companies strictly isolated from one another inside the same database, and doing it with a permissions model that survives an audit. All of it over real fiscal data, where a duplicated entry or a value leaking between companies is not a cosmetic bug — it is an accounting problem.
Problems Solved
- •Supplier fragmentation: each one names the same material with a different SAT code and description. Solved with a mapping table that consolidates those variants into a single master product per company, so stock doesn't split into three records of the same bolt.
- •Idempotent ingestion: uploading the same XML twice must not duplicate inventory. Every CFDI is recorded by its fiscal UUID with a per-company uniqueness constraint, so a re-upload is ignored instead of inflating stock.
- •Multi-company isolation: every operational record is scoped by company, and each API verifies server-side that the user has been granted access to that company before responding. Each company's tax ID configures the entry/exit logic instead of it being hard-coded.
- •Security audit and refactor: the inherited version trusted a cookie any browser could forge and exposed administration endpoints with no authentication. The session model was rewritten (httpOnly cookies validated server-side), database-backed RBAC was added, and every finding and fix was documented.
Technical Execution
Panel built with Next.js 15 and React 19, Prisma over PostgreSQL; a CFDI processor that turns each XML into entry or exit movements based on the company's tax ID; a multi-tenant model with CEO/user roles and per-company access grants; Supabase authentication validated server-side; PDF and Excel report exports; and consumption charts by product and period.
Results Obtained
The client went from typing invoices to dragging them: inventory updates itself and every movement is traceable back to the folio and supplier that originated it. The system runs in production for several companies in the group, each seeing only its own data, and the security redesign closed an authentication bypass that had allowed entry to the panel without credentials.
Visual Evidence
Request Quote
Have a similar project? Let's discuss your needs and see how we can help bring it to life.
Start a project