Mahmoud El-Aidy
Back to all work

Majestic — Field Sales & POS

A point-of-sale and field-sales system for an electronics distributor, built to keep selling when the phone has no signal.

Platform
Android
Year
2026
Role
Android developer
Majestic — Field Sales & POS — project cover

By the numbers

Row-level security policies
69
Tables
38
Sells without a signal
Offline

The challenge

Reps sell from vans, warehouses and shop counters — places where connectivity is not a given. A POS that pauses for the network is a POS that loses the sale, and money moving through cash drawers, wallets and instalments has to reconcile exactly at the end of the day regardless.

The approach

The mobile app writes to a local Drift database first and queues every action in an idempotent outbox, so a sale completes whether the network is there or not and syncing twice never double-counts. The server is the authority: 38 tables, 82 functions and 69 row-level-security policies enforce who may see which warehouse, which treasury and which customer — in the database, not in the interface.

The result

Selling no longer depends on the signal, and the day closes on a Z-report that ties every invoice, collection and expense back to a treasury. Because the rules live in the database, a new role is a permission row rather than a release.

Highlights

  • A POS that works offline — The sale is written locally first and waits in an idempotent outbox, so no amount of re-syncing can count it twice.
  • Treasuries and a working day — Cash, mobile wallets and sub-treasuries, with the day opened, banked and closed on a Z-report that ties every movement to its treasury.
  • Warehouses, stock counts and purchases — Inventory, customers, purchases, advances and stock counts, with Excel import for anyone starting from records that already exist.
  • Permissions live in the database — 69 row-level-security policies decide who sees which warehouse and which treasury — the interface does not hide the data, the database never hands it over.
  • Reports, audit trail and backups — Full reporting and an audit record for every movement, with automatic backups to Google Drive.
  • One codebase, phone and web — The rep app and the admin dashboard are both Flutter from a single codebase, over Supabase.

Built with

  • Flutter
  • Dart
  • Drift
  • Supabase

Next project

Abo Dola Studio

Let's worktogether