Under the hood · for the ones who look

Built like infrastructure.
Not like an app.

Everything else on this page is written for the person at the counter. This part isn’t. It’s for the one deciding to move a business — yours, your family’s, your company’s — off a twenty-year-old ERP. Look closely.

01 · Tenancy

One database per shop. Not a column in a shared table.

Every shop runs on its own isolated SQLite database at the edge, provisioned through Workers-for-Platforms. A thousand shops is a thousand databases — there is no query that can join across them, because there is no shared table to join. Isolation by architecture, not by a WHERE shop_id = someone hopes nobody forgets.

  • Workers-for-Platforms
  • D1 · SQLite
  • 1 DB / shop
02 · Compute

Serverless, at the edge. No back-room PC, no LAN, no dealer.

The whole thing runs as stateless functions on Cloudflare’s edge, in the data centre nearest your counter — not on a Windows box wired to the shop’s network. Nothing to install, nothing to back up by hand, nothing that dies when the back-room PC does.

  • Cloudflare Workers
  • Hono
  • edge
03 · The agent

Pia is an LLM agent whose permissions the model can’t touch.

Authorization is deterministic, decided by a code layer the model cannot reason its way around — the tool list is filtered before the model ever sees it, and the data boundary re-checks on the way out. Prompt injection buys an attacker nothing, because the prompt was never where the rules lived.

  • deterministic authz
  • dual-gate
  • tool-availability filter
04 · Durability

Long jobs survive restarts, retries, and a dropped 4G mid-receipt.

Receipt OCR and shop onboarding run on durable execution — each step is checkpointed, so a server restart, a transient failure, or a phone that loses signal halfway through a scan doesn’t lose the work. It picks up exactly where it left off and finishes.

  • Durable Execution
  • Workflows
  • idempotent steps
05 · Custody

A stolen phone is dead in seconds — not at end of day.

Every login passes platform integrity attestation; a per-user session authority (a strongly consistent Durable Object) holds the kill switch. Revoke a device, fire an employee, or change a role and the session is denied on the very next request — independent of how long the token had left.

  • Play Integrity
  • App Attest
  • per-user session DO
06 · Interface

The screen is rendered from the server’s intent, not hard-coded.

Server-driven UI means every role on every ₹10,000 phone gets the same correct surface, and a change ships without waiting on an app-store review. One React Native codebase covers web and Android; the worker and the owner see the same Pia, calibrated to each.

  • server-driven UI
  • React Native
  • web + Android
07 · The ledger

Append-only. Every change stamped, attributable, exportable.

State changes land in an immutable event log — who, what, when, signed. Nothing is edited in place, nothing happens off the record, and the whole trail exports in one click for a CA who wants to audit a quarter. Your books are a fact, not a screenshot.

  • append-only event log
  • signed
  • one-click export
08 · Performance budget

The target device is a ₹10,000 Android on patchy 4G.

First paint under two seconds, no blocking work on the paths that matter, offline-tolerant by design. The fast path isn’t a flagship phone on office Wi-Fi — it’s a Tier-3 town at the back of the shop. If it doesn’t run there, it doesn’t ship.

  • ₹10k Android
  • <2s first paint
  • offline-first

An ERP from 1992 can’t grow into this — it has to be left behind. The same code and the same guarantees run your one counter or ten thousand. Read the security posture · read the full technical audit.