Stoku
When the point-of-sale stock figures could not be trusted, I rebuilt true stock and the monthly VAT ledger from the fiscal e-invoices themselves, shipped as an offline Windows desktop app.
- Role
- Creator: analysis, sync engine and desktop app
- Client
- A food & dairy distributor with a warehouse and three delivery vans
The problem
Stock in the point-of-sale system had drifted far from reality, so neither stock nor VAT could be trusted. Every sale and purchase, however, is registered with the tax authority as a fiscal e-invoice.
What I built
Audited the existing POS data to find where and why the numbers went wrong.
Built an incremental sync that pulls sales, delivery notes and transfers from the POS back office, and every invoice's line items from the tax authority's public verification service: a 40-day re-read for late fiscalization, idempotent on the fiscal invoice ID, six parallel workers with retries.
Rebuilt stock as opening count + purchases ± transfers − sales, with supplier-item → article mapping rules, and a monthly VAT ledger with carry-forward credit.
Packaged it as an offline Windows desktop app (Electron with a local SQLite database): encrypted secrets, a role per van, daily backups, and a health page for every data source.
Architecture
Integrations
- POS back-office API: sales, delivery notes, transfers
- Tax authority: fiscal e-invoice verification
- Excel import and export
Outcomes
Stock and VAT derived from fiscal records instead of the POS's own numbers
Runs offline on a single Windows PC, with no server to maintain
Two languages (Albanian, English)
Tech stack
Next case study
SignalXchange