Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

579 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Temple Consulting, LLC.

A creation of Temple Consulting, LLC.

LOTTO — Line Order Transparency & Ticketing Organizer

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


What LOTTO does

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.

Who LOTTO is for

  • 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.


Screenshots

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.

LOTTO public display board

Staff landing — quick access to the dashboard, the public board, and the arcade:

Staff landing page

What's in stock — live, localized public inventory with limits and dietary flags:

Public inventory page

Searchable Help — plain-language staff guides with section-level search:

In-app help index

Arcade — optional retro games for waiting guests, kept separate from the raffle:

Arcade index

Dark mode

Light, dark, and a flat high-visibility theme are all supported. The board and staff dashboard in dark:

Display board Staff dashboard
Display board, dark mode Staff landing, dark mode

Localization

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)
Display board in Chinese Display board in Russian Display board in Arabic

Regenerate all screenshots with npm run screenshots while the app is running (drives your installed Chrome via puppeteer-core).


Quickstart (development)

Prerequisites

  • Node.js 20+
  • Optionally Docker Desktop for the full local stack (app + Postgres + MailDev)

Get it running

git clone https://github.com/MattGeiger/LOTTO.git
cd LOTTO
npm install
npm run dev

Open 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 :1080

Full environment variables, the production runbook (Vercel + Neon + Resend), the optional standalone read-only board, and persistence details are in docs/DEPLOYMENT.md.


Tech stack

  • 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-gfm for in-app help and release notes
  • Data: Neon Postgres in production; a file-based data/state.json fallback for local development
  • Auth & email: NextAuth magic link + OTP, delivered via Resend
  • Testing: Vitest + Testing Library
  • Hosting: Vercel

Project structure

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.


Contributing

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.


License

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:

  1. The application code is AGPL-3.0-or-later.
  2. Anyone may use, study, modify, redistribute, and self-host it under the AGPL terms — free of charge.
  3. 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.
  4. 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.
  5. 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.

Acknowledgements

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.


Contact

About

LOTTO — Line Order Transparency & Ticketing Organizer: a fair, multilingual queue/ticketing system with a live display board, inventory, and arcade. Built for William Temple House.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages