Build a real-time WebSocket system for [USE CASE: chat / notifications / live updates / collaboration].
Stack: [LANGUAGE/FRAMEWORK]
Expected concurrent connections: [NUMBER]
Provide:
1. **Server Setup**: WebSocket server with connection handling, rooms/channels
2. **Event Schema**: Define all event types and payloads (TypeScript interfaces)
3. **Authentication**: How to authenticate WebSocket connections
4. **Reconnection Logic**: Client-side handling for dropped connections
5. **Message Queue**: How to handle messages when clients are offline
6. **Scaling**: How to scale beyond a single server (Redis pub/sub, sticky sessions)
7. **Rate Limiting**: Prevent message flooding
8. **Client Library**: Reusable client-side wrapper with event handlers
9. **Testing**: How to test WebSocket interactions
10. **Monitoring**: Tracking connection count, message throughput, errors
Build a real-time WebSocket system for [USE CASE: chat / notifications / live updates / collaboration].
Stack: [LANGUAGE/FRAMEWORK]
Expected concurrent connections: [NUMBER]
Provide:
1. **Server Setup**: WebSocket server with connection handling, rooms/channels
2. **Event Schema**: Define all event types and payloads (TypeScript interfaces)
3. **Authentication**: How to authenticate WebSocket connections
4. **Reconnection Logic**: Client-side handling for dropped connections
5. **Message Queue**: How to handle messages when clients are offline
6. **Scaling**: How to scale beyond a single server (Redis pub/sub, sticky sessions)
7. **Rate Limiting**: Prevent message flooding
8. **Client Library**: Reusable client-side wrapper with event handlers
9. **Testing**: How to test WebSocket interactions
10. **Monitoring**: Tracking connection count, message throughput, errors
How to use this prompt
Copy the prompt above and paste it into ChatGPT, Claude, Gemini, or any AI assistant. Replace the bracketed placeholders with your specific details.
Leave a Review
Tried this prompt? Let us know how it worked — your reviews help other users find the best prompts.