Skip to content
LEX
Keyboard: press / or Command K to ask or jump, backtick to open the terminal.

LEX · the pass

Order ticket

Ticket

#

From
Time
Order

Fire it

EN · DE · ES

Back to the Lab

Hospitality01 / 12

Enigma

A restaurant operations platform for several venues under one account

Status
In development
Period
2026 →
Role
Design and development, end to end
For
Independent restaurant groups that operate more than one venue.
Enigma Console · ReservationsDemo environment — sample data
Enigma console, Reservations: a top-down 2D floor plan of the upper floor with the dining room and a long terrace; each table carries a label such as “S3 Libre”. Service times run down the left.

Floor plan · 2D

The live room from above: every table, its number and its state, floor by floor.

1 of 3
How allocation works (simulation)An interactive model of the idea — open to try it.

Simulation — illustrates the idea; not the production engine.

Table allocation, step by step

INSIDETERRACET1✕ 2T22T3✕ 4T44T56T62T7✕ 2T82T94T104
  • Free
  • Busy for this request
  • Allocated
Party size
2 guests
Preferred zone

Result

Choose a party size, time and zone, then request a table.

Occupancy

Problem

Restaurants run on a patchwork of tools for bookings, floor, staff and billing, and each one knows only a slice of the shift. Rules such as labour law or allergen handling end up living in people's heads.

Enigma runs the daily operations of restaurants: reservations, table allocation, staff scheduling, payments, invoicing, loyalty, ordering and a shop. It started as the website of a restaurant in Calpe, Spain, and grew into a platform meant to become multi-tenant SaaS.

Case study

The platform covers one account with several venues. Reservations and availability run through allocation engines that decide which table fits which party and when. Staff planning applies labour-law rules, and payments, invoicing (Veri*factu) and wallet passes sit next to loyalty and ordering.

It is a workspace of nine apps (API, assistant, console, menu, team, terminal, shop, web and worker) built on roughly forty-five shared packages. The aim is a single base that can later serve many restaurant businesses without a rewrite.

Architecture

Every operation passes through one kernel dispatcher. Package layering is enforced by dependency-cruiser, authentication is an OAuth 2.1 server with EdDSA-signed JWTs and a JWKS endpoint, and permissions are server-driven RBAC with venue-scoped deny overrides. The stack runs in Docker Compose with Postgres, Caddy, Gotenberg and a Cloudflare Tunnel, and exposes MCP surfaces.

Engineering decisions

  1. One dispatcher as the choke point, so auditing, permissions and rules are applied in a single place.
  2. Layer boundaries checked by tooling, not by convention.
  3. Server-driven RBAC with venue-scoped deny overrides, so one account can hold many venues safely.
  4. Built for one account first, with the data model kept ready for multi-tenant SaaS.

Challenges & trade-offs

Keeping nine apps and dozens of packages coherent while the rules of a real restaurant keep changing. The dispatcher and the enforced layering exist to make that growth safe.

Verified results

  • ≈2,070 commits
  • ~1,950 test files
  • 9 apps and ~45 packages in one workspace

Status labels are factual: nothing here is presented as more finished than it is.

Stack

Ask or jump

Type a question or a name. Navigation is deterministic — no chatbot.

Press / or ⌘K