
A single product with two faces for a Bolivian-Argentine importer: a back office (inventory, POS, cash management, customers, reports) and a public store with no payment gateway, where customers browse the catalogue and place orders that are settled over WhatsApp or in branch. It derives from the domain of its sibling project Ventur, adding ARS multi-currency, a public site, unit-and-box products and a PWA.
The business required multi-currency handling (BOB/ARS/USD, given the import mix), selling the same product by unit and by box, multi-branch operation over a single shared database, and an online commercial presence taking orders without upfront payment.
I built a static Next.js 16 + BaaS SPA with three route groups (public / admin / auth), delegating security to RLS and a has_permission function. I modelled 42 tables and wrote 24 PostgreSQL migrations (3,031 lines, 38 security-definer functions) with atomic RPCs (sale with per-batch FIFO deduction, credit, returns with restock, cash cycle, inter-branch transfers) and a 24-module client-side data layer using React Query.
