Decision record
Odoo owns business state; every edge gets a narrow contract
I kept Odoo 19 authoritative for both commerce and employee records. Glovo is only a sales channel, so the middleware enforces five explicit inventory rules and never lets mirrored stock exceed floor(Odoo / 2). The employee browser follows the same boundary: it talks to a Next.js BFF, which calls a narrow versioned Odoo API. Its PostgreSQL database stores sessions, OTP challenges, rate-limit buckets, audit events and webhook idempotency records — never a second copy of HR or payroll data. That boundary keeps ownership clear while giving each integration its own retry, security and recovery controls.