Real-timehard

Team chat with rooms and presence

Rooms, live messages, presence, typing indicators and history that survives reconnects without duplicates.

Suggested effort
~5h focused work
Window
24 hours
Starts from
An empty repo
Stack
Your choice
Sign in to start this build →

Opens in a new tab. The clock starts when you press Start inside the environment, not before, and your workspace is kept while you step away.

Time window 24 hours. Suggested effort about 5 hours.

Context

A small team wants a self-hosted chat: a few rooms, live messages, who is online, and history that is there when you come back in the morning.

Core requirements

  • Pick a display name (no passwords needed) and join one or more rooms; create new rooms.
  • Messages are delivered live to everyone in the room over WebSockets.
  • History: joining a room loads the last 50 messages, and older ones load on scroll (cursor pagination).
  • Presence: each room shows who is online, updated as people connect and disconnect (multiple tabs count once).
  • Typing indicator ("Ana is typing...") that clears itself.
  • Messages persist (SQLite or Postgres).

Acceptance criteria

  • Messages from one sender arrive in the order they were sent, and each carries a server-assigned id and timestamp.
  • A client that drops its connection reconnects automatically and receives the messages it missed, without duplicates.
  • Message text is rendered safely: <script> in a message shows as text.
  • Server-side validation: maximum message length, room names, and a simple per-connection rate limit.
  • Tests cover the message store, the pagination cursor and a two-client socket conversation.

Stretch goals (optional)

  • Unread counts per room.
  • Edit and delete own messages, broadcast to everyone.
  • Direct messages between two people.

Constraints

  • Any stack. Suggested: Node (ws or Socket.IO) + React or Svelte, or Python (FastAPI) + any front end.

Deliverables (every project)

  • Source code committed in this repository (the grader diffs against the first commit).
  • README.md that 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 ./... or cargo 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.
Team chat with rooms and presence: a 24-hour take-home project | PraxisAI