coresmith.dev
← All work

Multi-warehouse retail ERP + POS

Retail operations2 monthsin-houseshipped
The problem

Three locations, one spreadsheet, no fiscal link.

Stock lived in spreadsheets that were copied between locations by hand. The point of sale did not know what the warehouse held, and nothing talked to the fiscal printer, so every receipt was re-typed on a separate device.

Counting errors compounded: a sale in one shop could not see a reservation in another.

The approach

One schema, one binary, offline-first.

A single PostgreSQL schema as the source of truth for stock, prices and documents, with the desktop client talking to it over a thin Express layer. The client runs on the shop floor and keeps working when the network drops.

The fiscal printer was the hard part: driven over serial, from the same action that closes the sale, so a receipt can never diverge from the recorded transaction.

The architecture

Desktop client on a real database.

Electron shell, React 19 with TypeScript, Zustand for local state and TanStack Query for the server cache. Express and Sequelize behind it, PostgreSQL with 43 tables covering locations, movements, documents and audit.

ElectronReact 19TypeScriptZustandTanStack QueryMUIExpressSequelizePostgreSQLserialportTREMOL S
The outcome

One click from sale to bon fiscal.

43tables
3locations
2 moto production

Stock is one number again. The fiscal receipt prints from the same transaction that records the sale, so the shop and the tax record cannot drift apart.

Need something like this?

Start a project