← All work
Project

Post-POS

A browser point of sale: register, customer display, WebUSB receipt printing and till reconciliation, with generated product photos and voice checkout.

2026 Maturity: In development

Post-POS (its interface also calls it ApexPOS) is a point-of-sale and back-office app for a small café, built on Next.js 16, React 19 and Tailwind v4. A cashier can ring up an order by tapping products or by saying something like "two cold brews with oat milk and no ice". Checkout writes a real order, and the reporting and alert screens are computed from those orders. Much of the work is also the record of a domain getting fixed: each rule documents the wrong result it replaced, from tax that didn't reconcile to croissants that picked up a "Toasted" modifier.

Post POS register with a dark sidebar, a grid of cafe products with stock counts, and a cart panel totaling 38.68 dollars.
The register in demo mode: a six item cart with 8.25 percent tax, an upsell pairing and one tender button. Product art is the generated placeholder tier.
Menu Engineering Matrix with four colored quadrants, Stars, Plowhorses, Puzzles and Dogs, each listing cafe items with units sold, food cost and margin.
The menu matrix sorts items into four groups against the menu's own medians for volume and margin. Sample sales and costs.

What it does

The register is a product grid with stock badges and a cart. Above it is a command bar ("Speak or type voice command") and a row of example chips. A spoken or typed phrase becomes cart lines. Quantities and modifiers such as Oat Milk, No Ice or Extra Shot show up as tags on each line. The same drink with different modifiers stays on its own line. "Remove muffin" takes off the newest matching line, and "checkout with card" opens tender. Collect Tender posts the cart to the server, which creates an order with tax and a stock decrement and returns an order number.

Around the register sit the manager screens: cash drawer and till reconciliation, catalog and inventory, orders and refunds, sales reports, an Intelligence briefing, a menu-engineering matrix, labour clock-ins, a CRM with RFM guest segments, and a settings page. A customer-facing display mirrors the cart. A command-line tool covers the same domain from a terminal: catalog, orders, drawer, batch image rendering and voice-intent parsing.

How it works

Storage sits behind one interface with two backends: an in-memory store for demos, and Postgres when a database is configured. Validation, tax and refund limits live above that interface, so both backends follow the same rules. Every request body is validated against a schema. Sessions are signed and kept in an httpOnly cookie, PINs and passwords are hashed with scrypt, and logins are rate-limited.

Voice runs in two stages. A phrase first goes to a small local language model, with a five-second timeout. If that fails, a pattern engine in the browser handles it. It matches modifier phrases longest first, on word boundaries, one per group (ice, milk, foam, sweetness), and removes each match from the phrase. What remains is matched against the catalog by whole words, ignoring plurals, and nothing is added if fewer than half the spoken words match.

For product images, the app builds a prompt from camera angle, lens and lighting presets and sends it to a local image model, with a 60-second circuit breaker to stop repeated timeouts. When the model isn't reachable, it draws hand-built SVG illustrations per product type (cold brew glass, croissant, muffin). Those are the images in the demo. Batch renders are queued with retries. Generated text is still a placeholder.

The hardware support is real. Receipt printing builds ESC/POS printer commands by hand (alignment, bold, double height, a full paper cut, a cash-drawer kick) and sends them over WebUSB, and a USB barcode scanner is read from its fast bursts of keystrokes.

What's notable

  • Voice ordering that won't invent items. A September fix replaced substring matching with whole-word matching. The old version rang up a made-up $4.99 "custom" item when nothing matched. Voice matching, modifiers and checkout each have their own tests, and "checkout" only opens tender when the phrase is nothing but a checkout.
  • Reporting rules that hold up on real data. The menu matrix compares each item to the menu's median instead of fixed cutoffs. It also refuses to call an item that sold nothing "popular", which would otherwise happen when most of the menu has zero sales. The briefing treats labour-to-sales as undefined when there were no sales, instead of reporting 0%.
  • Receipts printed from data. The receipt works out the tax rate from the order's own numbers and prints each line's modifiers. The printer is always released, even when a print fails.
  • One app, two storage modes. The same interface and rules run on the in-memory demo store or on Postgres. 27 test files run against the shared storage contract, auth, refunds, drawer math and more.

In the demo

The register loads with the illustrated catalog. The "2 Cold Brews with Oat Milk & No Ice" chip adds two cold brews tagged with both modifiers. A typed "one matcha latte with oat milk" adds a matcha with an Oat Milk tag. A croissant is tapped in and the muffin chip adds a muffin. Collect Tender, then Credit / Debit Card, completes the sale with an order number. New Transaction clears the register. Reports shows the updated gross sales, order count, category split and top sellers, and the Intelligence page shows the shift briefing and its alerts.

State

Work started on 14 August 2026, mostly on 14 and 15 August, with voice-matching fixes in late September and an auth hardening pass on 15 October. The recording ran on the in-memory store with no local model, so voice went through the pattern engine. It didn't show the customer display, printing, real microphone input, AI image or copy generation, or the menu matrix, which stays empty until item costs are entered. The demo also surfaced two bugs. Server-side checkout reads a tax value of 8.25 in the wrong unit, so a $24.90 register total comes back as a $23.02 receipt. And the upsell card's Add Pair button looks for a croissant that doesn't match the catalog's, so it does nothing. Some of the "intelligence" pieces, such as generated text and the sample menu-intelligence rows, are still placeholders.