Open-source QuizUp and Kahoot, together in one app. Go head-to-head in ranked 1v1 quiz battles like QuizUp, host live multiplayer quiz rooms like Kahoot, and generate whole quizzes with AI.
- ๐ฎ Live multiplayer quizzes (the Kahoot half) โ host a room, players join with a code, link or QR code (no account needed), everyone answers in real time over WebSockets. Hosts can kick or ban players.
- โ๏ธ Ranked 1v1 duels (the QuizUp half) โ matchmaking with an ELO rating system, backed by difficulty-scaled bot opponents when nobody else is queuing. Challenge a friend with an unrated invite link.
- ๐ค AI quiz generation โ describe a topic and let a model draft the questions: Gemini, or anything that speaks the OpenAI API โ including a local model via Ollama (optional).
- ๐ AI Knowledge Spaces โ upload PDF, DOCX, TXT or Markdown documents and generate cited questions from them with RAG (optional Python service).
- ๐ณ Buzrr Pro โ the hosted version's paid plan (bigger rooms, unlimited quizzes, more AI generations) via Dodo Payments. Self-hosted instances run without billing and every account gets Pro limits.
- ๐ก๏ธ Public question moderation โ community questions feed the duel pool behind an approve/report workflow.
- ๐ผ๏ธ Media questions โ image uploads to local disk, any S3-compatible bucket, or Cloudinary.
- ๐ Sign-in โ local email + password accounts and/or Google, powered by Better Auth.
- ๐ Self-host anywhere โ
docker compose upruns the whole thing, fully offline on a school server if you like. No SaaS accounts required. - ๐งฉ Pluggable question types โ each type is a small server handler plus a web renderer; add one without touching the game engine.
- โก Server-authoritative game loop โ live state lives in Redis; only finished games are persisted to Postgres.
Buzrr is a Turborepo monorepo: a Next.js frontend
(apps/web, which also hosts auth), a NestJS server (apps/server) that owns
every game rule over Socket.IO, an optional Python service for AI Knowledge
Spaces (apps/ai), and a shared Prisma package. Live game state lives in
Redis; Postgres keeps the lobby record and the final result.
The socket and REST shapes both apps speak are defined once, as zod schemas,
in packages/contract.
๐ Read ARCHITECTURE.md for the full picture โ the
server-authoritative game loop, how timer ownership survives crashes and
multiple instances, and the Redis/Postgres split. Detailed docs live in
docs/ โ architecture by area, decision records (ADRs) and the
current project state. Coding agents start at AGENTS.md.
All you need is Docker:
git clone https://github.com/buzrr/buzrr && cd buzrr
docker compose up -d # first run builds the images (a few minutes)Open http://localhost:3000 and create an account. That's the whole
install: Postgres, Redis, migrations, the API and the web app, with local
accounts, images on a Docker volume and an auth secret generated on first
boot โ nothing calls out to the internet. AI is off until you point it at a
model (--profile ollama bundles a local one).
To serve other machines, set PUBLIC_WEB_URL / PUBLIC_API_URL in a .env
next to docker-compose.yml and run docker compose up -d --build. Every
option โ LAN installs, closing sign-ups, S3 storage, AI, upgrades, backups โ
is in docs/self-hosting.md.
- Node.js โฅ 18 (20 LTS recommended) โ Yarn 4 is bundled via Corepack.
- Docker (for the local Postgres + Redis).
- Python 3.12 โ only if you want the AI Knowledge Spaces service.
corepack enable # makes the pinned Yarn 4 available (first time only)
yarn install # install dependencies
yarn setup # โฌ
๏ธ starts Postgres + Redis, writes .env files, pushes the schemayarn setup spins up the databases in Docker, generates local .env files
(with a shared auth secret), and syncs the schema โ see scripts/setup.mjs.
It's idempotent and safe to re-run: existing values are never overwritten,
and if a required key goes missing from a .env file it's re-added with the
local default.
Then start everything:
yarn dev # web โ http://localhost:3000 api โ http://localhost:3001yarn dev also starts the AI service (apps/ai, :3002), which needs a one-time
yarn workspace ai setup first. If you don't want it, run
yarn dev:web and yarn dev:server instead.
Open http://localhost:3000 and create a local account (email + password โ
yarn setup turns that on for development). Everything else is optional.
| Feature | Add to .env |
Where to get it |
|---|---|---|
| Google sign-in | GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET (in apps/web/.env) |
Google Cloud Console โ redirect URI http://localhost:3000/api/auth/callback/google |
| AI quiz generation | GEMINI_API_KEY โ or LLM_BASE_URL + LLM_MODEL for any OpenAI-compatible server |
Google AI Studio, or a local Ollama |
| Image uploads | CLOUDINARY_*, or STORAGE_DRIVER=s3 + S3_*, or STORAGE_DRIVER=local. Unconfigured โ uploads return 503 |
Cloudinary / any S3-compatible store |
| Landing GitHub stats | GITHUB_TOKEN (in apps/web/.env) |
GitHub personal access tokens โ no scopes needed for public repos |
| Rate limiting | RATELIMIT=ON + UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN |
Upstash |
| AI Knowledge Spaces | NEXT_PUBLIC_AI_API_URL (web) + apps/ai/.env |
See apps/ai/README.md |
| Billing (Buzrr Pro) | BILLING=ON + DODO_*, APP_URL (server), DODO_PAYMENTS_WEBHOOK_KEY (web) |
Dodo Payments โ hosted version only; leave off when self-hosting |
| Landing-page video | LANDING_VIDEO_URL (in apps/web/.env) โ an MP4 URL |
Any video host; Cloudinary URLs also get a poster frame |
yarn setup writes sensible local defaults; these are the ones you'll touch. See
the .env.example files for the full, commented list.
| Variable | Required | Purpose |
|---|---|---|
AUTH_EMAIL_PASSWORD |
โ ยน | ON enables local email + password accounts (web). |
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET |
โ ยน | Google sign-in (web). |
BETTER_AUTH_SECRET |
โ | Signs/verifies session JWTs. Must match between web and server. |
DATABASE_URL / DIRECT_URL |
โ | PostgreSQL connection (defaults to the Docker container). |
REDIS_URL |
โ | Redis for live game state (server won't boot without it). |
NEXT_PUBLIC_SOCKET_URL / NEXT_PUBLIC_API_URL |
โ | Where the browser reaches the API. |
GEMINI_API_KEY or LLM_BASE_URL + LLM_MODEL |
โ | Enables AI quiz generation (Gemini or an OpenAI-compatible server). |
STORAGE_DRIVER + CLOUDINARY_* / S3_* |
โ | Where question images go (unset: uploads disabled). |
GITHUB_TOKEN |
โ | Raises GitHub API rate limits for landing-page repo stats (web). |
LANDING_VIDEO_URL |
โ | MP4 shown on the landing page (web); unset hides the section. |
NEXT_PUBLIC_AI_API_URL |
โ | Where the browser reaches Buzrr-AI; unset hides AI Spaces. |
BILLING + DODO_* + APP_URL |
โ | Enables Buzrr Pro billing. Off = no billing, everyone gets Pro. |
UPSTASH_REDIS_REST_* + RATELIMIT |
โ | Enables rate limiting. |
DUEL_BOTS |
โ | Set to OFF to disable bot opponents in 1v1 matchmaking. |
ยน At least one sign-in method is required.
Run from the repo root:
| Command | What it does |
|---|---|
yarn setup |
One-command local bootstrap (Docker DBs + env + schema). |
yarn dev |
Run web + server with hot reload. |
yarn dev:web / yarn dev:server |
Run a single app. |
yarn build |
Build all apps (what CI runs). |
yarn lint / yarn check-types |
Lint / type-check. |
yarn workspace server test |
Server tests (engine core, question types, storage, AI adapters; billing specs need Postgres). |
yarn format |
Prettier over the repo. |
yarn db:push |
Sync the Prisma schema to the database. |
yarn db:studio |
Open Prisma Studio. |
yarn docker:up / yarn docker:down |
Start / stop the Postgres + Redis containers. |
yarn selfhost |
Build and run the whole self-hosted stack in Docker. |
yarn docker:reset |
Wipe the databases and re-run setup. |
yarn workspace ai setup |
Create the AI service's Python virtualenv. |
Cannot resolve environment variable: DIRECT_URLโ the Prisma CLI readsDATABASE_URL/DIRECT_URLfrom the root.env. If you emptied or edited it, just re-runyarn setup; it restores any missing required keys.Cannot connect to the Docker daemonโ start Docker Desktop, then re-runyarn setup.- Fresh start โ
yarn docker:resetwipes the local databases and re-bootstraps everything.
buzrr/
โโโ apps/
โ โโโ web/ # Next.js app (+ Better Auth)
โ โโโ server/ # NestJS API + Socket.IO
โ โโโ ai/ # Buzrr-AI: Python FastAPI + worker (optional)
โโโ packages/
โ โโโ contract/ # zod schemas: the socket + REST contract both apps import
โ โโโ prisma/ # schema, migrations, generated client
โ โโโ eslint-config/
โ โโโ typescript-config/
โโโ docs/ # architecture, ADRs, current state
โโโ docker-compose.yml # the self-hosted stack (dev uses only its Postgres + Redis)
โโโ render.yaml # Render blueprint for apps/ai
โโโ scripts/setup.mjs # one-command bootstrap
Every push and PR runs the CI workflow: lint,
type-check, server tests and build against real Postgres + Redis; a check that
the Docker dev setup boots; a job that brings up the full self-hosted stack
with docker compose up and signs up a user; and a Buzrr-AI job (ruff, mypy, migrations,
pytest). To gate production deploys on
it, open your Vercel project โ Settings โ Git โ Deployment Checks and add
the CI workflow's "Lint, typecheck & build" job as a required check โ
deployments then only go live once CI is green, and a failing run leaves the
current production deployment in place.
Self-hosting? docker compose up -d is the supported path โ see
docs/self-hosting.md. For the hosted setup:
apps/web deploys to Vercel; apps/server (Socket.IO, long-lived) needs a
container/VM host such as Render, Railway or Fly. apps/ai deploys to Render
from render.yaml (a web service plus a cron-driven ingestion
worker). Both apps read their config
from environment variables โ see the .env.example
files for what each host needs. For production
databases, apply the committed migrations with prisma migrate deploy (local
dev uses db push via yarn setup). With billing on, register
https://<web app>/api/webhooks/dodo as the webhook endpoint in Dodo.
Contributions are welcome! We use the standard fork-based workflow: fork
this repo, branch off main in your fork, and open a pull request from there โ
see CONTRIBUTING.md for the full steps. Please also read
our Code of Conduct before opening a PR. Found a security
issue? See SECURITY.md.
AGPL-3.0 ยฉ Buzrr contributors