HomeProjectsDESAIN POS — Multi-tenant Point of Sale
2026Solo architect & developerLive in production
DESAIN POS — Multi-tenant Point of Sale
Production point-of-sale platform powering live retail operations — multi-branch admin, offline-first cashier app that keeps selling when WiFi drops, separate per-tenant data.
Highlights
- Tenant isolation via Postgres RLS — defence-in-depth beyond ORM filtering
- True offline-first cashier sells without network, reconciles on reconnect
- Solo-built monorepo replaces a multi-vendor POS stack
Problem
Indonesian retail operators juggle multiple POS systems for storefront, kasir tablet, and back-office reporting. Off-the-shelf platforms charge per-terminal, assume single-tenant ops, or fail the moment connectivity drops at the till.
Approach
- 14-package monorepo (apps/ + packages/ + infra/) — Hono API, Next 15 admin, React+Vite cashier PWA, BullMQ workers, shared Drizzle schema
- Postgres Row-Level Security enforces tenant isolation at the database layer, not at ORM filter scope
- Offline-first cashier PWA: IndexedDB queue, optimistic UI, background sync on reconnect — store keeps selling when WAN drops
- BullMQ workers handle async work (printing, rollups, integrations) so API latency stays flat under load
- PII encryption at rest (PII_ENCRYPTION_KEY_HEX) for consumer-data compliance
- Single-VPS deploy via pm2 with 4 process types (api, worker, admin, pos) plus dedicated Postgres + Redis containers, fronted by host Nginx + certbot TLS
Stack
TypeScriptpnpmTurborepoHonoDrizzle ORMPostgres (RLS)BullMQRedisReactViteNext.js 15TailwindDockerpm2Nginx
Outcome
- Live in production at pos.aureonforge.com serving real store operations
- Zero-downtime deploys via pm2 reload + docker compose up for infra changes
- Generates real revenue and operational data feeding ongoing iteration
Tags