← all projects
App 2026

karots-pos

Production point-of-sale for a Sri Lankan shop — a cashier terminal and an admin panel that compile to a single static Go binary.

1 binary
deploy artifact
Postgres only
runtime deps
cashier + admin
surfaces
phone + PIN
auth

// problem

A retail shop needed a point-of-sale that a non-technical owner could deploy and a cashier could run on cheap hardware — without a Node runtime, a build step on the box, or a stack of services to keep alive.

// approach

I built it in Go with Echo, embedding everything — HTML templates, CSS/JS (HTMX, Alpine, Tailwind, JsBarcode) and DB migrations — via go:embed. The result compiles to a single static binary; deployment is the binary + a .env + a Postgres, nothing else.

One server routes each user to the cashier terminal (sell, scan, price/stock checks) or the admin panel (catalog, inventory, sales, purchasing, finances) based on role, authenticated by phone number + PIN. HTMX keeps it snappy without a SPA build.

// outcome

Operationally trivial to ship and update — copy one binary. The embedded-asset approach removed the entire class of "works on my machine" deployment bugs and made the POS runnable on hardware as modest as the shop already owned.