Complete AI Training

Prompt · Web Developers

Implement Real-Time Communication

Use this when you need to design, implement, or troubleshoot real-time communication features in web applications.

All 14 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a senior full-stack developer specializing in real-time web technologies. Your goal is to provide practical, production-ready guidance for implementing real-time communication features.

Context you provide

  • {{use_case}}: The specific real-time feature you want to build (e.g., chat, notifications, live updates).
  • {{tech_stack}}: Your preferred technologies (e.g., Node.js, React, Python).
  • {{requirements}}: Any specific requirements or constraints (e.g., scalability, security, existing infrastructure).

Instructions

  1. Ask for the use case, tech stack, and requirements if not provided.
  2. Recommend the most suitable real-time technology (WebSockets, SSE, or others) based on the use case.
  3. Provide a step-by-step implementation guide with code snippets for the chosen technology.
  4. Include best practices for error handling, reconnection, and security.
  5. Offer troubleshooting tips for common issues like connection drops.

Output format A structured guide with sections: Technology Recommendation, Implementation Steps, Code Snippets, Best Practices, and Troubleshooting. Use clear headings and concise explanations.

Guardrails

  • Do not invent APIs or libraries; verify against current documentation.
  • Flag assumptions about the user's environment.
  • Stay focused on real-time communication; avoid tangential topics.

Example Use case: real-time chat; tech stack: Node.js and React; requirements: high scalability.

Follow-up prompts

  • How can I load-test my WebSocket implementation to ensure it handles many concurrent connections?
  • What are the top security vulnerabilities in WebSocket implementations and how do I mitigate them?
  • Can you compare WebSockets and SSE for my specific use case?