feat: microservices scaffold + Auth Service (Step 1)
- Add shared/ module: config, db, models, schemas, redis utilities - Add Auth Service (services/auth/): register, login, refresh, me, ForwardAuth /verify endpoint for Traefik - Add Traefik config: ACME/Cloudflare DNS-01, dynamic routing, ForwardAuth middleware, sticky sessions for WS Gateway - Add service scaffolds: ws-gateway, chat, batch-agent, billing (READMEs) - Add redis>=5.0.0 to requirements.txt - Monolith app/ is untouched — strangler fig migration
This commit is contained in:
17
services/ws-gateway/README.md
Normal file
17
services/ws-gateway/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# WS Gateway
|
||||
|
||||
Stateless WebSocket proxy. Accepts Electron connections, authenticates JWT,
|
||||
routes frames to Chat/Batch services via Redis pub/sub.
|
||||
|
||||
## No business logic
|
||||
This service does NOT know what tasks, notes, or agents are.
|
||||
It only routes JSON frames between Electron and downstream services.
|
||||
|
||||
## Scaling
|
||||
Sticky sessions on `user_id` (Traefik consistent hashing).
|
||||
|
||||
## Redis channels used
|
||||
- Subscribe: `ws:out:{user_id}` (frames to send to client)
|
||||
- Publish: `chat:request:{user_id}`, `batch:request:{user_id}`
|
||||
- LPUSH: `tool:result:{call_id}` (from client tool_result frames)
|
||||
- HSET/HDEL: `ws:devices:{user_id}` (device registry)
|
||||
Reference in New Issue
Block a user