Skip to content
Flows
0/10 steps0%

Step 1 of 10

Inspect the existing chat architecture and choose presence data flow

Establish where WebSocket connections, user identity, and chat participants already exist so presence can be added without breaking the app.

💡

Presence works best when the builder first maps the current auth, chat, and socket layers instead of generating a parallel system.

Prompt capsule

Inspect the current codebase and summarize the existing architecture for auth, chat conversations, messages, frontend state, and any real-time transport. Identify where the authenticated user ID becomes available, where chat participants are loaded, whether WebSockets or Socket.IO already exist, and where presence state should live on both backend and frontend. Produce a concrete implementation plan with files to edit, server events to add, client listeners to add, and how presence should be scoped to relevant conversations or participants.

Paste into Claude · Complete implementation prompt with explicit requirements

Expected after this step

A clear integration plan that maps current auth, sockets, conversations, and UI components to the new presence system.

Should not happen

  • AI adds a green dot UI but never connects it to real WebSocket events
  • AI marks users offline on any disconnect without checking for other active connections
  • AI implements typing indicators that never clear or clear globally across all chats
  • AI only updates local client state and does not broadcast to other participants

Verify before continuing

Do not move on until every check is true. The complete button stays locked until then.

Do not continue if…

  • !AI adds a green dot UI but never connects it to real WebSocket events
  • !AI marks users offline on any disconnect without checking for other active connections
  • !AI implements typing indicators that never clear or clear globally across all chats
  • !AI only updates local client state and does not broadcast to other participants
  • !AI uses polling or fake timers instead of actual socket presence tracking

If the AI messes this up

Use this when the AI fakes progress or breaks the feature. It forces a real fix.

You gave a generic plan. Re-read the existing project structure and produce a project-specific presence integration map: socket server file, auth source, chat participant source, frontend chat header component, conversation state store, and exact new events and state fields to add.

Your notes for this step