amr.essam

~ / work / epsilon

Epsilon app icon

Point of sale · Windows · Web · Android

Epsilon

Offline-first point of sale for cafés and restaurants in Egypt, with an online ordering menu, an owner phone app and a per-shop customer app.

One order, on every screen. And if the internet drops, the till keeps going.

Role
Product, backend, frontend, mobile, ops
Platforms
Windows · Web · PWA · Android
Core stack
Go · React · Postgres · SQLite
Status
In use by shops · v4.30

The product

Windows

Offline POS

Dine-in, takeaway, delivery, split bills, promotions and loyalty. One Windows exe with SQLite that installs and updates itself.

Shop LAN

Kitchen & floor

Kitchen screen or printed tickets, a LAN waiter page with no app to install, a self-order kiosk and a customer display. ESC/POS printing or PDF receipts.

Web

Online menu

Each shop gets a public web menu on its own subdomain. Cash, InstaPay, wallet or bank transfer. Orders land on the cashier with a chime; customers get order-status push alerts.

PWA

Owner app

Live sales and trends, alerts (late kitchen ticket, void, PC offline) and day reports as PDF. Cashflow and staff-pay changes are queued for the POS to apply.

POS

Back office

Stock, suppliers, customers, cashflow, reports, staff pay and attendance. Roles for owner, cashier, waiter and kitchen. Telegram day reports, local and encrypted cloud backups.

Android

Customer app

A branded Android app per shop, built with Kotlin Multiplatform. Arabic and English, Google sign-in.

Architecture

+---------------------------+
| Update feed (Supabase)    |
| Ed25519-signed releases   |
+---------------------------+
              | poll, verify, swap
              v
 SHOP LAN                               CLOUD
+---------------------------+          +---------------------------+
| POS exe                   |  HTTPS   | Cloud bridge              |
| Go + React, SQLite        |<-------->| Go + Gin                  |
| API + UI on one port      |REST, gzip| Postgres + RLS            |
+---------------------------+   JSON   +---------------------------+
              ^                             |          |          |
              | SSE realtime                |          |          |
              v                             v          v          v
+---------------------------+          +--------+ +---------+ +-------+
| LAN browsers, no install  |          |Web menu| |Owner PWA| |Android|
| waiter page, kitchen,     |          | React  | |Web Push | |  app  |
| kiosk, customer display   |          +--------+ +---------+ +-------+
+---------------------------+

Engineering highlights

Offline licensing

Ed25519-signed serials bound to the PC, with paid modules (analytics, stock, loyalty, kitchen, kiosk, payroll and more). Verified offline, no license server. Issued from a vendor-side terminal UI.

Signed self-update

The exe polls a release feed, verifies an Ed25519 signature, backs up the database, swaps the binary and keeps the previous one. A rollback button, plus a remote kill switch for a pulled version.

Multi-tenant cloud

One Postgres for every shop. Tenant isolation is enforced by row-level security through a restricted role.

Auth

Customers sign in with Google or Apple per shop; the cloud verifies id tokens, issues EdDSA JWTs and refresh secrets, with per-IP rate limits. Owners link a phone by QR one-time code, then a bearer token.

Sealed backups

Cloud backups are sealed with an X25519 public key. Only an offline private key opens them.

No .env in the field

Shipped config is encrypted at rest with Windows DPAPI.

Components

ComponentStackRole
POS appGo 1.26, Gin, SQLite, Squirrel, Goose, zerolog, chromedp (PDF), cron. UI: React 19, Vite, Tailwind 4, TanStack Query/Table/Virtual, zustand, i18next, BunSingle exe serving the API and the embedded UI on one port
Cloud bridgeGo, Gin, Postgres 18 + RLS, pgx v5, goose, EdDSA JWT, webpushWeb menu, ordering API, owner API, admin
Web menuReact 19, Vite, TypeScriptPublic per-shop ordering menu
Owner appPWA, Web Push (VAPID)Live sales, alerts, reports
Customer appKotlin Multiplatform, Compose + Material 3, Navigation 3, Koin, Ktor clientPer-shop Android build (iOS not built yet)
Release & backupsSupabase: release feed, storage buckets, edge functionSigned updates and backup storage
License managerGo, x/crypto Ed25519Library plus issuer and client CLIs
License issuerTypeScript, Bun, OpenTUI (React)Vendor-side terminal UI
WebsiteAstro, static, Cloudflare PagesArabic-first marketing site
InfraDocker on Coolify (Hetzner VPS), Traefik, CloudflareHosting

Rewrites explored

The same POS backend, tried on other stacks before settling on Go.

AttemptStackOutcome
v1–v3 POS backendGo, Gin, SQLite, Wails desktop shell, Telegram bot790+ commits, shipped up to v3.4; superseded by the current full-stack app
KotlinKtor/Netty, Exposed, Flyway, Postgres, Koin, Playwright PDF, OpenAPI, RBAC pluginExperiment
NodeHono, Drizzle, Postgres, zod-openapiExperiment
BunThe same Hono codebase on Bun, puppeteer-core PDFExperiment
Rustaxum 0.8, sqlx, tokioStub

Numbers

2,900+

commits in the POS repo

v4.30

current release

12

paid modules

2

languages: Arabic + English