A creation of Temple Consulting, LLC.
A fun, fair, and simple queue-management and ticketing system for chance-based or sequential lines — built for William Temple House and shared as a configurable open-source app for other nonprofits running ticketed distributions (food pantries, clinics, giveaways, and similar).
Production deployment: https://williamtemple.app License: AGPL-3.0-or-later Status: v1.20.1 — production release
LOTTO turns a paper-ticket line into a calm, transparent, multilingual experience. Staff set today's ticket range and call numbers; clients see exactly who's being served and roughly how long their wait is — on a big lobby screen or on their own phone, in their own language.
- Live display board (
/display) — an airport-style "Now Serving" board with a color-coded drawing-order grid (now serving / called / unclaimed / returned), ticket search, and a QR code that sends clients to their personal status. - Personalized client view (
/) — pick a language, enter a ticket, and see your position, people ahead, and estimated wait. Enter a number even before the drawing starts. When your number is called, confetti — on whatever page you're on. - Staff dashboard (
/admin) — set ticket ranges (random or sequential), call numbers, mark tickets returned/unclaimed, configure operating hours, and undo/restore from timestamped snapshots. - Optional What's in stock (
/inventory) — a read-only public inventory (categories, limits, stock status, dietary flags) sourced from the FEED public endpoint, localized where FEED provides translations. - Built-in arcade (
/arcade) — optional retro games (Snake, Brick Mayhem, and more) to keep waiting guests entertained; gameplay pauses the instant a player's ticket is called. - Eight languages, three themes — English, Spanish, Chinese, Russian, Ukrainian, Vietnamese, Persian, and Arabic (with right-to-left support), plus light, dark, and a flat high-visibility accessibility theme. The board can even rotate through languages automatically.
- In-app Help, About, and release notes — a searchable, indexed staff help
section (
/help) with plain-language guides and workflows.
- Nonprofits and service organizations running a ticketed or first-come-first-served line that want to digitize it without an expensive software contract.
- Multilingual communities — clients who don't read English can follow the board and their own status in their language.
- Developers who want a real-world reference for a Next.js 16 App Router app with live polling, multilingual + RTL UI, theme tokens, magic-link auth, and a Postgres-or-file persistence layer.
If LOTTO looks useful, you can fork it, modify it, and deploy your own instance — see LICENSE and TRADEMARKS.md for the terms.
LOTTO supports deployment-selected brand profiles and database-backed appearance
configurations from one repository. Each agency can manage its own logo, colors,
copy, metadata, install identity, database, authentication allowlist/domain
policy, and optional FEED integration while continuing to share queue logic and
future updates. See
docs/WHITE_LABEL_BRANDING_PLAN.md and
docs/CONFIGURABLE_BRANDING_PLAN.md, and
docs/DEPLOYMENT.md.
Live display board — the lobby screen clients watch: "Now Serving," a color-coded drawing-order grid, ticket search, and a QR code to their phone.
Staff landing — quick access to the dashboard, the public board, and the arcade:
What's in stock — live, localized public inventory with limits and dietary flags:
Searchable Help — plain-language staff guides with section-level search:
Arcade — optional retro games for waiting guests, kept separate from the raffle:
Light, dark, and a flat high-visibility theme are all supported. The board and staff dashboard in dark:
| Display board | Staff dashboard |
|---|---|
![]() |
![]() |
The same display board in Chinese, Russian, and Arabic — note the right-to-left layout for Arabic (and Persian), with ticket numbers kept in their natural order:
| 中文 (Chinese) | Русский (Russian) | العربية (Arabic, RTL) |
|---|---|---|
![]() |
![]() |
![]() |
Regenerate all screenshots with
npm run screenshotswhile the app is running (drives your installed Chrome viapuppeteer-core).
- Node.js 20+
- Optionally Docker Desktop for the full local stack (app + Postgres + MailDev)
git clone https://github.com/MattGeiger/LOTTO.git
cd LOTTO
npm install
npm run devOpen http://localhost:3000 — the client homepage (/), the staff landing
(/staff), and the public board (/display). On localhost, auth is bypassed
automatically and state is read from a local data/state.json fallback, so no
database or email setup is needed to explore.
For the full stack with Postgres and a local mail inbox:
docker compose up --build # app on :3000, MailDev inbox on :1080Full environment variables, the production runbook (Vercel + Neon + Resend), the
optional standalone read-only board, and persistence details are in
docs/DEPLOYMENT.md.
- Framework: Next.js 16 (App Router), React 19, TypeScript
- UI: Tailwind CSS with CSS-variable design tokens, shadcn / Radix UI
components,
lucide-react+ animate-ui motion variants - Content:
react-markdown+remark-gfmfor in-app help and release notes - Data: Neon Postgres in production; a file-based
data/state.jsonfallback for local development - Auth & email: NextAuth magic link + OTP, delivered via Resend
- Testing: Vitest + Testing Library
- Hosting: Vercel
src/
app/ App Router routes: / (client), /staff, /display, /admin,
/inventory, /arcade, /help, and api/* route handlers
components/ Feature components + shadcn/ui primitives, help/, navigation/
arcade/ Arcade games, components, and styles (kept separate from raffle)
contexts/ React contexts (language, theme/contrast, haptics)
lib/ Pure helpers (state types, polling strategy, user-guides, …)
docs/ Documentation, release notes, user guides, screenshots
public/ Static assets (logos)
tests/ Vitest + Testing Library
Project conventions and architecture notes live in AGENTS.md —
required reading for non-trivial contributions. Notable feature docs:
docs/NAVIGATION.md,
docs/HELP_SYSTEM.md,
docs/DISPLAY_LANGUAGE_ROTATION.md.
Bug reports and pull requests are welcome. Read AGENTS.md for
conventions (shadcn/ui usage, design tokens, documentation expectations, and the
Arcade separation guardrails) before opening a non-trivial PR.
Security issues — please do not open a public issue; see
docs/SECURITY.md for the disclosure process.
The application code is open source. The William Temple House deployment is branded, and the brand is not open source.
LOTTO's application code is licensed under AGPL-3.0-or-later. In plain English:
- The application code is AGPL-3.0-or-later.
- Anyone may use, study, modify, redistribute, and self-host it under the AGPL terms — free of charge.
- If someone modifies LOTTO and offers it to others over a network (including as a hosted web service), the AGPL requires them to offer the corresponding source to those users. This network-use clause is why LOTTO uses AGPL: improvements should flow back to the community of organizations running it.
- The William Temple House name, logos, visual identity, and domain are not open source and may not be reused without separate written permission. See TRADEMARKS.md.
- Anyone deploying LOTTO must select or add an authorized brand profile and use their own name, logo, colors, domain, and contact information before a public deployment. The no-configuration William Temple House profile exists to preserve the originating production deployment; it is not permission to reuse that identity.
LOTTO is a creation of Temple Consulting, LLC., built by Matt Geiger to serve the clients of William Temple House, a Portland nonprofit serving the Pacific Northwest since 1965, where it runs in production. The application code is Temple Consulting's own work, released as open source so peer organizations can use and improve it; the William Temple House branding it ships with belongs to William Temple House (see TRADEMARKS.md).
LOTTO was built with Claude and Claude Code, and with Codex — a collaboration between a human author and AI agents. The animated icon system uses Lucide with motion variants from animate-ui.
- Project maintainer: Matt Geiger, Temple Consulting, LLC. — matt@templepdx.com · templepdx.com
- William Temple House (the originating deployment): https://www.williamtemple.org/about/contact/









