React · Firebase · Gamification2026 · 3 months · Product Engineer — fullstack, gamification, architecture

Quiztopia

A premium gamified quiz platform — timed quizzes across 12 categories with XP, streaks, leaderboards, and head-to-head friend duels.

Overview

The product

Quiztopia is a premium, gamified quiz platform built on React 19, Firebase (Auth + Firestore), and Tailwind CSS v4. Players take timed quizzes across 12 categories — from science and history to front-end and back-end development — earning XP across 7 levels (Rookie to Quiztopian), keeping daily streaks alive, clearing a seeded daily challenge, unlocking 10 achievements, climbing global and weekly leaderboards, and challenging friends head-to-head with shareable 6-character codes. Tournaments, community quizzes, and a host mode round out a platform that treats retention as a feature, not an afterthought.

12 quiz tracks

Categories

15 seconds

Question timer

Rookie → Quiztopian

XP tiers

Rules-enforced

Trust model

The problem

Quiz apps are fun once — then everyone leaves

Most quiz products are flat question-and-answer screens with no reason to come back tomorrow. Scores live in client state where anyone can forge them, playing with friends means crowding around one screen, and the 'daily quiz' is just a random shuffle with no stakes.

  • No progression loop — the first quiz feels exactly like the hundredth
  • Scores with no trust boundary — leaderboards nobody can believe
  • No real social play — friends can't compete on the same question set

The solution

Turn every answer into progress

I built Quiztopia around a retention engine: XP across 7 tiers with streak bonuses (2x for the daily challenge), a deterministic daily challenge seeded by date with one server-enforced completion per day, and 10 achievements surfaced through toasts and the profile grid. Trust comes from the data layer — deterministic attempt IDs block duplicate XP farming, delta-bounded writes cap XP per write, quiz attempts are create-only and immutable, and challenge winners are derived from stored scores, never accepted from the client. Social play runs on short codes and direct links: both players get the same question snapshot, and the winner is computed, not claimed.

  • XP, levels, streaks, and achievements that reward coming back daily
  • Rules-enforced trust — deterministic IDs, delta caps, immutable attempts
  • Friend challenges, duels, tournaments, and community quizzes on shared question sets

Architecture

The system behind Quiztopia

A client-first React app where Firestore security rules are the backend — every collection is modeled around what the rules can prove.

  1. 01

    Web App

    React 19 · Vite 8

    Lazy-loaded routes, dark/light mode, keyboard-first answering, confetti on high scores.

  2. 02

    State

    Zustand 5 · Persist

    Quiz, profile, and toast stores with localStorage persistence.

  3. 03

    Quiz Engine

    Open Trivia DB · Local bank

    15-second timer with auto-advance, shuffling, and a Firestore fallback bank.

  4. 04

    Progression

    XP · Streaks · Achievements

    7 tiers, date-keyed streaks, 10 badges, and per-category mastery bars.

  5. 05

    Data & Trust

    Firestore · Security rules

    Delta-bounded user writes, create-only attempts, derived winners.

  6. 06

    Social

    Challenges · Duels · Tournaments

    Short codes, shared snapshots, and global/weekly leaderboards with a podium.

Tech stack

Tools that earned their place

Frontend

  • React 19
  • Vite 8
  • React Router 7

State

  • Zustand 5

Styling

  • Tailwind CSS v4
  • MUI v6
  • Framer Motion

Backend

  • Firebase Auth
  • Cloud Firestore

Quality

  • Vitest 4
  • Testing Library

Features

What it does, and why it matters

01

Timed quizzes

12 categories, 15 seconds per question, auto-advance, and keyboard shortcuts — answer with 1–4, continue with Enter.

02

XP & levels

7 tiers from Rookie to Quiztopian — XP for correct answers, completion, perfect rounds, and streak bonuses.

03

Daily challenge

One deterministic 10-question challenge per day, seeded by date and worth 2x XP — one completion enforced server-side.

04

Achievements

10 unlockable badges — first victory, perfect score, speed demon, accuracy, milestones, streaks, mastery — via toasts and the profile grid.

05

Leaderboards

Global all-time and weekly XP boards with a top-3 podium, your rank, and designed empty and error states.

06

Friend duels & tournaments

Create a 5- or 10-question challenge, share a code or link, and play the same snapshot — the winner is derived from immutable scores.

Challenges

What nearly broke the system

Trust without a server

No Cloud Functions allowed — so the trust boundary is Firestore rules. Deterministic attempt IDs make duplicate XP farming impossible, delta caps bound every write, and attempts are create-only. The residual risk (fresh accounts, cross-category farming) is documented, not hidden.

One challenge per day, for real

A daily challenge only works if it's the same quiz for everyone and completable once. Seeding the 10-question set by date keeps it deterministic, and an immutable daily-attempt marker enforces the one-completion rule at the data layer.

Retention without bloat

Gamification easily becomes clutter. Lazy-loaded route chunks, toasts reserved for real moments (XP, level-ups, achievements), a persisted theme, and a mobile-first layout keep the app fast while the progression systems do the retaining.

Lessons learned

What shipping taught me

Retention is a system: XP curves, streak caps, and daily determinism beat more questions.

Security rules are a backend — model collections around what rules can prove, and always derive winners instead of accepting them.

Celebrate sparingly: toasts and confetti only for real moments, or they become noise.

Impact

Why this actually matters

Quiztopia turns trivia from a one-session novelty into a daily habit — progression systems pull players back, rules-enforced trust keeps leaderboards believable, and shared question sets make competing with friends actually work.

  • Daily loops — streaks, seeded challenges, and 2x XP give a reason to return tomorrow
  • Believable competition — immutable attempts and derived winners keep every board honest
  • Social by design — codes, duels, tournaments, and community quizzes share one question engine

Gallery

Inside the product

Timed arena

15-second questions with auto-advance and keyboard play.

Progression

XP, streaks, achievements, and per-category mastery.

Duels

Head-to-head challenges on shared question snapshots.