How bilaharivp/quiz works
This is a NiceGUI multiplayer quiz application with separate player and administrator pages. Players register, answer timed questions, and earn points; administrators add questions, control quiz progression, and show or hide rankings. MongoDB persists questions, player scores, answers, and shared game state. The sampled code shows the main calls between these components; the README provides no additional capability detail. The standalone leaderboard helper is included, but no caller for it is shown.
Main entry points: main.py Player page · admin.py Admin panel · game_state.py Game state · quiz.py Questions and answers
Components 9
Quiz interfaces
- Player page
main.py - Admin panel
admin.py
Quiz gameplay
- Game state
modules/game_state.py - Questions and answers
modules/quiz.py
Persistence and results
- Player profiles and scores
modules/users.py - Leaderboard queries
modules/leaderboard.py - MongoDB
database/db.py
Other components
- Player
- Administrator
Connections 14
- Player → Player page: uses
main.py - Administrator → Admin panel: uses
admin.py - Player page → Player profiles and scores: registers and scores
main.py - Player page → Questions and answers: checks and saves answers
main.py - Player page → Game state: reads quiz status
main.py - Player page → Player profiles and scores: reads rankings
main.py - Admin panel → Game state: controls quiz
admin.py - Admin panel → Questions and answers: adds questions
admin.py - Admin panel → Player profiles and scores: reads rankings
admin.py - Game state → Questions and answers: reads questions
modules/game_state.py - Game state → MongoDB: reads and writes state
modules/game_state.py - Questions and answers → MongoDB: reads and writes questions and answers
modules/quiz.py - Player profiles and scores → MongoDB: reads and writes players
modules/users.py - Leaderboard queries → MongoDB: reads and updates scores
modules/leaderboard.py