1.2 KiB
1.2 KiB
Notes
Implementation Choices
- QR codes are generated server-side with the Python
qrcodepackage and returned as an SVG data URL from session creation. live_histogramis pushed on every accepted submission. There is no throttling in v1 because the acceptance load is small and this keeps behavior simple.- WebSocket broadcast sends are queued as background tasks. This prevents one slow classroom device from blocking state transitions or auto-close.
- The optional observer page exists as a placeholder only. The spec explicitly marks it optional.
- Tests use one FastAPI
TestClientportal for multi-student WebSocket simulation. Each socket is opened after joining as that student, and the stored socket identity remains stable after the cookie is overwritten for the next simulated student. - Python 3.14.4 was used locally. The project requires Python 3.11 or newer.
Deviations
- The admin frontend includes a compact one-question sample in the Add Pool modal for convenience. The full 10-question Week 9 pool is in
examples/week9_pool.json. - FastAPI emits a deprecation warning for
on_eventunder the installed version. Startup works correctly, and the warning is not user-facing.