workbenchcapacity engine Platform / Capacity Checking…
Demo 2 · Capacity engine

A spin studio, a padel club and a project office on one engine.

Two primitives cover all three: interval claims (one bike or court, exclusively, for a time range) and quantity claims (hours from a person per week). Postgres refuses a double booking with 23P01 and an over-allocation with P0001.

Owner and staff

Staff calendar

Week views per business, themed with each business’s palette.

  • Spin Mitte: bikes × classes, floor plan per class
  • Padel Ost: courts × time, 90 minutes in 30-minute steps
  • Nordwerk: people × weeks with an allocate form
  • Try “Book anyway” on a taken bike and allocate 20 backend hours twice
Open staff calendar →
Customers

Booking page

Only free slots. Pick a day, a class or start time, then a bike or court on the floor plan, and hold it while paying.

  • Hold with a countdown (15 minutes at Spin Mitte, 10 at Padel Ost)
  • “Continue to payment” hands the claim to the Checkout demo
  • Open the staff calendar in a second tab: the hold shows up there
Open booking page →

Jump to a business

Spin Mitte · staff Padel Ost · staff Nordwerk Projektbüro · staff Spin Mitte · booking Padel Ost · booking

How it runs

ModeReadsWrites
Live (runtime + Supabase)/api/capacity/… → capacity RPCsRPCs with the secret key, server side
Runtime without SupabaseSeed businesses + seeded claims, computed with engine.jsAPI answers 503; the page keeps claims in this browser
Static filesengine.js in the page with the seedsClaims in this browser (localStorage, synced between tabs)