Project

Kairos — Multi-branch management + e-commerce

SectorERP / point of sale + e-commerce
ClientImportadora Kairos VCL (Oruro, Bolivia)
RoleSolutions Architect & Tech Lead
Year2026
Kairos — multi-branch management + e-commerce — main view

Client and Idea

A multi-currency ERP and public store for an importer, on a static SPA + Supabase

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 Challenge

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.

What We Built

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.

  • POS with 3 modes (direct/order/credit) and per-batch FIFO
  • Multi-currency BOB/ARS/USD with exchange-rate snapshots
  • 42 tables, 24 migrations (3,031 lines), 38 PL/pgSQL functions
  • Inter-branch stock transfers with statuses
  • Public store with Google login, cart and online orders
  • Installable PWA with its own design system (light/dark)
Let's build something great together

Let's collaborate!