home/coding/prompt-websocket

Prompt Websocket

GPTClaudeDeepSeek··1,258 copies·updated 2026-07-14
prompt-websocket.prompt
# Prompt — WebSocket service

> [🇷🇺 Русский](../ru/prompt-websocket.md) · 🇬🇧 **English**

[← Index](./README.md) · [Standards](./standards.md) · [Template](./template.md)

tags: #prompt #websocket #realtime #backend #service #single-shot
**Status:** `🟢 Ready`
**Owner:** Pandamy619
**Last edit:** 2026-05-20
**Version:** v1
**Source idea:** [LogicBalls — WebSocket Service Generator](https://logicballs.com/ai-prompt/prompts/websocket-service-generator)
**Delta from original:** added honest alternatives (SSE / polling), explicit reconnect-resilience requirement, and the canonical "behavior when context is missing" block.

---

## When to use

- When you need a real-time service: chat, live updates, collaboration, game events
- When you need to think through protocol, scaling, and auth before implementation
- When REST no longer covers latency / push scenarios

## What to substitute

- `{{programming_language}}` — string, e.g. `Python 3.13` / `Go 1.22`
- `{{framework}}` — string, e.g. `FastAPI + websockets` / `Starlette` / `gorilla/websocket`
- `{{use_case}}` — string, e.g. `team chat up to 100 people per room`
- `{{scale_requirements}}` — string, e.g. `~50k concurrent connections; 500 msg/sec per connection peak`
- `{{auth_method}}` — enum: `jwt | oauth2 | api_key | session_cookie | signed_url`
- `{{persistence_requirement}}` — string, e.g. `last 100 messages in Redis; long-term archive in S3`
- `{{infrastructure}}` — string, e.g. `Kubernetes, Redis Streams as backplane, ALB with sticky sessions`

## Definition of done

Universal minimum — see [Definition of done](./standards.md#2-definition-of-done).

Specific criteria:

- Connection lifecycle described with concrete messages (payload examples), not just "there's a heartbeat"
- A specific pub/sub backplane is named (Redis / NATS / Kafka), not "some broker"
- Reconnect strategy is worked out: what happens to missed messages
- If WebSocket isn't optimal — an alternative is honestly proposed (SSE, long polling) with reasoning

## Prompt

fill the variables

This prompt has 7 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.

{{programming_language}{{framework}{{use_case}{{scale_requirements}{{auth_method}{{persistence_requirement}{{infrastructure}
Unlock with Pro →

when to use it

Community prompt sourced from the open-source GitHub repo pandamy619/Promts (MIT). A "Prompt Websocket" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

codingcommunitydeveloper

source

pandamy619/Promts · MIT