Skip to content

Latest commit

 

History

108 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TLV Quest

A self-running urban quest platform. An organizer gets one link, configures a game in a guided wizard, shares participant links — and then watches the event rather than operating it.

Live: https://tlv-quest.vercel.app

The first route is a bilingual (Hebrew / English) time-capsule adventure through the Tel Aviv Port: three checkpoints, answers over WhatsApp or web, QR/NFC arrival, a forced-perspective team photo, and a location-verified finale at the Reading lighthouse.

How a game runs

  1. An admin issues a single-use organizer invitation.
  2. The organizer completes the wizard and receives management, registration and live-board links.
  3. Participants register in Hebrew or English, get a personal web link, and can be onboarded through the Twilio WhatsApp sandbox.
  4. Teams are created or balanced. The game starts on a schedule, manually, or on a rolling basis.
  5. Any connected teammate can answer, request a hint, scan QR/NFC, verify location, or submit a photo.
  6. Atomic Postgres state transitions guarantee the first valid action advances shared team state exactly once.
  7. The live leaderboard updates without exposing precise locations or personal names.
  8. The game ends automatically after the finale; results stay available for 72 hours.
  9. A maintenance worker then deletes media and operational data, retaining anonymous aggregates only.

Stack

Next.js on Vercel — organizer wizard and emergency dashboard, participant web experience, public live leaderboard, Twilio webhooks, signed-token APIs, protected maintenance worker.

Supabase — Postgres as source of truth, atomic state-transition RPCs, private Storage bucket, Realtime for the sanitized leaderboard, deny-by-default RLS, magic-link auth for admins.

The parts that took the longest

Doc What it covers
schema-integrity supabase/migrations/ is the only source of truth. npm run verify:schema rebuilds from migrations alone and fails the PR if app code references a table or RPC no migration creates — plus the drift that motivated the gate.
security-access-model Supabase browser-role allowlist, Realtime isolation model, credential handling, production probe.
scheduled-workers Outbox and maintenance workers on pg_cron inside Supabase, authenticated with single-use tokens rather than a stored secret.
whatsapp-typing-indicators Twilio's public-beta typing indicator, its read-receipt side effect, and the long-running photo strategy.
field-verification /admin/field — recording coordinates, checklists, calibration photos and answer edits on site.
error-handling Public API error contract, safe AppError usage, correlation-ID workflow.
realtime-architecture · pwa-offline Live state propagation and offline behaviour on the participant device.
dependency-security Production audit gate, Dependabot policy, reviewed transitive overrides.
production-runbook · live-ops Go/no-go checklist, live incident response, retention behaviour, required production configuration.

Current MVP scope is in docs/product-spec.md; the full index is in docs/.

Running it

cp .env.example .env.local     # replace every placeholder
npm install
npm run dev

The Supabase URL and publishable key are required. There is deliberately no production-project fallback in source.

Development goes through short-lived feature branches and pull requests.

License

MIT.

About

WhatsApp-first urban quest platform for the Tel Aviv Port — self-serve route authoring, in-field verification, Supabase + pg_cron workers, and a schema-drift gate that fails CI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages