How ollienunn/secure-software-ollienunn001-1-main works
Small-Brain is a browser-based quiz authoring and live-play application, backed by a Flask API. Admins register or log in, create and edit quizzes, launch sessions, and review results; players join with a session ID, answer timed questions, and see results. The graph follows the documented frontend-service/API/backend flow and the sampled authentication and session-start code. Several route, service, and core implementations were not sampled, so their documented responsibilities are shown without asserting uncertain internal calls.
Main entry points: App.jsx Route application · api.js API transport · routes Admin routes · app.py HTTP routes
Components 20
Web application
- Route application
frontend/src/App.jsx - Admin routes
frontend/src/routes - Player routes
frontend/src/routes - Route protection
frontend/src/routes/SecuredRoutes.jsx - Auth gate
frontend/src/components/auth/Authorisation.jsx - Auth client
frontend/src/services/auth.js - Quiz client
frontend/src/services/game.js - Play client
frontend/src/services/play.js - Session client
frontend/src/services/session.js - API transport
frontend/src/services/api.js
Flask API
- HTTP routes
backend/app.py - Authentication
backend/services/auth.py - Quiz and sessions
backend/services/game.py - Player actions
backend/services/player.py
Backend domain logic
- Auth logic
backend/core/auth_core.py - Game logic
backend/core/game_core.py - Player logic
backend/core/player_core.py
Persistent state
- JSON data
backend/database/data.py
Other components
- Quiz admin
- Quiz player
Connections 26
- Quiz admin → Route application: uses
- Quiz player → Route application: uses
- Route application → Admin routes: dispatches
- Route application → Player routes: dispatches
- Route application → Route protection: protects
- Route protection → Auth gate: checks access
- Auth gate → Auth client: validates token
- Admin routes → Auth client: authenticates
- Admin routes → Quiz client: edits quizzes
- Admin routes → Session client: manages sessions
- Player routes → Play client: plays sessions
- Auth client → API transport: requests
- Quiz client → API transport: requests
- Play client → API transport: requests
- Session client → API transport: requests
- API transport → HTTP routes: HTTP requests
- HTTP routes → Authentication: dispatches auth
- HTTP routes → Quiz and sessions: dispatches game
- HTTP routes → Player actions: dispatches play
- Authentication → Auth logic: uses auth logic
- Quiz and sessions → Game logic: uses game logic
- Player actions → Player logic: uses player logic
- Authentication → JSON data: reads and writes
- Auth logic → JSON data: reads users
- Game logic → JSON data: accesses data
- Player logic → JSON data: accesses data