All Projects
Full-Stack · Offline-First · PWA

Dukkan — دكان

A production POS system that keeps Egyptian shops running during power cuts and internet outages.

Overview

Multi-tenant point-of-sale and business operations platform built for small shops in Egypt and emerging markets. Runs fully offline on cheap Android tablets — every transaction hits IndexedDB instantly, then syncs to PostgreSQL in the background via an exponential-backoff queue with dead-letter handling and idempotent client UUIDs.

Key Features

  • Zero data loss on flaky connections — offline-first with full sync conflict resolution
  • Orders, inventory with profit-margin tracking, customer credit ledger, returns & refunds, printable invoices, KPI dashboard
  • Full Arabic RTL + English i18n via i18next — language switch without page reload
  • Installable as a PWA — works on any Android device
  • Multi-tenant with JWT auth — one deployment serves multiple businesses

Architecture

npm workspaces monorepo (shared types), React SPA → Nginx, Express REST API, PostgreSQL 16, Docker Compose

What I Learned

Building offline-first taught me that sync is a distributed systems problem disguised as a UX problem. The hard part wasn't IndexedDB — it was idempotency, dead-letter handling, and making sure a shop owner never sees a duplicate order because the network dropped at exactly the wrong moment.