CASE STUDY 02
In Production

RetailSync — Distributed Commerce Platform

Node.js · ODOO · React Native · Next.js · MongoDB · Production

E-commerceNode.jsNext.jsMongoDBOdoo
SYSTEM_MONITOR // RETAILSYNC
SCROLL
THE PROBLEM

Four applications needed the same Odoo data. Four sync layers meant four systems that drift apart.

A multi-branch retail operation needs its ERP truth accessible through a web storefront, a customer mobile app, an admin dashboard, and a delivery tracking system. Building separate business logic for each creates maintenance debt that compounds on every schema change.

THE STANDARD APPROACH FAILS BECAUSE:

Duplicate business logic diverges on every schema change in Odoo
Odoo's relational model is not designed for high-read consumer applications
Direct XML-RPC from mobile apps is slow and exposes authentication tokens
Four separate syncs create four potential failure points with no single source of truth
THE ENGINEERING CHALLENGE

Odoo's relational model is the authoritative source but not architected for high-read consumer-facing applications. The architecture required separating read from write — without ever letting them diverge.

"Dual-layer: Odoo as the write source of truth, MongoDB as the read layer. One source. Zero drift."

— KEY ARCHITECTURAL DECISION

TECHNICAL DECISIONS // 4 MADE

01

Source-of-truth separation: writes always go through Odoo, reads serve from MongoDB

02

Odoo XML-RPC wrapped in a clean abstraction layer

03

150+ endpoints versioned and organized by domain

04

Event-driven stock sync — Odoo webhook triggers MongoDB update, not polling

SYSTEM ARCHITECTURE
Web StorefrontCustomer AppAdmin DashboardDelivery AppNode.js API Architecture150+ REST ENDPOINTS // DOMAIN-DRIVENodoo ERPWRITE SOURCE OF TRUTHReal-time SyncMongoDB AtlasREAD-OPTIMIZED LAYER
PRODUCTION_EVIDENCE // VAULT_01
Buffer_Active
SSD_R_1.2GB/s
ADMIN DASHBOARD
ADMIN DASHBOARD

React + Vite — full catalog and order management

LIVE_PROD
IMG_ID: 1042
WHAT WAS BUILT

Customer Mobile App

EXPO REACT NATIVE
  • Email/phone auth with secure JWT storage and 401 auto-retry
  • Bilingual EN/AR with full RTL layout adaptation
  • Dynamic banner carousel, promotions, category browsing
  • Cart with 15% VAT calculation, address book, checkout flow
  • Loyalty points dashboard — balance and validation via Odoo
  • Order tracking with push notification support

Delivery Mobile App

REACT NATIVE
  • Shift management — clock in/out with break tracking
  • Order acceptance with conflict handling
  • Per-item collection checklist with DB sync
  • 5-digit PIN delivery verification
  • Today's earnings, weekly/monthly aggregated history
  • Live driver location update to backend

Admin Web App

REACT + VITE
  • Full catalog CRUD — products, categories, attributes, units
  • Promotions engine — fixed price, combo deals, bulk deals, coupons
  • Cloudinary integration — image upload, crop, compress
  • PDF invoice generation and print dispatch
  • Sales analytics, inventory reports, delivery performance dashboards
  • PWA support with service worker and pre-cache

Backend Integration

NODE.JS + ODOO
  • 150+ REST API endpoints organized by domain
  • Dual-layer architecture: Odoo (write) + MongoDB (read)
  • Real-time stock sync — Odoo webhook triggers MongoDB update
  • Full order lifecycle: customer order → Odoo SO → invoice → stock move
  • XML-RPC Odoo client wrapped in clean abstraction layer
  • Axios interceptors with Bearer token and 401 refresh flow