falcohb/CEB

โ˜… 0Forks 0PHPGitHub โ†—Compare

README

๐Ÿ† CEB Tactical Operations

PHP Symfony MySQL Doctrine ORM Tailwind CSS Stimulus Docker PHPUnit PHPStan License

๐ŸŽฎ The app that turns CEB prep into an epic adventure for the kids!


๐ŸŽ“ What is the CEB?

The Certificat d'ร‰tudes de Base (CEB) is the official certificate marking the end of primary school in French-speaking Belgium. It is awarded after a national external exam taken by pupils, usually around age 12 (the end of 6th primary year). The exam covers French (reading and writing), mathematics, and "รฉveil" (history, geography and science), and is administered over several days in June.

A solid CEB result is the gateway to secondary education, which is why families often spend the months beforehand practising with past papers. This project turns that practice into a game.

๐ŸŽฏ Goal

An interactive quiz application to train for the Certificat d'ร‰tudes de Base (CEB) exams of French-speaking Belgium. Based on the official questionnaires from previous years (2022, 2023, 2024, 2025), it gamifies learning to make revisions fun and effective for the child preparing the exam.

โš ๏ธ Local application only โ€” no online deployment planned.


๐Ÿ“‹ Decisions recap

๐Ÿ“š Subjects

The official CEB covers French, mathematics and "รฉveil" (history/geography + science). This app currently focuses on the three subjects that can be auto-graded from the past papers:

Subject Included Note
Mathematics Yes Numbers, Operations, Solids & Shapes, Measurements, Data handling
Awareness โ€” History & Geography Yes
Awareness โ€” Science (Scientific initiation) Yes

โ“ Question types

Type Description Interaction
Single-choice MCQ One correct answer Radio buttons
Multiple-choice MCQ Several correct answers Checkboxes
True/False Sometimes with "Can't tell" Radio buttons
Table/Grid Grid with checkboxes per row Interactive table, feedback on the whole
Chronological order Reorder items Drag & Drop

๐Ÿ“ Question encoding

  • Format: YAML
  • Source: CEB 2022, 2023, 2024, 2025 (questionnaires in /docs)
  • Years are mixed โ€” no per-year selection
  • Encoding done by AI from the official PDFs

334 questions across 3 files:

Subject File Questions
Mathematics data/questions/mathematiques.yaml 132
Science data/questions/sciences.yaml 120
Awareness History/Geo data/questions/eveil_histoire_geo.yaml 82

Distribution per exam year: 2022 (55), 2023 (72), 2024 (45), 2025 (162).

Each YAML file starts with a top-level questions: key holding a list of entries. Typical structure:

questions:
  - id: sci_2024_01
    year: 2024
    subject: sciences
    type: qcm_multiple
    points: 2
    question: "Which of these are human senses? (Several answers)"
    choices:
      - label: "Smell"
        correct: true
      - label: "Breathing"
        correct: false
    explanation: "Explanation shown after answering"

๐ŸŽฎ Gamification

โšก Points & score system

  • Score displayed at the end of a session (X/20)
  • Success percentage

๐Ÿ”ฅ Streak (run of correct answers)

  • Real-time counter visible during the session
  • Resets to zero on a wrong answer
  • Rewarded with XP bonuses and badges

โญ XP & Levels system

XP gains:

Action XP
Correct answer +10 XP
Wrong answer 0 XP
Streak 5 bonus +20 XP
Streak 10 bonus +50 XP
Session completed +30 XP
Flawless (20/20) +100 XP

Level tiers:

Level XP required Title
1 0 Recruit
2 100 Soldier
3 300 Corporal
4 600 Sergeant
5 1000 Lieutenant
6 1500 Captain
7 2200 Commander
8 3000 General

๐Ÿ… Badges & Trophies

14 badges across 4 categories, seeded by app:init-game.

Progression:

  • ๐Ÿฅ‡ First step โ€” Complete your first session
  • ๐Ÿ“… CEB 2022 completed โ€” Answer all CEB 2022 questions
  • ๐Ÿ“… CEB 2023 completed โ€” Answer all CEB 2023 questions
  • ๐Ÿ“… CEB 2024 completed โ€” Answer all CEB 2024 questions
  • ๐Ÿ“… CEB 2025 completed โ€” Answer all CEB 2025 questions

Performance:

  • ๐Ÿ’ฏ Flawless โ€” 20/20 on a session
  • ๐ŸŒŸ Excellent โ€” 18/20 or more on a session
  • ๐Ÿ’ช Persistent โ€” Complete 10 sessions in total

Streak:

  • ๐Ÿ”ฅ On fire โ€” Streak of 5 consecutive correct answers
  • โšก Unstoppable โ€” Streak of 10
  • ๐Ÿค– Machine โ€” Streak of 20

Per subject:

  • ๐Ÿ”ข Math whiz โ€” 90%+ on a Math session
  • ๐Ÿ›๏ธ Historian โ€” 90%+ on a History/Geography session
  • ๐Ÿ”ฌ Scientist โ€” 90%+ on a Science session

๐Ÿ•น๏ธ Session flow

1. ๐Ÿ  Dashboard (home page)

  • Personalized welcome message for the child
  • Current level + XP bar
  • Current streak
  • "Start a session" button
  • Latest badges earned
  • Progress summary per subject

2. ๐Ÿš€ Starting a session

  • Mode selection:
    • By subject: Math, History/Geography, Science
    • Random mix: A bit of everything
  • 20 questions per session (fixed), drawn at random
  • Already-answered questions are excluded until the bank runs out
  • Years are mixed (no per-year filter)

3. ๐ŸŽฏ During the session (Symfony UX Live Component)

  • One question per step
  • Progress indicator (question 3/20)
  • Current streak visible in real time
  • Immediate feedback after each validated answer
  • Explanation shown if available
  • "Next question" button

4. ๐Ÿ† Results page (end of session)

  • Final score (X/20)
  • XP earned + animation on level up
  • Badges unlocked during the session
  • Recap of the 20 answers

5. ๐Ÿ“Š Profile / stats page

  • History of all sessions
  • All badges (earned ๐Ÿ”“ and locked ๐Ÿ”’)
  • Statistics per subject

๐Ÿฃ Easter Eggs

Hidden nods to the kids' favorite games:

  • ๐ŸŽฎ Call of Duty Black Ops โ€” References to the prestige system, "killstreak"-style messages for correct-answer runs, CoD-inspired badge names ("First Blood"...)
  • ๐Ÿงฑ Roblox โ€” References and nods scattered through the encouragement texts and the interface

๐Ÿ› ๏ธ Tech stack

Component Technology
Framework Symfony 8.1
Language PHP 8.4
Quiz Symfony UX Live Components
Database MySQL 8.4 (Docker) + Doctrine ORM
CSS Tailwind CSS v4
JS Stimulus + Turbo
Question data YAML files

๐Ÿ“‚ Question sources

Files in /docs:

  • questionnaires-ceb-2022.pdf
  • questionnaires-ceb-2023.pdf
  • questionnaires-ceb-2024.pdf
  • questionnaires-ceb-2025.pdf

โš™๏ธ Setup

  • Symfony + PHP: Installed by the developer
  • MySQL: Docker (set up by the developer)
  • Frontend dependencies: Asset Mapper + ImportMap (no npm/Webpack)
make run                                # Docker + Symfony server
make tailwind                           # Tailwind watch mode
make abort                              # Stop everything
make test                               # Run PHPUnit tests
make stan                               # Run PHPStan static analysis
php bin/console app:init-game           # Seed player + 14 badges (idempotent)
php bin/console app:init-game --reset   # Reset everything

๐Ÿงช Tests & quality

  • PHPUnit 13 โ€” fast, database-free unit tests under tests/ (make test)
  • PHPStan level 7 static analysis (make stan)
Test suite What it covers
GamificationServiceTest XP gains, streak bonuses, level thresholds & level-up
EasterEggServiceTest Killstreak messages, streak emojis, level-up messages
QuestionLoaderTest YAML loading, unique IDs & valid types across all 334 questions
SessionManagerTest Answer-grading engine for all 5 question types
QuestionTest / QuizSessionDataTest DTO logic (correct choices, step navigation)

Functional tests for badges, Doctrine repositories and controllers require a test database and are not included yet.


๐Ÿš€ Let's go!

"The CEB is like a final boss... But with CEB Tactical Operations, the kids have the cheat code!" ๐Ÿ’ช๐ŸŽฎ

Issues