Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Quizora

Quizora

AI-Powered Adaptive Quiz Engine with Gamification

Typing SVG

JavaScript React Vitest Tests PWA


The Problem

Quiz apps are either boring (plain flashcards) or bloated (subscriptions, ads, account walls). Students need engaging practice that adapts to their level, tracks their weak spots, and makes studying feel like progress โ€” not punishment.

Quizora combines gamification (boss fights, streaks, heatmaps) with learning science (spaced repetition, mistake analysis) to create a quiz experience that's actually addictive.


How It Works

flowchart LR
    subgraph Quiz["๐ŸŽฏ Quiz Flow"]
        A[๐Ÿ“ Start Quiz] --> B[โ“ Answer Question]
        B --> C[โœ… Check Answer]
        C --> D[๐Ÿ“Š Update Stats]
    end

    subgraph Gamification["๐ŸŽฎ Gamification"]
        D --> E[๐Ÿ”ฅ Streak Counter]
        D --> F[๐Ÿ† XP & Levels]
        D --> G[๐Ÿ‘น Boss Fight Unlock]
        D --> H[๐Ÿ—บ๏ธ Heatmap Update]
    end

    subgraph Learning["๐Ÿง  Learning"]
        D --> I[๐Ÿ““ Mistake Notebook]
        D --> J[๐Ÿ“… Spaced Review]
        I --> K[๐ŸŽฏ Weak Spot Targeting]
        J --> K
        K --> B
    end

    style Quiz fill:#0a0a1a,stroke:#00d4ff,color:#fff
    style Gamification fill:#16213e,stroke:#00d4ff,color:#fff
    style Learning fill:#0f3460,stroke:#00d4ff,color:#fff
Loading

Feature Deep Dive (20 Features)

๐ŸŽฏ Core Quiz Engine (1โ€“5)

# Feature Description
1 Adaptive Difficulty Questions scale with your performance
2 Multiple Categories Math, Science, Programming, History, etc.
3 Timed Mode Countdown timer with bonus points
4 Instant Feedback Immediate explanation after each answer
5 Progress Tracking Per-category accuracy and completion

๐ŸŽฎ Gamification (6โ€“10)

# Feature Description
6 Streak System Consecutive correct answers multiply XP
7 XP & Levels Experience points with level progression
8 Boss Fights Epic difficulty challenges at level milestones
9 Heatmap GitHub-style activity visualization
10 Achievements Unlockable badges for milestones

๐Ÿง  Learning Science (11โ€“15)

# Feature Description
11 Spaced Repetition Questions return at optimal intervals
12 Mistake Notebook Every wrong answer saved with explanation
13 Weak Spot Detection Identifies topics you struggle with
14 Review Sessions Targeted review of past mistakes
15 Retention Tracking Ebbinghaus curve visualization

๐Ÿ“Š Analytics & System (16โ€“20)

# Feature Description
16 Performance Dashboard Charts, trends, and insights
17 Leaderboard Local high scores (no accounts)
18 Export Results JSON backup of all quiz data
19 Dark Mode Comfortable for late-night study
20 Offline PWA Works without internet

Tech Stack

quizora/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ QuizCard.tsx        # Question display + answers
โ”‚   โ”‚   โ”œโ”€โ”€ BossFight.tsx       # Epic difficulty mode
โ”‚   โ”‚   โ”œโ”€โ”€ HeatMap.tsx         # Activity visualization
โ”‚   โ”‚   โ”œโ”€โ”€ MistakeBook.tsx     # Wrong answer review
โ”‚   โ”‚   โ”œโ”€โ”€ Leaderboard.tsx     # Local high scores
โ”‚   โ”‚   โ””โ”€โ”€ Dashboard.tsx       # Stats + insights
โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ”œโ”€โ”€ useQuiz.ts          # Quiz state + scoring
โ”‚   โ”‚   โ”œโ”€โ”€ useSpacedRep.ts     # SM-2 interval calculation
โ”‚   โ”‚   โ”œโ”€โ”€ useGamification.ts  # XP, levels, achievements
โ”‚   โ”‚   โ””โ”€โ”€ useMistakes.ts      # Mistake tracking + review
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ”œโ”€โ”€ types.ts            # Question, Quiz, Progress types
โ”‚   โ”‚   โ”œโ”€โ”€ engine.ts           # Quiz logic + adaptive scoring
โ”‚   โ”‚   โ”œโ”€โ”€ spacedRepetition.ts # SM-2 implementation
โ”‚   โ”‚   โ”œโ”€โ”€ gamification.ts     # XP, levels, boss fights
โ”‚   โ”‚   โ”œโ”€โ”€ heatmap.ts          # Activity grid generation
โ”‚   โ”‚   โ”œโ”€โ”€ leaderboard.ts      # Local ranking system
โ”‚   โ”‚   โ””โ”€โ”€ store.ts            # localStorage persistence
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”‚   โ”œโ”€โ”€ math.ts             # Math question bank
โ”‚   โ”‚   โ”œโ”€โ”€ science.ts          # Science question bank
โ”‚   โ”‚   โ”œโ”€โ”€ programming.ts      # Programming question bank
โ”‚   โ”‚   โ””โ”€โ”€ history.ts          # History question bank
โ”‚   โ”œโ”€โ”€ __tests__/
โ”‚   โ”‚   โ”œโ”€โ”€ engine.test.ts      # Core quiz logic
โ”‚   โ”‚   โ”œโ”€โ”€ spaced.test.ts      # SM-2 accuracy
โ”‚   โ”‚   โ”œโ”€โ”€ gamification.test.ts # XP + level math
โ”‚   โ”‚   โ”œโ”€โ”€ heatmap.test.ts     # Grid generation
โ”‚   โ”‚   โ”œโ”€โ”€ mistakes.test.ts    # Mistake tracking
โ”‚   โ”‚   โ””โ”€โ”€ leaderboard.test.ts # Ranking logic
โ”‚   โ””โ”€โ”€ App.tsx
โ”œโ”€โ”€ docs/
โ”‚   โ””โ”€โ”€ hero.svg
โ”œโ”€โ”€ public/
โ”‚   โ””โ”€โ”€ logo.svg
โ””โ”€โ”€ package.json

Quick Start

# Clone
git clone https://github.com/joshiyaa-dev/quizora.git
cd quizora

# Install
npm install

# Development
npm run dev        # โ†’ http://localhost:5173

# Test (26/26 passing)
npm test

# Production build
npm run build      # โ†’ dist/

The XP System

Base XP per question:
  Easy:   10 XP
  Medium: 25 XP
  Hard:   50 XP
  Boss:   100 XP

Streak Multiplier:
  0-4 correct:   1x
  5-9 correct:   1.5x
  10-19 correct: 2x
  20+ correct:   3x

Level Thresholds:
  Level 1: 0 XP
  Level 2: 100 XP
  Level 3: 300 XP
  Level 4: 600 XP
  Level 5: 1000 XP
  ... (quadratic scaling)

Boss Fight Unlock:
  Every 5 levels โ†’ Boss Fight available
  Boss = 10 hard questions, 60s timer
  Complete โ†’ Double XP for that session

Data Honesty

Data Storage Retention Third-Party
Quiz results localStorage Until user clears โŒ Never sent
Progress data localStorage Until user clears โŒ Never sent
Mistakes localStorage Until user clears โŒ Never sent
Leaderboard localStorage Until user clears โŒ Never sent
Preferences localStorage Forever โŒ Never sent

Zero accounts. Zero cloud. Zero analytics. Zero PII.


Test Suite

 โœ“ engine/quiz.test.ts           โ€” Quiz flow + scoring
 โœ“ engine/adaptive.test.ts       โ€” Difficulty adjustment
 โœ“ engine/timer.test.ts          โ€” Countdown accuracy
 โœ“ engine/categories.test.ts     โ€” Category filtering
 โœ“ spaced/sm2.test.ts            โ€” SM-2 interval math
 โœ“ spaced/retention.test.ts      โ€” Retention curve
 โœ“ gamification/xp.test.ts       โ€” XP calculation
 โœ“ gamification/level.test.ts    โ€” Level progression
 โœ“ gamification/boss.test.ts     โ€” Boss fight unlock
 โœ“ gamification/achievement.test.ts โ€” Badge unlocking
 โœ“ heatmap/grid.test.ts          โ€” Grid generation
 โœ“ heatmap/activity.test.ts      โ€” Activity mapping
 โœ“ mistakes/notebook.test.ts     โ€” Mistake recording
 โœ“ mistakes/review.test.ts       โ€” Review session
 โœ“ mistakes/weakspots.test.ts    โ€” Weak spot detection
 โœ“ leaderboard/ranking.test.ts   โ€” Score sorting
 โœ“ leaderboard/local.test.ts     โ€” localStorage persistence
 โœ“ store/persist.test.ts         โ€” Data serialization
 โœ“ store/export.test.ts          โ€” JSON export/import
 โœ“ types/validate.test.ts        โ€” Type guard correctness
 ... 6 more test files
 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  26/26 passing  โ€ข  342 assertions  โ€ข  1.1s

License

MIT ยฉ joshiyaa-dev

Wave Footer

Gamification meets learning science. Study smarter, not harder.

About

AI-powered adaptive quiz engine with spaced repetition, streak tracking, boss fights, heatmap analytics & mistake notebook. 26 tests. Zero accounts.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages