CRM & SaaS development

POS Software Development for Gaming Cafes

What goes into POS software development for gaming cafes: live machine sessions, touch billing, prepaid wallets, FIFO inventory, cash drawers and reports, based on the HNEFA build.

By Devang GandhiUpdated Nov 3, 20268 min read

Gaming cafes are a tough fit for off-the-shelf billing tools. They sell time on PCs and consoles, snacks and drinks, prepaid recharges and bookings, often all on one bill. That is why POS software development for this niche is less about a pretty till and more about a reliable engine for sessions, money and stock.

I contributed to HNEFA, a gaming cafe POS and ERP built with the Exlaso team. This post breaks down the pieces a real gaming cafe POS needs, the architecture decisions that kept it accurate, and the mistakes worth avoiding if you are planning your own build.

TL;DR

A gaming cafe POS combines a realtime machine floor with timed sessions and a retail till. The hard parts are accurate session billing, wallet balances that never drift, FIFO stock costing, cash drawer reconciliation and tax reports. HNEFA solved these with Next.js, TypeScript and Supabase Postgres using RPCs, row-level security and realtime updates.

key takeaways

  • A gaming cafe POS is really two systems: a realtime session engine for machines and a retail till for snacks and recharges.
  • Wallet balances should be computed from transactions by the database, never stored as a column that can drift.
  • FIFO inventory batches give accurate cost of goods, which is what makes the P&L report trustworthy.
  • Row-level security in Postgres keeps multi-tenant data isolated even if an API bug slips through.

What a gaming cafe POS actually has to do

Before writing code, list the jobs the counter staff do in a shift. For a gaming cafe, it looks like this:

Job What the software must handle
Start a session Pick a machine, pick a rate (hourly, package, member), start a timer visible to everyone
Extend or end Add time, switch machines, stop and price the session correctly
Sell snacks Touch grid of products, quantity, add to the same bill as the session
Take payment Cash, card, UPI, split payments, prepaid wallet
Bookings Reserve machines for a time slot without double booking
Shift close Count cash by denomination, compare against expected, record variance
Stock Purchases, returns, current stock, reorder visibility
Reports Day summary, P&L, GST/HSN tax, cash, stock

Every row in that table is a place where money can quietly leak. A session that keeps running after the customer leaves, a snack that never hits the bill, a cash count nobody checks. Good POS software makes the leak visible.

The realtime machine floor

The machine floor is the screen staff stare at all day. Each PC or console shows its state: free, in session, booked, or offline, with time remaining. When one cashier starts a session, every other terminal and the owner's dashboard must update instantly.

HNEFA uses Supabase realtime for this. Session rows change in Postgres, and subscribed clients receive the change and refresh their view through TanStack Query. That avoids polling and keeps two cashiers from starting sessions on the same machine.

Price at the end, store the facts

A key design choice is to store session facts (machine, rate plan, start time, pauses, end time) and compute the price when the session closes. Do not keep incrementing a "current amount" field every minute. Computing from facts means you can always explain a bill, and rate rules like "first hour full price, then per 15 minutes" live in one place.

Money that adds up: wallets, cash drawers and payments

Prepaid wallets computed by the database

Regulars top up wallets and play against the balance. The tempting design is a balance column you increment and decrement. It works until a network retry double-applies a top-up or a failed transaction leaves a partial update. Then the balance is wrong and nobody can say why.

In HNEFA, wallet balances are computed by database functions from the underlying transactions rather than stored as columns. The ledger is the truth, and the balance is always derivable. Postgres functions (exposed as Supabase RPCs) do the work close to the data, so the calculation is fast and the same for every client. The Supabase database functions docs are a good primer on the pattern.

Cash drawer with denomination counting

At shift close, staff count notes and coins by denomination. The POS multiplies, totals and compares against expected cash from the shift's cash payments. The variance gets recorded against the shift. This one feature changes behavior at the counter more than any report, because everyone knows the count is checked.

Thermal receipts

Customers expect a printed receipt. A browser-based POS can print to standard thermal printers with a receipt-width print stylesheet, keeping the layout tight: business details, items, session duration, taxes, payment mode.

Inventory and reports owners trust

Snacks and drinks look trivial, but they decide whether the P&L is real. HNEFA tracks inventory in FIFO batches: each purchase creates a batch with quantity and unit cost, and sales consume the oldest batch first. That gives true cost of goods sold even when supplier prices change month to month. Purchases and returns adjust batches rather than overwriting a single stock number.

With sessions, sales, wallets, purchases and cash all in one Postgres database, reports become queries. HNEFA ships around 15, including:

  1. Day summary for the shift and the day
  2. Profit and loss using FIFO cost
  3. GST and HSN tax summary for filing
  4. Cash report reconciling drawer counts
  5. Stock report with current batches

Because these run as SQL close to the data, numbers match across reports. If the day summary and the tax report disagree, owners stop trusting both.

Multi-tenancy, roles and safe change

HNEFA is multi-tenant: many cafes run on one deployment. Isolation is enforced with Postgres row-level security per tenant, so a query can only ever see rows for the user's tenant. RLS is a second wall behind your API checks; even a buggy endpoint cannot leak another cafe's sales. See the PostgreSQL row security docs for how policies work.

Roles are super admin, admin and cashier. Cashiers can run sessions and bills but cannot edit prices or see the P&L.

Schema changes are frequent in a POS as owners ask for new reports. HNEFA has 47 versioned SQL migrations, validated in CI, so every change is reviewed and replayable. Playwright end-to-end tests cover critical flows like starting a session and closing a bill.

How I built this in practice

HNEFA was built with the Exlaso team, and I contributed to it as a developer. You can see the scope in the HNEFA case study. The stack is Next.js with TypeScript on the front end and Supabase for Postgres, RPCs, row-level security and realtime, with TanStack Query managing client state.

The product covers the live machine floor with realtime timed sessions, bookings, touch POS billing for sessions and snacks, cash, card and UPI payments, a cash drawer with denomination counting, prepaid wallets computed by database functions, FIFO inventory batches, purchases and returns, around 15 reports and thermal receipt printing. Deployment runs on Coolify with Nixpacks, and the 47 migrations plus Playwright e2e tests run in CI before anything reaches a cafe.

Common mistakes

  • Storing a running wallet balance as a column instead of deriving it from a transaction ledger.
  • Updating a session amount every minute instead of pricing from start, pause and end facts.
  • Tracking stock as a single number, which makes cost of goods and P&L guesswork.
  • Relying only on API checks for tenant isolation with no row-level security behind them.
  • Skipping the denomination-based cash count at shift close.
  • Changing the production schema by hand instead of through versioned migrations.

keep reading

FAQ

How much does custom POS software development cost?+

A focused POS for one business type typically runs from a few weeks for a billing-only MVP to several months for sessions, inventory, wallets and full reporting. The biggest cost drivers are hardware integration, offline needs and the number of reports.

Can a web-based POS print thermal receipts?+

Yes. A browser POS can print to 80 mm or 58 mm thermal printers using a receipt-sized print layout, and it can open a cash drawer that is connected through the printer.

Why not just use an off-the-shelf POS for a gaming cafe?+

Generic retail POS systems do not understand timed machine sessions, per-machine pricing, bookings or prepaid playtime. Cafes end up running a separate timer app and reconciling by hand, which is where revenue leaks.

Should a multi-location POS be multi-tenant?+

If you plan to sell it to more than one business, yes. Build tenant isolation into the database from day one, because retrofitting it after launch means touching every query and report.

Devang Gandhi

AI & full stack developer at Passdn, building CRMs, SaaS, AI agents and Flutter apps for clients in the US, UK, Australia, UAE and India. More about me

Read next

More in CRM & SaaS development