Projects

META Gaming PubGaming pub and restaurant · Bagheria (Palermo), Italy2026

A loyalty card where the points are counted by the server, not the phone.

META Fidelity is META Gaming Pub’s loyalty platform: the customer app installs from the browser, staff work from a panel, and the venue’s menu has been rebuilt inside it.

Antonio Murabitowith M’s Works, before Certalea
The staff panel with the customers on a computer, and the loyalty app home on a phone, with made-up data
Made-up data, from a local copy of the app.
Before

The venue already took orders at the table through a QR menu built with M’s Works, and wanted to reward people who come back, with points for spending and for hours of play.

What we did

A loyalty app that installs from the browser, a staff panel and the menu rebuilt inside the same platform, with one shared order across the phones at a table.

After

Live at fidelity, admin and menu.metagamingpub.it. The switch from the menu in use happens on a day the venue is closed.

01

The problem

META Gaming Pub, in Bagheria near Palermo, is a cellar, pub and games room. Since 2025 its tables have ordered from a menu that opens with a QR code, built with M’s Works, and the kitchen works from it: by August 2026 it had taken 2,003 orders.

The venue wanted a loyalty card on the phone. One point per euro, five per hour of play, six levels, badges to collect and to buy, and a yearly membership.

To award points on orders, the loyalty platform had to know what each table orders. In August Antonio decided to rebuild the menu inside the platform: from then on the platform also carries the kitchen’s orders, and has to hold up through every evening’s service.

02

What made it hard

A points card is simple until the points are worth something.

  1. A menu that can’t stop. The kitchen works from the menu in use. Touching it to connect the loyalty platform meant changing live tables during service.

  2. Ordering only from the venue. An order has to come from a table in the venue. And the venue has no fixed internet address to recognise.

  3. Points that are worth discounts. If a staff member can credit points to themselves, or get an order cancelled and keep the points, the card becomes a hole in the till.

  4. Leaderboards the phone mustn’t decide. In the app’s arcade, a score sent by the phone can be faked in a minute.

  5. One table, several phones. People at the same table need to see what the others pick, without sending the same dish twice.

03

The choices

For every problem there was a more obvious route. Here is what we did instead, and why.

A

The new menu next to the old one

The obvious road

Connect the loyalty platform to the menu in use, changing it while the venue works.

What we did

The menu is rebuilt inside the loyalty platform, on a separate schema of the same database. The one in use isn’t touched, and is switched off in one go on a day the venue is closed.

Why. Throughout development the risk to the kitchen’s menu is zero, and the new one can be tried on real data, in parallel.

The technical detail

The two schemas (public for the menu in use, fidelity for the new one) live side by side in the same Postgres. The configuration migrates, about 450 rows of catalogue, tables, stations and settings. At the switch the old application has to be shut down completely: left on, it would keep writing and the two systems would drift apart silently.

B

The venue’s network, plus a secret

The obvious road

Accept orders only from the venue’s internet address.

What we did

The QR codes point to a device on the venue’s network, unreachable from outside. It acts as a Reverse proxyA device that receives requests on behalf of the server and passes them on, adding or checking something. and adds a secret: without it, the server rejects the order.

Why. The venue’s address changes on its own, and a check on it can be bypassed. The private address says where you are, and the printed QR codes already pointed there.

The technical detail

The secret is compared in constant time, on the first line of every action that writes. With no secret configured, orders are rejected: that way a forgotten variable shuts the door instead of opening it. Tested on 11 August 2026: the same order replayed without the header is rejected and creates no order; with the header it goes through and gives 8 points.

C

Nobody gives themselves points

The obvious road

A “credit points” permission for floor staff, with a log of who used it.

What we did

No operator, not even the administrator, can give themselves points, hours of play or badges. Cancelling an order takes back the points it gave, in the same operation.

Why. An exception with a reason gets bypassed by writing a reason. Asking a colleague costs little, and it stays on record with both names.

The technical detail

The refusal sits in the service and doesn’t look at the role. Hours of play are capped at 6 per person per evening, loaded once. The reversal of a cancellation is a single movement per card (<order>:cancel, unique in the database), and never takes the balance below zero.

D

The server works out the score

The obvious road

The phone sends the score at the end of the game, and the server saves it.

What we did

Every game opens on the server with a random seed. The phone records only the inputs, and at the end the server replays the game and keeps the score it gets.

Why. A score sent by the phone can be typed in by hand. A Replayed gameThe phone sends only the inputs given during the game, and the server plays it again from the start to know the real score. gives the real result, or nothing.

The technical detail

The engine steps at a fixed rate (1/60 s) and is deterministic. The server accepts only if the game ends on the last frame, isn’t faster than the time since it opened, hasn’t expired and uses the same rules version. Capped at 40 games an hour; rejected ones are kept with the reason. Game points aren’t loyalty points and are worth nothing at the till.

04

How it works

The customer app, the staff panel and the menu. The app and panel screenshots come from a local copy, with made-up customers and points.

Screenshots
The loyalty app home: 1,265 points, Gold level, active membership, three badges and the records of three games
Made-up data: Giulia Demo doesn’t exist.
The badges page: two featured, Primo Brindisi and Gettone Inserito, and the collection with five badges
The icons are pixel art, drawn from the panel too.
The staff panel, Customers page: four test customers with level, balance, membership and contacts
Customers, emails and card codes are made up.
META Gaming Pub’s menu on a computer: categories, dishes with photos and prices, and how to order
The menu rebuilt inside the loyalty platform, with the three steps to order from the table.

The card, offline too

In the customer app the card with its code opens even without a connection. It installs from the browser, as an Installable web appA website you add to your phone’s home screen and open like an app, without going through the stores..

Shared order at the table

Phones at the same table see what the others pick. The same dish added by someone else in the last 30 seconds gets flagged, and two sends make a single order.

Order board

A public page for the screens in the room: order code and status, with no table, names or amounts.

The database defends itself

The app uses a role with only the permissions it needs, Row Level SecurityA check inside the database that decides who can read and write the rows of a table. is on for every table and the balance can’t go below zero.

What changed

38/38

loyalty tables with Row Level Security on, and the app connected through a role that can’t see the rest of the database.

In practice: if the database password ever leaked, it wouldn’t open the menu in use or the games library.

Checked on the database on 3 October 2026, after a dry run in a transaction (the project’s D-055).
0

orders created by the same order replayed from outside the venue, without the device’s secret.

Test of 11 August 2026: the request captured from the browser and replayed was rejected (the project’s D-048).
  • Live at three addresses: the customer app, the staff panel and the menu.
  • The menu in use was never touched during development.
  • The switch from the menu in use happens on a day the venue is closed, with the old one shut down.
06

Fact sheet

Client
META Gaming Pub
Sector
Gaming pub and restaurant, Bagheria (Palermo)
What it is
Installable loyalty app, staff panel and menu with table ordering
Year
2026
Live at
fidelity.metagamingpub.itadmin.metagamingpub.itmenu.metagamingpub.it
Status
Live; customers start using it after the switch from the menu in service
Built with
Next.jsTypeScriptPrismaPostgreSQLSupabaseBetter AuthStripeBun
Who did it
Antonio Murabito with M’s Works, before Certalea
07

If you have a similar job

Three questions to ask yourself before talking to anyone about it, us included.

  1. Can the system you’re about to replace stay on while you build the new one?Two systems side by side on the same database cost less than an evening with the kitchen stopped.
  2. In your business software, who can give themselves points, discounts or credit?If the answer is “whoever has the permission”, the permission alone isn’t enough.
  3. If the points are worth something, who works them out?Whatever the phone works out can be faked. The sums belong where the customer can’t reach.
Book a call

We reply within 24 hours. The first call is free.

Want to reward people who come back, without opening the door to cheats?

In the first call we start from how the floor and the till work today. If a simple points card will do, we’ll tell you.

“If opportunity doesn’t knock, build a door.”

Milton Berle