How furmanovvitaliy/self-hosted-cloud-gaming-service works
Pixel Cloud is a self-hosted cloud-gaming service: users browse a game library, authenticate, join rooms, and play games streamed from server-managed game environments. The graph shows the web router and input controls, plus the server’s documented composition of game, user, scanner, streaming, and VM services. Several backend runtime links are based on the composition root; internal use-case and route behavior was not sampled, so those details are not expanded.
Main entry points: app.go Application composition · hub Room hub · app.ts Web router · input.ts Gamepad input
Components 24
Web client
- Web router
web/src/app/app.ts - Pages
web/src/pages - API clients
web/src/api/api.ts - Auth client
web/src/api/auth.ts - Gamepad input
web/src/components/templates/input.ts - Gamepad keyboard
web/src/components/templates/gamepad-keyboard.jsx - WebRTC client
web/src/components/templates/webrtc.ts - Web bootstrap
web/src/main.tsx
Server runtime
- Application composition
server/cmd/app/app.go - HTTP server
server/pkg/http/server.go - HTTP API routes
server/internal/handler/http/api/v1 - Use cases
server/internal/usecase - MongoDB
Game and identity
- Game catalog
server/internal/domain/game - User accounts
server/internal/domain/user - Game scanner
server/internal/core/scanner - IGDB metadata
server/internal/adapters/igdb/igdb.go
Game streaming
- Room hub
server/internal/core/hub - Game VM containers
server/internal/infrastructure/docker/service.go - Virtual displays
server/internal/infrastructure/display - Resource manager
server/internal/core/srm/srm.go - WebRTC streamer
server/internal/infrastructure/wrtc/service.go - WebSocket broker
server/internal/infrastructure/broker/websocket_broker.go
Other components
- Player
Connections 27
- Player → Web router: navigates
web/src/app/app.ts - Web router → Pages: renders
web/src/app/app.ts - Web router → Gamepad input: clears focus
web/src/app/app.ts - Web bootstrap → Web router: starts router
web/src/main.tsx - Web bootstrap → Gamepad input: starts handling
web/src/main.tsx - Auth client → API clients: extends
web/src/api/auth.ts - Gamepad input → Gamepad keyboard: loads keyboard
web/src/components/templates/input.ts - Application composition → MongoDB: connects
server/cmd/app/app.go - Application composition → IGDB metadata: initializes client
server/cmd/app/app.go - Application composition → Game catalog: creates storage
server/cmd/app/app.go - Application composition → User accounts: creates storage
server/cmd/app/app.go - Application composition → Game scanner: creates service
server/cmd/app/app.go - Application composition → Virtual displays: creates service
server/cmd/app/app.go - Application composition → Resource manager: creates service
server/cmd/app/app.go - Application composition → Room hub: creates service
server/cmd/app/app.go - Application composition → WebRTC streamer: creates service
server/cmd/app/app.go - Application composition → Game VM containers: creates service
server/cmd/app/app.go - Application composition → Use cases: assembles
server/cmd/app/app.go - Application composition → HTTP API routes: creates handler
server/cmd/app/app.go - Application composition → HTTP server: starts server
server/cmd/app/app.go - HTTP server → HTTP API routes: registers routes
server/pkg/http/server.go - API clients → HTTP API routes: calls API
- WebRTC client → WebRTC streamer: negotiates stream
- Gamepad input → Room hub: sends controls
- Room hub → Game VM containers: starts game VM
- Room hub → WebRTC streamer: relays media
- Room hub → WebSocket broker: uses messaging