FULL SOURCE CODE · COMPLETE & TESTED · 157 AUTOMATED CHECKS PASSING

A till that can't sell what you don't have — with the inventory to prove it.

StockFlow POS is a complete retail system for small and mid-sized businesses: a fast point-of-sale till with cashier shifts and drawer reconciliation, returns & refunds, and permanent invoices — plus the full inventory core: products, multi-warehouse stock, purchase and sales orders, transfers, suppliers, customers and low-stock alerts. Every sale is stock-checked line by line before anything is deducted.

Sales validated atomically Shifts with drawer reconciliation Invoices never edited or deleted Tax snapshotted per invoice 2 roles, enforced on the server
▶ View Live Demo See every screen Demo sign-in is tap-to-fill — today's shift is already open, so the till works the moment you sign in.
stockflow pos · /app · dashboard
StockFlow POS dashboard — stock value, low-stock alerts, today's till and recent movements for the demo store
SHIFT SH-1001 · CLOSED
Drawer expected $426.86 · difference $0
Reconciled exactly — float + cash sales − cash refunds
RIVERSIDE GENERAL STORE · DEMO STORE
Stock value $40,592.75
20 products · 4,694 units · 2 warehouses
14
Product screens
157
Automated checks passing
0
Invoices editable or deletable
100%
Source code included
What StockFlow POS is

One store. One live dataset. A ledger that can rebuild your stock from zero.

The till and the stockroom are not two systems kept in sync — they are one record. A sale deducts real stock, a return restocks it, and every change writes a movement to a ledger that auditors can replay.

  • The demo is the real product. The live demo runs the same code you receive, seeded with the fictional Riverside General Store: 20 products with barcodes, 5 categories, 2 warehouses, 3 shifts, 8 POS invoices and a processed return.
  • Rules live in one place. Every business rule sits in a single operations layer of pure functions; the screens never touch data directly, and the server re-checks every operation before it is recorded.
  • A refused action changes nothing. A sale validates every line's stock before deducting anything — if one line fails, nothing is deducted and no invoice is written. The suites prove it.
Open the live demo
stockflow pos · /app · point of sale
StockFlow POS register — product grid, cart, discounts, tax and payment
The trading day

From opening the till to a reconciled drawer, in four steps.

The daily rhythm of a shop follows one path through StockFlow POS. Every step is guarded by the rules in the next section.

1

Open the shift

The cashier opens their own shift at their warehouse with a starting float. No open shift, no sale — the till refuses, for every cashier, including Admin.

2

Sell at the till

Scan or search, build the cart, apply a discount, take cash or card. Every line's stock is validated first; the tax rate is snapshotted onto the invoice the sale creates.

3

Return when needed

Invoices are never edited — a return is the correction: items restock, and the refund carries its proportional share of the original discount and tax.

4

Close & reconcile

Closing snapshots the drawer expectation — float + cash sales − cash refunds — next to the counted cash. The difference is on the record, to the cent.

Rules that protect the store

Retail rules general tools handle badly — enforced in code, not in a handbook.

Each rule below is checked in the operations layer and re-checked on the server. The shipped test suites prove every one of them — including replaying the entire movement ledger from zero and matching it against current stock.

✓
The movement ledger is the audit trailEvery stock change writes a movement. Replaying all movements from zero must reproduce current stock exactly — if a change breaks that invariant, it is wrong, and the suites catch it.
✓
Sales are atomicEvery line of a sale or sales order is validated before anything is deducted. One line short on stock refuses the whole sale — no partial deductions, no orphan invoice.
✓
A sale needs the cashier's own open shiftThe shift must belong to that cashier, at that warehouse. Another cashier's shift — or no shift — and the till refuses the sale.
✓
Invoices are permanentThere is no edit or delete for invoices, returns or shifts — for any role. Corrections happen only through the return flow, which restocks and refunds proportionally.
✓
Tax is snapshotted per invoiceThe Settings tax rate is copied onto each invoice at sale time, and one shared totals function computes the register preview and the server's figures — they can never disagree.
✓
Stock rules are structuralSKUs are unique (case-insensitive). A purchase order can be received only once and cannot be cancelled after receiving. Transfers move stock between warehouses without ever changing the total.
— a shift close, as the manager sees it —
SHIFT SH-1001 · closed
Drawer expectation  float + cash sales − cash refunds
Expected            $426.86
Counted             $426.86
✓ Difference $0 — reconciled exactly
— and honestly, when it isn't —
SHIFT SH-1002        overage +$2.50, on the record

The drawer expectation is calculated, never typed.

When a shift closes, StockFlow POS snapshots what the drawer should hold — the float the cashier started with, plus the shift's cash sales, minus its cash refunds — and places it beside the cash that was actually counted. A difference is not an embarrassment to hide; it is a number on a permanent record, which is exactly what a shop owner needs at the end of the day.

  • Printable receipts for every sale and return.
  • One totals function shared by the till preview and the server — the customer never sees a number the server would compute differently.
Inside the product

Every module, on the same live record.

Fourteen screens cover the till and the stockroom. Screenshots below are the real product, captured from the live demo — sign in and you will see exactly these screens with exactly this data.

Module 01 · Dashboard

The store, first thing in the morning.

One screen answers the owner's questions: what the stock is worth, what is running out, and what the till did today.

  • Total products, units and stock value at cost across all warehouses
  • Low-stock and out-of-stock alerts with reorder levels
  • Today at the till — sales, refunds, cash vs card — plus the last 14 days of movements
stockflow pos · /app · dashboard
StockFlow POS dashboard with stock value, alerts and movements
stockflow pos · /app · point of sale
StockFlow POS register with product grid, stock badges and cart
Module 02 · Point of Sale

A register built for speed — and for honesty.

The till shows per-warehouse stock badges on the product grid, so a cashier can see what can actually be sold before promising it.

  • Product grid, category chips and barcode-friendly search
  • Cart with discounts and tax, cash and card payments, printable receipts
  • Every line stock-validated before the sale is recorded — atomically
Module 03 · Shifts & drawer reconciliation

Every cashier accountable for their own drawer.

Shifts tie sales to a person, a warehouse and a float. Closing a shift snapshots its expectation forever — shifts, like invoices, are never edited or deleted.

  • Open with a float; sales attach to the cashier's own shift only
  • Expectation = float + cash sales − cash refunds, computed by the system
  • Differences stay on the record — exact, over or short, to the cent
— Riverside General Store · shift history —
Shifts on record    3 (2 closed · 1 open)
SH-1001              expected $426.86 · difference $0
SH-1002              overage +$2.50
Today's shift        open for the Admin cashier
POS invoices         8 · returns processed 1
✓ drawer reconciles over the API — expected $56.29, difference $0
stockflow pos · /app · products
StockFlow POS products with SKUs, barcodes and per-warehouse stock
Module 04 · Products & inventory

The full inventory core behind the till.

Products carry SKUs and barcodes, cost and sale prices, and stock per warehouse — the same record the till sells from.

  • Categories, warehouses, transfers, suppliers and customers included
  • Low-stock alerts driven by per-product reorder levels
  • Every change writes a movement — the ledger always explains the stock
Module 05 · Sales orders

Wholesale orders, with the same atomic discipline.

Sales orders validate every line before deducting anything — a short line refuses the order rather than half-fulfilling it silently.

  • Customer orders drawn from the same stock as the till
  • All-or-nothing deduction, exactly like a till sale
  • Movements written per line, so the ledger tells the whole story
stockflow pos · /app · sales
StockFlow POS sales orders
stockflow pos · /app · purchases
StockFlow POS purchase orders and receiving
Module 06 · Purchases

Stock in, under control.

Purchase orders bring stock in from suppliers — received exactly once, so a double delivery can never double the stock.

  • Receive once only — a second receiving is refused
  • No cancelling after receiving — the record stands
  • Supplier records kept with the orders they fulfilled
Module 07 · Returns & refunds

The only way history gets corrected.

A return references the original invoice: the items go back into stock, and the refund returns each item's proportional share of the original discount and tax — the invoice itself is never touched.

  • Restock on return, with the movement written to the ledger
  • Proportional discount & tax shares — the refund maths is the sale maths, reversed fairly
  • Cash refunds reduce the drawer expectation of the open shift
— stock value by category · demo store —
Electronics         $16,662.70
Kitchen & Dining    $7,673.30
Office Supplies     $6,814.75
Tools & Hardware    $6,169.00
Furniture            $3,273.00
TOTAL AT COST       $40,592.75
✓ categories sum exactly to the stock value
stockflow pos · /app · reports
StockFlow POS reports with CSV exports
Module 08 · Reports

The numbers, exportable.

Reports draw from the same ledger and invoices — never from a separate tally that could drift.

  • Sales, stock and movement reports with CSV exports
  • Stock value by category, reconciling to the cent
  • Settings (Admin only) — tax rate, store details, demo reset and erase
Roles & security

Two roles. Enforced on the server, not just hidden in the UI.

Permissions are checked twice: instantly in the browser for feedback, and again on the server for every request, against a single route access table. A button the Staff account cannot see is also an operation the server will refuse — 403, with nothing changed.

LIVE IN DEMO

Admin

The owner's account. Full control: every module, deletes (where the guards allow them at all), Settings and staff accounts. The demo sign-in is tap-to-fill.

LIVE IN DEMO

Staff

The shop-floor account. Runs the trading day — till, shifts, products, orders and returns. No deletes and no Settings: the server returns 403, and the attempt changes nothing.

scrypt

Hashed passwords

Passwords are scrypt-hashed on the server. The browser only ever carries public profiles — no hash material appears in any payload, proven in the API suite.

401 · 403

Route access table

Every API route declares its access rule in one auditable table. No token → 401. Wrong role → 403. An operation outside the allowlist → refused outright.

429

Sign-in rate limit

Repeated sign-in attempts are rate-limited, valid credentials included, so password guessing is not a viable attack.

0

Secrets in client code

No demo passwords, no credential checks, no hash material anywhere in the client source — the test suite scans for exactly that.

Product tour

Every screen, ready today.

The screens of the demo store, Riverside General Store, exactly as they appear in the live demo. Pick a screen — or open the demo and walk through them yourself.

StockFlow POS dashboard
Dashboard/app · dashboard
StockFlow POS point of sale
Point of Sale/app · point of sale
StockFlow POS products
Products/app · products
StockFlow POS sales orders
Sales/app · sales
StockFlow POS purchases
Purchases/app · purchases
StockFlow POS reports
Reports/app · reports
Under the hood

A clean React + Node.js codebase you can host anywhere.

All business logic lives in one operations layer of pure state functions. The React client talks only to the API, and the same API core powers every deployment — self-host it and it is yours: no per-seat fees, no subscription, no lock-in.

Front endReact 18 + Vite + Tailwind CSS — pages, components and a client store that talks only to the API; if the API is unreachable the app shows a clear server-unavailable state instead of inventing local data
BackendNode.js + Express API — a single route access table guards every endpoint; business operations replay on the server before they are recorded. The same core also ships as a serverless function
DataA single JSON data store per installation, with a SQL schema mirror of the same model included for a database swap
HostingAny Node.js server, or serverless — this live demo runs on Cloudflare with the same API core
Testing157 automated checks ship with the product: 92 headless logic checks (the movement-ledger invariant, POS money maths, shift reconciliation, atomic sales, return refunds) and 65 HTTP API checks (auth, cross-role refusals, the full shift → sale → return → close flow, rate limiting)
Demo dataThe fictional Riverside General Store — 20 products, 5 categories, 2 warehouses, a 76-entry movement history, 3 shifts and 8 POS invoices — built by running the real operations, never hand-written totals
Honest scope: StockFlow POS is a point-of-sale and inventory record system. Cash and card tenders are recorded at the till — card payments are recorded, not processed, so pair it with your own card terminal for processing. It is not an online store or a payment gateway. What it promises, the test suites prove.
What is included

Nothing compiled. Nothing obfuscated. Everything documented.

01

100% source code

The complete React client and Node.js API — every page, the operations layer, the route access table and the seed builder.

React clientExpress APIOperations layerSeed builder
02

Demo dataset & accounts

The Riverside General Store dataset plus two demo accounts (Admin and Staff) that exist only in demo mode. Production installs create their first Admin from environment variables — no demo accounts exist there.

20 products2 warehouses3 shifts2 demo roles
03

Tests & verification record

Both suites ship in the package and re-run with two commands. The verification record documents exactly what was run against this build and what it proved.

92 logic checks65 API checksVerification record
04

Documentation

Setup guide, the security model with the full route table, the data model, and a guide written for AI coding tools so the codebase stays easy to extend.

HowToSetupSecurity modelData modelAI-tools guide

Run a till your stock can trust.

The live demo is the real product with demo data — sign in with a tap, sell from the open shift, process a return and close the drawer. Then read the source and run the suites yourself.

▶ View Live Demo See the screens
GETTING STARTED · 4 STEPS
  • 1Install the dependencies — npm install
  • 2Build the client — npm run build
  • 3Start the server in demo mode — DEMO_MODE=true npm start
  • 4Sign in with a tap-to-fill demo account and open the till