AKArif Khan.
All work
Enterprise / ERP2026Metro ERP · white-label product

Metro ERP

A white-label, bilingual B2B commerce OS that runs on Google Apps Script and Sheets.

Client
Metro ERP · white-label product
Role
Product engineer · solo build
Timeline
Phase 1 · live demo
Year
2026
Metro ERP preview
92
API actions
533
automated tests
19
app screens
0
servers to run
Product tour

See the actual product.

Screens captured from the running Metro ERP build — not a mockup.

8 screens · product capture
Live preview

See it in action.

Open the deployed experience, explore the public flow, or request a guided walkthrough of the admin side. This is a client build, so access is shared privately.

Demo credentials are published only when they expose non-sensitive demo data. Client production data is never shared publicly.
Preview access
Private admin demo.

The live app runs on Google Apps Script with seeded demo data. Admin access is shared privately — request a guided walkthrough for the full POS-to-report flow.

Lighthouse audit unavailable

Lighthouse scores are captured from live deployments. A fresh audit for Metro ERP is not available, so scores will appear here once a public deployment is live and re-tested.

Not measured
Case study
Stack
React 19TypeScriptViteTailwind CSS 3.4React Router 7RechartsPapaParseGoogle Apps ScriptGoogle SheetsclaspVitestPlaywright
01 · The challenge

What was actually broken.

Wholesalers run the counter, the stock room and the money on paper, Excel or a dated Sheets app. The owner cannot trust the profit number, dues live in a separate notebook, stock silently drifts, and one shared login means nobody can answer who changed a price or voided a sale. The existing app was hardcoded and single-tenant, so every new client became custom work.

02 · The approach

How I designed the build.

Built a React 19 + TypeScript + Vite single-file frontend on a Google Apps Script V8 backend, with 92 routed actions over 23 Sheet tabs. The server owns every number: sale totals, stock, dues and invoice numbers are recomputed inside LockService, stock moves through an append-only ledger, and every mutation writes an audit row. RBAC, revocable 12-hour sessions, CSV onboarding, Drive backup and a bilingual EN/BN interface ship in Phase 1. The API contract is transport-agnostic, so a Postgres/SaaS backend can land behind the same UI.

03 · Architecture & design

How the system is put together.

Metro ERP is a React 19 + TypeScript + Vite single-page app compiled into one HTML file and served by Google Apps Script's HtmlService. Every request enters through apiCall, passes auth and RBAC, and lands on one of 92 routed actions. Services recompute totals, write stock through an append-only StockMovements ledger, and persist to 23 Google Sheet tabs. clasp pushes the same build to each client's own Google account, so there is no server, database or vendor account to operate.

Codebase at a glance
Analysed from source
Apps
React 19 single-file workspaceGoogle Apps Script API
Key modules
DashboardPOS & salesInventory & stock ledgerPurchasing & returnsCustomers, suppliers & duesExpensesReports & profitCSV import & data healthUsers, roles & auditSettings, backup & labels
Services
Google SheetsApps ScriptDrive backups
Integrations
claspHtmlServiceLockServiceCacheServiceDrive API
Languages
TypeScriptGoogle Apps Script (V8)CSS

Analysed from the source tree: 19 screens, 92 routed actions, 23 Sheet tabs, 19 permissions and 279 backend + 254 frontend tests.

Analysed from source
actual project tree
19
Screens
92
API routes
23
Data models
2
Apps / modules

React 19 + Vite single-file frontend, 19 screens, 92 routed actions, 23 Sheet tabs and 5 built-in roles with 19 permissions; 279 backend and 254 frontend tests.

System architecture
Production topology · analysed from the codebase
productionrequest flow ↓
Application boundary11 services
01
Client
Client layer
2 services
React 19 workspace
19 screens · EN/BN
Keyboard-first POS
barcode · split tender · credit
request flow
02
API
API layer
2 services
apiCall entry point
JSON contract · never throws
ROUTES + RBAC
92 actions · 19 permissions
request flow
03
Integrity
Integrity layer
3 services
LockService
serialized multi-row writes
StockMovements
append-only ledger · cached balance
AuditLogs
every mutation recorded
queries · writes
04
Data
Data layersystem of record
2 services
Google Sheets
23 tabs · client-owned
Drive backups
daily trigger · documented restore
deploy
05
Delivery
Delivery layer
2 services
clasp + HtmlService
single-file deploy
Per-client instance
zero servers · zero database
ClientAPIIntegrityDataDelivery
Client → API → data path
System design & key decisions

The hard part is making a spreadsheet backend behave like a database. Three rules do most of the work: the server is the only source of truth for money and stock; every multi-row write runs under LockService with a 30-second timeout; and stock is an append-only ledger with a cached balance updated inside the same lock. Invoice numbers come from a Counters tab under the same lock, mutations are idempotent through clientRequestId, and every write emits an audit row. Auth uses HMAC-signed 12-hour tokens with refresh, revocation and per-email rate limits; passwords are salted and iterated 12,000 times. Apps Script exposes every global without a trailing underscore, so all internals end with an underscore and a public-surface allowlist test fails the build if that changes.

04 · What shipped

The product, in detail.

Module 01POS

Counter-speed POS

A keyboard-first sale flow built for a busy counter, not a form.

  • Barcode/SKU search and keyboard shortcuts
  • Split tender across cash, bKash, card and credit
  • Stock and credit-limit checks inside the write lock
  • Thermal receipt and A4 invoice in English or Bengali
Module 02Inventory

Inventory that reconciles

Every stock number is backed by a movement, not a typed-in balance.

  • Append-only StockMovements ledger
  • Purchases, receiving, adjustments and returns
  • Low-stock alerts and inventory valuation
  • Overselling rejected with per-line messages
Module 03Finance

Dues & accounts

Receivables and payables are the business; the ledger makes them visible.

  • Customer due ledger with invoice-level allocation
  • Supplier payables with payment references
  • Aging buckets and collection follow-up
  • Unified in/out payment ledger with void
Module 04Purchasing

Purchasing & returns

The buy side gets the same discipline as the sell side.

  • Purchase entry, receive and cancel flows
  • Purchase returns restock through the ledger
  • Supplier ledger and payable updates
  • Bulk receive and void with confirmation
Module 05Analytics

Owner-grade reporting

Realized vs pending profit, not a revenue number that hides the dues.

  • Sales, stock, dues, purchases and party reports
  • Realized vs pending profit and payment mix
  • Daily series and CSV export
  • Server-recomputed totals — never browser math
Module 06Product

Bilingual & white-label

One codebase, every client's brand and language.

  • English and বাংলা dictionaries kept in sync
  • Business name, logo, VAT and invoice prefix
  • Receipt footer and EAN-13 label sheets
  • Code 39 fallback for non-EAN barcodes
Module 07Security

Safe by construction

Apps Script's public surface is the real perimeter, so the build is defensive.

  • Server-side RBAC on every action
  • 12k-round password hashes and revocable 12h sessions
  • Audit log, immutable stock ledger, locked writes
  • Public-surface allowlist plus 279 backend tests
Module 08Operations

Onboarding & operations

A client can go from spreadsheet to first invoice without a developer.

  • CSV import with preview, validation and opening balances
  • Data-health panel and Google Drive backup
  • Storage thresholds and audit purge
  • PII-free usage summary for pilot reporting
05 · The result

What changed for the business.

Phase 1 is live and pilot-ready: 19 screens, 92 API actions, 533 automated tests and a production bundle under 800 KB gzipped — with no server, database or vendor account to run. Two independent security reviews closed every Critical and High finding, and the release gate covers the Apps Script public surface, deploy target, contract/routes and demo-mode leakage. The result is a product business, not a one-off client build.

Open the live app

The summary: A white-label ERP for Bangladeshi wholesalers and distributors — POS, inventory, purchasing, receivables, expenses, returns and owner-grade reporting — shipped as a single-file React app on a Google Apps Script + Sheets backend. Each client gets their own Google account, zero servers and an exit-friendly data model.

Client words

Verified feedback.

Collected through private review links and published only after approval. No public account and no invented testimonials.

0 testimonials
No published testimonial yet.

Client feedback for this project is collected through private review links. Approved testimonials will appear here.

Worked on this project? Request a review link
Discussion

Questions & reactions.

React to the build or leave a question. Comments are moderated before they appear on the page.

Comments are reviewed before publishing. Email is never shown.

No approved comments yet. Be the first to ask a question.

Work with me

Want a system like this? Let’s build it.

Share the brief and I’ll scope a fixed project, or bring me in hourly for custom features, integrations and ongoing product work.

01
Share the brief
Email or WhatsApp with the product, scope and goals.
02
Scope & quote
I send a fixed scope, timeline and price.
03
Build & launch
Weekly demos, production launch and a clean handover.
Hourly custom work ৳1,500–৳2,500/hrProject minimum ৳1,50,000International: $15–25/hr · from $1500See engagement options →
Similar custom build
Commission a custom version
৳2,50,000–৳5,00,000

This is a client/enterprise build — the original source is not for sale. I can design and build a similar system for your business.

Need a custom feature first? I work hourly on product features, integrations and improvements.
More work

Keep exploring.

Like this outcome?

Let's build yours next.

Send a short brief and I’ll reply with an honest assessment, a scope and a fixed price. No obligation, no sales sequence.

Book a call