# 05 - Gamification Engine Architecture: State Machines & Mechanics

Designing a gamification engine: state machines for progression, badges, leaderboards and engagement mechanics.

## What you'll learn

- 1. Design Principles: Intrinsic vs Extrinsic Gamification
- 2. State Machine for Student Progression
- 3. XP System and Levels with Progression Curves
- 4. Idempotent Badge System with Configurable Rules
- 5. Real-Time Leaderboards with Redis Sorted Sets

*This article is part of the **EdTech** series on federicocalo.dev.*

---

## Read the full article

The complete article (24 min read) with code examples, diagrams, and practical exercises is available here:

**➡️ [05 - Gamification Engine Architecture: State Machines & Mechanics](https://federicocalo.dev/en/blog/gamification-engine-architecture-state-machines)**

`https://federicocalo.dev/en/blog/gamification-engine-architecture-state-machines`

---

*By [Federico Calò](https://federicocalo.dev) — Software Developer & Technical Writer*
