How placenl/chief works
Main System Components
a) WebSocket Server Layer
• Central communication hub for real-time updates
• Handles various types of messages (orders, capabilities, subscriptions)
• Located in /src/ws directory
b) REST API Layer
• HTTP endpoints for non-real-time operations
• Documented in /docs/rest/ROUTES.md
• Located in /src/api directory
c) Core Services
• Artist Service (/src/artist)
• Service (/src/place)
• Template Service (/src/template)
• Metrics Service (/src/metrics)
d) Web Interface
• Artist interface (/web/artist)
• Order creation interface (/web/artist/createorder)
• Main dashboard (/web/index.html)
Component Relationships
a) Client Communication Flow:
Clients <---> WebSocket Server <---> Core Services
Clients <---> REST API <---> Core Services
b) Internal Service Communication:
Template Service <---> Place Service
Artist Service <---> Template Service
Metrics Service <--- (monitors all services)
Specific Elements
a) WebSocket Handlers (from /src/ws/handler):
• Brand handler
• Capabilities handler
• Orders handler
• Handler
• Stats handler
• Subscriptions handler
b) Client Types (from docs/client):
• Overlay clients
• Automatic placers
• Different subscription types
Notes for Implementation Details
Annotations for:
• Docker container boundary (due to presence of Dockerfile)
• GitHub Actions workflow integration
• Metrics collection points
• Client capability negotiation
Remember to indicate the scalability points and potential bottlenecks in the system, as this is crucial for a r/Place coordination server that might need to handle numerous concurrent connections and template updates.