How tsanga/orbt works
Main Components
• API Service (orbt/api): Written in Rust, it uses GraphQL to handle user data, sessions, and real-time updates via websockets (for chat or other server–client state management). Note the modular structure in directories like auth, model, schema, store, stream, and types.
• CLI (orbt/cli): Acts as the “gateway” for bundling and running the API and web services together. It assists in creating an interactive session (configuring room names, passwords, etc.) and packages everything into a single executable.
• Web Frontend (orbt/web): Built with Next.js 13 (using the appDir beta) and React 18, this service provides the user interface, handling client-side interactions and communicating with the API.
• (Planned) Virtual Machine Service (orbt/vm – currently commented out in the README): This would handle launching a lightweight container that runs a virtual display, browser, and captures display via ffmpeg with support for WebRTC to relay the video stream.
Architectural Patterns
• Separation of Concerns: The system is clearly divided into distinct services for API, web, CLI (and eventually VM), promoting modularity.
• Microservices/Containerization: Each component has its own Docker configuration (e.g., Dockerfile in both the api and web directories and a docker-compose.yaml at the root) which suggests container-based deployment.
• Integration via GraphQL & WS: The API layer not only serves GraphQL queries/mutations but also handles websocket-based subscriptions to push events like chat messages.
• Build and CI/CD Pipelines: GitHub Actions workflows (.github/workflows/api.yml and web.yml) indicate automated testing and deployment pipelines for the API and web services.
Final Recommendations
• Use clear labels for every component (e.g., “orbt/api – GraphQL Engine (Rust)”, “orbt/web – Frontend (Next.js/React)”, “orbt/cli – Service Orchestrator”, “orbt/vm – Planned Virtual Machine Service”).
• From Web to API: “GraphQL Calls / WS Subscriptions”.
• From CLI to API & Web: “Orchestration Commands”.
Happy diagramming!