Communitygithub.com

timerise-ai/booking-kiosk

Agent Skill: build a self-service touchscreen booking kiosk — seven-step walk-up flow, on-screen keyboard, inactivity auto-reset, server-priced bookings with capacity transactions and stock locks, pay-at-counter or pay-by-QR, live availability refresh, LAN offline failover, find-my-booking edit — in Next.js App Router, backend-agnostic

Was ist booking-kiosk?

booking-kiosk is a Claude Code agent skill that agent Skill: build a self-service touchscreen booking kiosk — seven-step walk-up flow, on-screen keyboard, inactivity auto-reset, server-priced bookings with capacity transactions and stock locks, pay-at-counter or pay-by-QR, live availability refresh, LAN offline failover, find-my-booking edit — in Next.js App Router, backend-agnostic.

Funktioniert mit~Claude Code~Codex CLI~Cursor
npx skills add timerise-ai/booking-kiosk

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Self-Service Booking Kiosk

A kiosk is a booking website with the trust model inverted: the client is unauthenticated by design and physically shared, so all trust lives on the server (prices, capacity, idempotency) and all state is disposable (in-memory, auto-reset, never persisted). Everything in this skill follows from those two facts.

When to use

  • Building a walk-up booking terminal for slot-based capacity (stations × time windows) with optional equipment and consumable add-ons.
  • Adding kiosk mode to an app that already has online booking.
  • Auditing an existing kiosk against the hard rules below; provenance.md records the reason behind each.

When NOT to use

  • On-prem offline fallback server — that is the sibling island-mode-server skill; this skill only defines the kiosk's client-side failover contract.
  • Digital signage / display screens — different capability (playback, no input), different skill.
  • Staff-facing POS or admin booking tools — staff are authenticated and trusted; this skill's trust model is wrong for them.
  • A plain booking website — take the backend seam if useful, but the kiosk machinery (keyboard, timers, touch hardening) is dead weight there.

Architecture

 KioskProvider (pure reducer: steps, selections, cart, sessionId)
   │ props: dictionary slices        hooks: pricing · equipment · availability
 screens: service→date→time→participants→equipment→summary→confirmation
   │                         └─ side flow: booking-lookup → booking-edit
   ▼ one fetch wrapper (device key + offline base-URL failover)
 /api/kiosk/booking/{create,lookup,add-items,edit}     ← all trust decisions
   ▼ KioskBackend seam: server pricing · promo · stock locks (TTL 15 min)
     transactional capacity re-check · counter/online payment · webhook
 realtime: location.lastBookingChangeAt → silent refetch → REFRESH_SLOT

Critical facts

  1. User taps navigate; background refreshes never do. SET_SLOT vs REFRESH_SLOT is the difference between live availability and teleporting a customer off the summary screen mid-purchase.
  2. The server prices everything. Nothing money-shaped crosses the wire inbound; the client total is a preview.
  3. Counter payment is the resilience path — booking confirms with PENDING_COUNTER_PAYMENT, no payment integration in the loop; online payment on a kiosk means a QR the customer scans, never navigating the kiosk away.
  4. Every text input opens the on-screen keyboard and sets inputMode="none". One without the other is an unusable screen.
  5. Stock locks are TTL-reserved (15 min) and released on every failure path — the sweep job is the safety net, not the mechanism.
  6. The client sessionId is the idempotency key. Double-tap, retry, lost response: at most one booking.

Hard rules

Never persist kiosk session state. The next customer must not see the previous one's name. In-memory + 120 s inactivity reset + 30 s confirmation reset, verified on hardware.

Never trust the client for prices, capacity, or promo validity. The server computes every amount and answers an invalid promo with PROMO_INVALID; a customer at a kiosk has no way to check the amount.

One fetch wrapper for every kiosk request. The wrapper carries the device header, the error envelope and the failover base URL, so auth, errors and offline failover apply to every request at once.

If the device key is configured, a missing header is a 401. Reject-only- on-wrong-key is the same as no auth.

Release stock locks on every failure path after acquiring them. A 409 that keeps the reservation freezes stock for the full TTL.

Quick start

  1. Read state-machine.md; implement the reducer and provider, run its test suite.
  2. Build screens against the contract in screens.md with the host's design system — keyboard, timers, touch hardening.
  3. Implement the routes from api-contract.md over the booking-backend.md seam.
  4. Wire freshness + offline per realtime-offline.md.
  5. Deploy and smoke-test per operations.md.

Adaptation Contract

SeamThis skill shipsThe host supplies
Domain entitiesservice/station/equipment/consumable + rename tableits vocabulary (court, kart, bay…)
Tenant scopelocationId in the kiosk URL, server-verifiedits location/site model
Device authx-kiosk-api-key contractkey management; optional per-device tokens
Data accessKioskBackend interface; Firestore reference + SQL sketchits ORM/SDK
Paymentscounter status + checkout-session/webhook contractStripe or equivalent
RealtimeSubscribeFreshness interfaceFirestore/Supabase/SSE/polling
OfflineNetworkStatus contractLAN server (island-mode-server) or none
UI primitivesstructure, states, interaction rulesbuttons, dialog, spinner, look
Stylinglayout intent, touch targets, one --primary tokenits design system
Stringsdictionary key tree, all keys requiredits i18n files, all locales
Validationdependency-free guardsits schema library, if any

Reference directory

ScenarioTrigger keywordsReference
State, steps, reducer, session, testsstep, reducer, GO_BACK, REFRESH_SLOT, sessionId, resetstate-machine.md
Screens, keyboard, timers, touch, i18n keyson-screen keyboard, inactivity, countdown, QR, touch target, dictionaryscreens.md
Routes, auth, validation, idempotency, errorsx-kiosk-api-key, 401, 409, idempotency, PROMO_INVALID, lookup, PIIapi-contract.md
Capacity, stock, payments, webhook, cronstransaction, stock lock, TTL, PENDING_COUNTER_PAYMENT, webhook, refundbooking-backend.md
Live refresh, caching, offline failoverlastBookingChangeAt, onSnapshot, s-maxage, offline banner, LAN, health pollrealtime-offline.md
Deploying, gating, operator surfaceEdge --kiosk, assigned access, heartbeat, feature gate, smoke testoperations.md
Why the templates differ from the earlier implementationaudit, ledger, kept deliberately, addedprovenance.md

Verwandte Skills