Time window 24 hours. Suggested effort about 4 hours.
Context
A speaker wants to ask the room questions during a talk and show the results updating live on the projector.
Core requirements
- The presenter creates a poll (question plus 2 to 6 options) and gets a short join code and a results page.
- Audience members open
/join/CODEon their phones and vote once per poll. - The results page updates in real time (WebSocket or Server-Sent Events) as votes arrive, with no refresh.
- The presenter can close the poll; voting then stops and every client shows "closed".
- A voter who refreshes the page sees their own vote, not a fresh ballot.
Acceptance criteria
- Opening the results page on two browsers and voting from a third updates both within a second.
- One vote per voter per poll is enforced on the server (an anonymous cookie or token is fine), not only in the UI.
- Disconnects are handled: a results page that loses its connection reconnects and resynchronises the counts.
- Tests cover the vote rules on the server and at least one real socket or SSE round trip.
- The audience page is usable on a 375px-wide phone screen.
Stretch goals (optional)
- Multiple questions per session that the presenter steps through.
- Word-cloud questions (free-text answers, profanity filtered).
- Horizontal scaling story: run two server instances and share state (for example through Redis), or explain how you would.
Constraints
- Any stack. Suggested: Node (ws, Socket.IO, or SSE) with a small front end, or Python (FastAPI WebSockets).
- In-memory state is acceptable if the README says what is lost on restart.
Deliverables (every project)
- Source code committed in this repository (the grader diffs against the first commit).
README.mdthat replaces the stub, with: how to install, run and test it (copy-pasteable commands); the decisions and trade-offs you made; what you would do next with more time; and a short note on how you used the AI agent (what you delegated, what you checked or rewrote).- Automated tests that run with a single command (
npm test,pytest,go test ./...orcargo test). - No secrets in the repository. Anything configurable reads from environment variables with safe defaults.
Ground rules
- The 24-hour clock is a window, not a workload. Stop at roughly the suggested effort, then write down what you would do next. A small, finished, tested core beats a large unfinished one.
- Use the AI agent as much or as little as you like: every prompt is recorded and the report shows how it was used. You are judged on the result and on whether you understood and verified what the agent produced.
- The work is yours. PraxisAI uses it only to produce your assessment report.