Offline PWA and public pages connected to the ERP
Front-ends outside the ERP: an offline inventory PWA for an Android handheld and public pages where the customer approves orders and samples through a link, all talking to the ERP's API.
- Industry
- Apparel and fashion manufacturing
- Period
- 2026
- Role
- Sole author (front-end and API)
- Scale
- 3 apps, 3 new endpoints
Offline
counting without relying on the network
64 hex
random token per public link
E2E
tests against a simulated ERP
Technologies
Challenge
Two problems at the same company, neither of them solvable with one more ERP screen.
Inventory is counted in the warehouse aisle, with an Android handheld that has a built-in scanner, and the network there is not guaranteed. A count cannot stop because the Wi-Fi dropped.
On the sales side, the customer needed to check the order and approve the sample before production, but does not have, and should not have, access to the ERP.
Solution
Inventory PWA. An app in React and TypeScript that keeps everything in the device’s IndexedDB and syncs when the operator says so. Capture is blind on purpose: the handheld does not validate business rules, it only records what was scanned. The rules stay in the ERP, which receives the count and decides. The app is driven entirely by keyboard and scanner, with no touch, and a single call brings the full count context to the device so it can work offline. It is published on Cloudflare Pages, with a proxy Worker so the ERP credential never reaches the device. Browser tests run with Playwright against a simulated ERP, without touching any client environment.
A layered ERP endpoint. The API route knows nothing about inventory: it only hands off to a dispatcher by module and action, and the inventory module is one piece among others. The handheld’s next module goes in without touching the API.
Public approval pages. The ERP generates a link with a random 64-character hex token and stores a snapshot of the order at the moment it is sent, so the customer approves what they received even if the order changes later. The customer approves, rejects or comments with a reason, and the reply flows back into an ERP query. The pages are React apps with Supabase on the company’s internal app platform; the call to the ERP goes through a server-side function, with a versioned API contract and fixed error codes.
Outcome
Three new front-ends, none of them duplicating a business rule outside the ERP. Inventory no longer depends on the network at the moment of scanning, and the customer’s approval is recorded on the order itself, along with a snapshot of what was approved.
What this case shows
The work does not stop at the ERP’s border. I wrote the app, the API and the automated tests at both ends, and the principle of keeping the rules in the ERP held for the front-end too.
Stuck on a term? There is a glossary. Glossary