How jasperxxl/y-kopie works
Yanlaa is a web-based interactive quiz platform. Teachers create and manage quizzes, optionally generate them from uploaded PDFs, then host live games or share self-paced quizzes; players join, answer questions, and view results and rankings. The React client also provides quiz discovery and school-management experiences, backed by Django APIs, WebSockets, persistent models, and background tasks. The README documents the major product modes; source-index references and sampled files support selected internal relationships, while unsampled wiring is left unasserted.
Main entry points: tasks.py Document generation tasks · App.tsx App routes · models.py Quiz and session data · sessions.py Session and answer services
Components 29
React client
- App routes
client/src/App.tsx - Quiz dashboard
client/src/dashboard/background.tsx - Live host UI
client/src/host/HostLivePlay.tsx - Live player UI
client/src/host/PlayerLivePlay.tsx - Self-paced play
client/src/modules/async/hooks/useAsyncQuiz.tsx - Quiz library
client/src/library/Library.tsx - PDF quiz workflow
client/src/library/GeneratorDocumentPage.tsx - School management
client/src/school/SchoolDashboard.tsx - Host session hooks
client/src/modules/host/hooks/useHostWebSocket.tsx - Player session hooks
client/src/modules/player/hooks/useJoinSession.tsx
Quiz gameplay
- Game registry
client/src/modules/games/gameRegistry.ts - Session and answer services
server/quiz/gameplay/services/sessions.py - Realtime services
server/quiz/gameplay/services/realtime.py - WebSocket consumers
server/quiz/gameplay/consumers.py - Async quiz API
server/quiz/gameplay/async_api.py - Gameplay tasks
server/quiz/gameplay/tasks.py
Quiz content
- Quiz and session data
server/quiz/models.py - Library API
server/quiz/library/api.py - Library search
server/quiz/library/services/search.py - Document generation tasks
server/quiz/quiz_generator/tasks.py - Generation records
server/quiz/quiz_generator/models.py
Accounts and schools
- Account API
server/quiz/accounts/api.py - Account quotas
server/quiz/accounts/services/quotas.py - School API
server/quiz/schools/api.py
Backend runtime
- PostgreSQL
- Redis / Valkey
- Celery worker
Other components
- Teacher
- Player
Connections 33
- Teacher → App routes: uses
README.md - Player → App routes: uses
README.md - App routes → Quiz dashboard: routes to
client/src/App.tsx - App routes → Quiz library: routes to
client/src/App.tsx - App routes → PDF quiz workflow: routes to
client/src/App.tsx - Teacher → Quiz dashboard: creates quizzes
- Teacher → Live host UI: hosts games
README.md - Player → Live player UI: joins games
README.md - Live host UI → Host session hooks: uses
client/src/host/HostLivePlay.tsx - Live player UI → Player session hooks: uses
- Host session hooks → WebSocket consumers: connects by WebSocket
README.md - Player session hooks → WebSocket consumers: connects by WebSocket
README.md - WebSocket consumers → Realtime services: uses realtime services
- Gameplay tasks → Realtime services: updates game state
server/quiz/gameplay/tasks.py - Gameplay tasks → Quiz and session data: reads sessions
server/quiz/gameplay/tasks.py - Self-paced play → Async quiz API: requests async play
- Async quiz API → Session and answer services: uses session services
- Quiz dashboard → Quiz and session data: manages quiz content
- Quiz library → Library API: browses quizzes
- Library API → Library search: searches library
- PDF quiz workflow → Document generation tasks: requests generation
- Document generation tasks → Generation records: updates jobs and documents
server/quiz/quiz_generator/tasks.py - Document generation tasks → Celery worker: runs asynchronously
server/quiz/quiz_generator/tasks.py - Document generation tasks → Account quotas: checks quotas
server/quiz/quiz_generator/tasks.py - Document generation tasks → Quiz and session data: creates quiz
- Account API → Account quotas: checks account limits
- School management → School API: manages school
- Session and answer services → Quiz and session data: reads and writes
server/quiz/gameplay/services/sessions.py - Session and answer services → Redis / Valkey: stores session state
server/quiz/gameplay/services/sessions.py - Realtime services → Redis / Valkey: uses state store
server/quiz/gameplay/services/realtime.py - Quiz and session data → PostgreSQL: persists records
README.md - School API → PostgreSQL: persists school data
- Library API → PostgreSQL: reads library data