How clairejerseyferrer/light-memory-challenge works
Light Memory Challenge is a physical memory game with an ESP32 device, a web interface, and a FastAPI backend. Players create and queue sessions, play on the device, then submit results for analysis and leaderboard ranking. The backend also exposes session status, device commands, and health information. The source excerpts show session and result handling, database helpers, and analysis; the README is empty, and firmware and browser implementation details were not sampled, so their connections are marked unverified where appropriate.
Main entry points: main.py FastAPI Service · data_access.py Session and Queue · index.html Web Interface · reliability.py Database Reliability
Components 13
Game Clients
- Web Interface
web/index.html - ESP32 Game
firmware/src/LightMemoryChallenge.ino
Backend API
- FastAPI Service
backend/main.py - Session and Queue
backend/data_access.py - Result Handling
backend/main.py
Gameplay and Analysis
- Payload Normalization
backend/telemetry.py - Difficulty Events
backend/difficulty_events.py - Performance Analysis
backend/intelligent_system.py
Persistence
- Results and Ranking
backend/data_access.py - Supabase Database
- Database Schema
database/schema.sql
Reliability
- Database Reliability
backend/reliability.py
Other components
- Player
Connections 15
- Player → Web Interface: uses
- Web Interface → FastAPI Service: requests
- ESP32 Game → FastAPI Service: sends game data
- FastAPI Service → Web Interface: serves page
backend/main.py - FastAPI Service → Session and Queue: creates and reads sessions
backend/main.py - FastAPI Service → Result Handling: accepts results
backend/main.py - Result Handling → Payload Normalization: normalizes payload
backend/main.py - Result Handling → Difficulty Events: validates events
backend/main.py - Result Handling → Performance Analysis: analyzes performance
backend/main.py - FastAPI Service → Results and Ranking: loads results
backend/main.py - Session and Queue → Supabase Database: reads and writes
backend/data_access.py - Results and Ranking → Supabase Database: reads results
backend/data_access.py - FastAPI Service → Supabase Database: queries
backend/main.py - Session and Queue → Database Reliability: imports error handling
backend/data_access.py - FastAPI Service → Database Reliability: checks database health
backend/main.py