Skip to content

Desktop App · Licensed Retail POS + Vendor Panel

SalezFlow POS — Offline-First Point of Sale

SalezFlow POS is my own product, built solo: an offline-first Windows point of sale on Electron, Next.js and SQLite, with RSA-signed machine-bound licences and a vendor panel, from architecture to installer.

  • The till: scanner-first search, quick-cash buttons and change worked out, with the shift open. Demo data.
  • Dashboard with takings, real profit after returns, payment mix and top products. Demo data.
  • Customer khata: every credit bill, return and payment that moved the balance, with reminders and numbered receipts. Demo data.
  • Vendor panel: RSA-signed licences with machine binding, seat counts, renewals and revocation. Demo data.
  • Vendor revenue across new sales, renewals and manual entries. Demo data.
On this page

My role

SalezFlow is my own product, and I built all of it myself: the point-of-sale app, the vendor admin panel that sells and supports it, the Windows installer and the release pipeline. There was no client brief and no team, so every trade-off below was mine to make and live with. The POS is Next.js 14, React 18 and TypeScript inside Electron, with Prisma over SQLite, at v1.5. The admin panel is Next.js on Vercel with MongoDB.

The problem

Many small shops still run on a calculator, a bill book and a notebook of who owes what. Cloud POS software assumes reliable internet, a monthly budget and no worry about sales data sitting on someone else's server. I wanted something that fits the shop instead: fast at the counter, usable offline and honest with money. That meant solving a few requirements that pull against each other, and the hardest was selling an offline app installed on a PC the customer has total control over.

Key decisions and why

A web app inside a desktop shell

In the installed app, Electron launches a Next.js server bound to loopback and points a native window at it. The shop gets a desktop app, while underneath it is one TypeScript web codebase with a SQLite file, so there is no server for a shopkeeper to install. The cost is a heavier runtime than a native app. Updates download in the background and install only when the user clicks, so a busy till is never interrupted.

Integers for money and quantity

Money is kept as whole numbers of the smallest currency unit, so Rs 1,250.00 becomes 125000, and quantity as thousandths, so 1.5 kg becomes 1500. I convert only when displaying or parsing input, using explicit half-up rounding. Floating-point sums drift until the cash-up stops matching, and I would rather pay for the conversion code once. Each sale line also snapshots price, tax and cost at that moment, so a supplier's later price rise cannot rewrite last month's margin.

Asymmetric licensing

Only the admin panel has the RSA private key; the POS carries the public half. That lets the POS check a licence yet never mint one, whatever someone does on their own PC. At activation the signed licence is tied to a hardware fingerprint and the shop's id, so a copied folder or a borrowed key fails. The signature is checked locally on every page load, which means a shop with no connection keeps trading. When online, the app re-validates every 12 hours, and every 30 minutes for a blocked shop, so revocation sticks even after a clock rollback.

The trade-off I cared about most: a licence check that locks a shop out whenever the router blips is worse than none. So grace windows, seat counts and version caps are set per licence and individually signed, and the lock is enforced in the API while recovery routes stay open.

Conditional updates for stock

The decrement carries its own guard: subtract N where at least N remain. When another till or a double-click gets there first, the guard fails, the whole sale rolls back and the cashier is told why. Every movement lands in one stock ledger with who, when and why.

What I built

  • The till: one search box for names and barcodes that is scanner-safe, held bills, quick-cash buttons and silent 58 or 80 mm thermal receipts.
  • Shop money: a customer khata with credit limits, suppliers and purchase orders, returns that hand back the correct portion of tax, and shifts that end in a frozen Z-report.
  • Reports: takings, tax by rate, profit after expenses, stock valued by lot and a controlled-drug register for pharmacies, exportable to Excel.
  • More than one till: a Main PC mode where tablets and phones join over the shop's LAN by QR code, every device needs the owner's approval, within the seat count signed into the licence.
  • Security: three request guard layers, custom roles, scrypt-hashed passwords with offline recovery by PIN, an encrypted SQLite file and a build that fails if an env file would enter the installer.
  • Vendor panel: issue, renew, revoke and unbind licences, track instalments, publish releases and answer support tickets, with an audit log. There is deliberately no public sign-up page.

Just four kinds of traffic go out: licence checks, the shop's contact details, support tickets and reset emails.

Results

  • Both apps together come to around 116,000 lines of TypeScript; the POS alone has about 80,000 lines, 47 screens, 125 routes and 45 models.
  • 1,020 unit tests and 470 integration tests prove the hard cases: when two sales race for the final unit exactly one wins, receipt numbers never collide, and a closed Z-report never moves.
  • Subscription, one-time and instalment sales run on the same signed-expiry mechanism, and a one-time buyer is never offered a version they did not pay for.
  • Billing, stock, receipts, reports, backups and password recovery all work with no connection.
All projects

Have a project in mind?

Whether it's an MVP, a dashboard, or a rescue mission on an existing codebase — let's talk about it.

Prefer to talk first? Book a free 30-min call (opens in a new tab)