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

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




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.
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 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.
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.
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.
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.
Analysed from the source tree: 19 screens, 92 routed actions, 23 Sheet tabs, 19 permissions and 279 backend + 254 frontend tests.
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.
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.
The product, in detail.
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
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
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
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
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
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
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
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
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 appThe 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.
Verified feedback.
Collected through private review links and published only after approval. No public account and no invented testimonials.
Client feedback for this project is collected through private review links. Approved testimonials will appear here.
Worked on this project? Request a review linkQuestions & reactions.
React to the build or leave a question. Comments are moderated before they appear on the page.
No approved comments yet. Be the first to ask a question.
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.
This is a client/enterprise build — the original source is not for sale. I can design and build a similar system for your business.
Keep exploring.
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.

