Module services

Module services 

Source
Expand description

Service layer for CLI business logic

Services contain reusable business logic that can be shared across multiple command handlers. Each service is responsible for a specific domain:

  • RedisService: Redis connection and pub/sub operations
  • ConfigService: Project configuration management
  • ProjectService: Project detection and validation
  • TemplateService: Template rendering for code generation
  • SimulationService: Godot simulation generation
  • ProcessService: Process lifecycle management
  • DockerService: Docker container operations
  • ComponentCatalogService: Component discovery and installation
  • PackageService: Deployment package creation
  • DeploymentService: Remote deployment via SSH
  • DiscoveryService: Network node discovery
  • InitService: Project initialization logic
  • ProjectTemplateService: Project template file generation
  • LogsService: Log file collection and filtering
  • DevService: Development mode operations
  • DevSession: Development session lifecycle management
  • ModelService: AI model management and HuggingFace Hub integration
  • SimulationAssetsService: Simulation asset download from GitHub releases

§Design Principles

  • Stateless: Services should be stateless where possible
  • Reusable: Services should be usable across multiple commands
  • Testable: Services should have no CLI dependencies
  • Focused: Each service has a single, clear responsibility

Re-exports§

pub use auth::AuthService;
pub use component_catalog::ComponentCatalogService;
pub use config::ConfigService;
pub use credentials::CredentialsService;
pub use deployment::DeploymentService;
pub use dev::DevService;
pub use discovery::DiscoveryService;
pub use docker::DockerService;
pub use init_service::InitService;
pub use logs::LogContentFilters;
pub use logs::LogFileFilters;
pub use logs::LogsService;
pub use model_service::ModelService;
pub use node_generator::NodeGeneratorService;
pub use package::PackageService;
pub use process::ProcessService;
pub use project::ProjectService;
pub use project_template_service::ProjectTemplateService;
pub use redis::RedisService;
pub use simulation::SimulationService;
pub use simulation_assets::SimulationAssetsService;
pub use template::TemplateService;
pub use template_download::TemplateDownloadService;
pub use topology::Topology;
pub use topology::TopologyService;

Modules§

auth
Authentication service for device code flow
component_catalog
Component catalog service for managing available components
config
Configuration service for managing project configuration
credentials
Credentials service for managing user authentication credentials
deployment
Deployment service for remote robot deployment
dev
Development mode service
discovery
Discovery service for finding Mecha10 nodes on the network
docker
Docker service for container and Docker Compose operations
init_service
Init service for project initialization
logs
Logs service for managing log file operations
model_service
Model management service for downloading and caching AI models from HuggingFace Hub
node_generator
Node generator service
package
Package service for creating deployment packages
process
Process service for managing child processes
project
Project service for managing Mecha10 projects
project_template_service
Project template service for generating project files
redis
Redis service for managing Redis connections and operations
simulation
Simulation service for Godot scene generation and management
simulation_assets
Simulation assets service for downloading and caching simulation files from GitHub releases
template
Template service for code generation
template_download
Template download service
topology
Topology service for analyzing project structure