How trunkyfgc/trunky-overlay works
Main Components
a) Frontend Layer:
• Svelte Application (in /static)
• Scoreboard View
• Control Center View
• Browser Source (OBS Integration point)
b) Backend Layer:
• Rust Server
• WebSocket Communication System
• Static File Serving
c) Core Libraries:
• embed_static: Static file embedding
• parser: Data parsing functionality
• socket: WebSocket handling
Architecture Pattern
[Frontend Layer]
• Scoreboard View (Browser/OBS)
• State Management
• Player List Store
• Scoreboard Store
• Control Center View (Browser)
• Control Interface
• Shared Components
• WebSocket Client
[Backend Layer]
• Rust Server
• Static File Server
• WebSocket Handler
• State Management
[Libraries]
• embed_static
• parser
• socket
Key Elements to Highlight
a) Data Flow:
• Frontend Components: Blue
• Backend Components: Green
• WebSocket Communications: Purple
• Static File Serving: Gray
• Libraries: Orange
Implementation Details
[OBS Layer]
• ↓
[Frontend Views]
• ↕
[WebSocket Layer]
• ↕
[Backend Server]
• ↓
[Core Libraries]
Additional Notes
• Notes about the development setup (Node.js and Rust requirements)
• Port (8080) and endpoints (/app/scoreboard.html, /app/control.html)
• Build process flow from source to final binary
Technical Stack Indicators
• Svelte for frontend framework
• Rust for backend server
• WebSocket for real-time communication
• Tailwind CSS for styling
• TypeScript for type safety
• Vite for development server
Remember to indicate that this is a single binary application where the frontend is embedded into the Rust server, making it easy to distribute and deploy.