The business server
Each business runs one server on its local network. ServerDB, a PostgreSQL 19 database, is the single source of truth. Server.Service is the registers' gRPC gateway: every operation goes through this proxy, which checks and records it. Admin configures the business, and Reports shows the numbers. PostgreSQL also supplies the time zone rules: the server passes them to the registers, and the software never contradicts the database.
The Internet is only used for card payments (from the terminal straight to the processor) and software updates.
- Register → Server.Service → ServerDB
- Register → ServerDB: never, no password on a register
- Register → Server.Service → ServerDB
- Register → ServerDB: never, no password on a register
The register
A register has three parts, running natively on its machine: the screen, written in any language; Intelligence, which holds the sales engine, business modules and extensions; Communication, which holds the local SQLite copy, the outbox and the sync.
On a Windows register that drives a thermal printer or a cash drawer, the program can link the libraries in process: a single process, with no local network hop and the same rules.
Offline first
At startup, a register drains its outbox to the server before anything else, so that an update never overwrites unsent sales. With the Offline module, when the server cannot be reached, the register sells from its local copy.
A register left open watches its connection. If the link is cut, silent or very slow, or if the server restarts or PostgreSQL stops, the register switches to its local copy, tells the screen and switches back by itself. On the server side, a database outage does not stop any service: each one waits for the database to return, then resumes.
A finalized sale waits in the outbox. Since it is already paid, it is not refused for a business reason: anything that cannot be verified is recorded for review, with its reason.
Stock and limited seats are held on the server: online, two registers never sell the same seat.
- Drain the outbox3 sales sent to the server
- Read the server versiona new image is available
- Updatenothing unsent left to lose
- Sellonline, or from SQLite if the server is down
Stock and limited seats are guaranteed online only.
- Drain the outbox3 sales sent to the server
- Read the server versiona new image is available
- Updatenothing unsent left to lose
- Sellonline, or from SQLite if the server is down
Stock and limited seats are guaranteed online only.
The contract
Screens use the stilldeep.v1 gRPC contract: sales, catalog, members, reservations, appointments, rentals, inventory, shifts, reports and configuration.
Version 1 never receives a breaking change; a version 2 would live in its own namespace. Amounts are integer cents, percentages are millionths (100% = 1,000,000), quantities are thousandths.
service SalesService {
rpc CreateCart(CreateCartRequest) returns (CartResponse);
rpc AddItem(AddItemRequest) returns (CartResponse);
rpc FinalizeTransaction(FinalizeRequest)
returns (TransactionResponse);
}
message Money {
int64 cents = 1; // never a float
}- Sales
- Catalog
- Member
- Card
- Device
- Event
- Receipt
- Shift
- Appointment
- Rental
- Inventory
service SalesService {
rpc CreateCart(CreateCartRequest) returns (CartResponse);
rpc AddItem(AddItemRequest) returns (CartResponse);
rpc FinalizeTransaction(FinalizeRequest)
returns (TransactionResponse);
}
message Money {
int64 cents = 1; // never a float
}- Sales
- Catalog
- Member
- Card
- Device
- Event
- Receipt
- Shift
- Appointment
- Rental
- Inventory
Technology
.NET 11 and C#, PostgreSQL 19, SQLite, Blazor for the web apps, gRPC over HTTP/2, OpenTelemetry for logs, metrics and traces.
Every component runs on Windows, Linux and macOS and follows the twelve-factor app principles.
Twelve-factor: configuration by environment, logs on stdout, health checks, clean shutdown.
Twelve-factor: configuration by environment, logs on stdout, health checks, clean shutdown.
The feature overview shows how this architecture supports sales, inventory and the other tasks your screens can use.
What is delivered
- Database, sales engine, offline sync and outbox.
- Database proxy for registers.
- gRPC contract and example clients.
- Admin and Report web apps.
- Receipts, printing, receipt designer, signed offline codes.
- Print channel per kind of register, sale emails by template, discount equal to the tax amount.
- Apple Wallet and Google Wallet components.
- Transport module: network, price grid, station desk, kiosk, ticket website, station boards, train store, on-train server, ticket check on a tablet, estimated train position, departure and arrival time zones on the ticket.
- Extensions and signed extension registry; presence and integrity of extensions: list on the register, reinstall, refusal to start, security incident.
- Shift inactivity timeout and a pause that cancels the sale in progress, on .NET registers linked in process.
- Time zones: PostgreSQL as the only source, register zone at the console, update alert.
- Recovery after an outage: partial link, server restart, PostgreSQL stopped.
- Given-up messages and redelivery from the Admin.
- Reservations, appointments, rentals, limited resources.
- Signed activation of the account's modules.
- AI assistant module, on the business's own network.