-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture Components
github-actions[bot] edited this page Dec 6, 2025
·
2 revisions
ReadyStackGo consists of several clearly separated components that work together to manage the entire stack.
┌─────────────────────────────────────────────────────────────────┐
│ ReadyStackGo Admin Container │
│ ┌─────────┐ ┌─────────┐ ┌──────────────┐ │
│ │ Web UI │ │ API │ │ Wizard │ │
│ └────┬────┘ └────┬────┘ └──────┬───────┘ │
│ └────────────┼───────────────┘ │
│ ┌─────────────────┴────────────────────────┐ │
│ │ Application Layer │ │
│ │ (MediatR, UseCases, Commands, Queries) │ │
│ └─────────────────┬────────────────────────┘ │
│ ┌─────────────────┴────────────────────────┐ │
│ │ Domain Layer │ │
│ │ (Aggregates, Entities, Value Objects, │ │
│ │ Domain Services, Domain Events) │ │
│ └─────────────────┬────────────────────────┘ │
│ ┌─────────────────┴────────────────────────┐ │
│ │ Infrastructure Layer │ │
│ │ ┌────────────┐ ┌────────┐ ┌────────┐ │ │
│ │ │ DataAccess │ │ Docker │ │ Config │ │ │
│ │ │ (SQLite) │ │Service │ │ Store │ │ │
│ │ └────────────┘ └────────┘ └────────┘ │ │
│ │ ┌────────────┐ ┌────────┐ ┌────────┐ │ │
│ │ │ Auth │ │ TLS │ │ Stacks │ │ │
│ │ │ Service │ │Service │ │ Service│ │ │
│ │ └────────────┘ └────────┘ └────────┘ │ │
│ └──────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
Docker Socket / API
│
┌────────────────┴────────────────┐
│ Managed Containers │
│ (Gateway, BFFs, Services) │
└──────────────────────────────────┘
Basic DDD Building Blocks:
| Class | Description |
|---|---|
AggregateRoot<TId> |
Base class for Aggregate Roots with Domain Events |
Entity<TId> |
Base class for Entities with Identity |
ValueObject |
Base class for immutable Value Objects |
DomainEvent |
Base class for Domain Events |
AssertionConcern |
Validation helper methods |
Bounded Context for identity and access management:
IdentityAccess/
├── Organizations/ # Organization Aggregate
│ ├── Organization.cs # Aggregate Root
│ ├── OrganizationId.cs # Typed ID (Value Object)
│ ├── IOrganizationRepository.cs
│ └── OrganizationProvisioningService.cs # Domain Service
│
├── Users/ # User Aggregate
│ ├── User.cs # Aggregate Root
│ ├── UserId.cs # Typed ID
│ ├── EmailAddress.cs # Value Object
│ ├── HashedPassword.cs # Value Object
│ ├── Enablement.cs # Value Object
│ ├── RoleAssignment.cs # Value Object
│ ├── IUserRepository.cs
│ ├── AuthenticationService.cs # Domain Service
│ └── SystemAdminRegistrationService.cs # Domain Service
│
└── Roles/ # Role Aggregate
├── Role.cs # Aggregate with Built-in Roles
├── RoleId.cs # Typed ID
├── Permission.cs # Value Object
├── ScopeType.cs # Enum (Global, Organization, Environment)
└── IRoleRepository.cs
Bounded Context for deployment management:
Deployment/
├── Environments/ # Environment Aggregate
│ ├── Environment.cs # Aggregate Root
│ ├── EnvironmentId.cs # Typed ID
│ ├── EnvironmentType.cs # Enum (DockerSocket, DockerApi)
│ ├── ConnectionConfig.cs # Value Object
│ └── IEnvironmentRepository.cs
│
└── Deployments/ # Deployment Aggregate
├── Deployment.cs # Aggregate Root
├── DeploymentId.cs # Typed ID
├── DeploymentStatus.cs # Enum (Pending, Running, Stopped, Failed, Removed)
├── DeployedService.cs # Entity
└── IDeploymentRepository.cs
Bounded Context for stack source management:
StackManagement/
└── StackSources/
├── StackSource.cs # Aggregate Root
├── StackSourceId.cs # Typed ID
├── StackSourceType.cs # Enum (LocalDirectory, GitRepository)
├── StackDefinition.cs # Value Object (Stack Metadata)
├── StackVariable.cs # Value Object
├── IStackSourceRepository.cs
└── IStackDefinitionRepository.cs
| Domain | Commands | Queries |
|---|---|---|
| Administration | RegisterSystemAdmin | - |
| Authentication | Login | - |
| Organizations | ProvisionOrganization | - |
| Environments | CreateEnvironment, UpdateEnvironment, DeleteEnvironment, SetDefaultEnvironment, TestConnection | GetEnvironment, ListEnvironments |
| Deployments | DeployCompose, RemoveDeployment, ParseCompose | GetDeployment, ListDeployments |
| Containers | StartContainer, StopContainer | ListContainers |
| Stacks | - | GetStack, ListStacks |
| StackSources | SyncStackSources | ListStackSources |
| Dashboard | - | GetDashboardStats |
| Wizard | CompleteWizard | GetWizardStatus |
Infrastructure abstraction for Dependency Inversion:
| Interface | Description |
|---|---|
IDockerService |
Docker Engine abstraction (Containers, Images, Networks) |
IDockerComposeParser |
Parses Docker Compose YAML |
IDeploymentService |
High-level deployment orchestration |
IEnvironmentService |
Environment management |
IStackSourceService |
Stack source synchronization |
IStackSourceProvider |
Provider pattern for different source types |
IStackCache |
In-memory cache for stack definitions |
ITokenService |
JWT token generation |
DataAccess/
├── ReadyStackGoDbContext.cs # EF Core DbContext
├── Configurations/ # Fluent API Entity Mappings
│ ├── OrganizationConfiguration.cs
│ ├── UserConfiguration.cs
│ ├── EnvironmentConfiguration.cs
│ └── DeploymentConfiguration.cs
└── Repositories/ # Repository Implementations
├── OrganizationRepository.cs
├── UserRepository.cs
├── RoleRepository.cs # In-Memory (Built-in Roles)
├── EnvironmentRepository.cs
└── DeploymentRepository.cs
Authentication/
├── BCryptPasswordHasher.cs # IPasswordHasher Implementation
├── TokenService.cs # ITokenService Implementation (JWT)
└── JwtSettings.cs # JWT Configuration (from appsettings.json)
Only for static configuration:
Configuration/
├── IConfigStore.cs # Interface
├── ConfigStore.cs # JSON files in /app/config volume
├── SystemConfig.cs # rsgo.system.json
├── TlsConfig.cs # rsgo.tls.json
├── FeaturesConfig.cs # rsgo.features.json
├── ReleaseConfig.cs # rsgo.release.json
├── WizardState.cs # Enum
└── DeploymentMode.cs # Enum
Docker/
└── DockerService.cs # Docker.DotNet Wrapper
- ListContainersAsync()
- CreateAndStartContainerAsync()
- StopContainerAsync()
- RemoveContainerAsync()
- PullImageAsync()
- EnsureNetworkAsync()
- etc.
Services/
├── IDeploymentEngine.cs # Interface
├── DeploymentEngine.cs # Deployment Plan Generation & Execution
├── DeploymentService.cs # High-Level Orchestration
└── EnvironmentService.cs # Environment Operations
Stacks/
├── StackSourceService.cs # IStackSourceService Implementation
├── InMemoryStackCache.cs # IStackCache Implementation
├── Configuration/
│ └── StackSourceConfig.cs # appsettings.json Binding
└── Sources/
└── LocalDirectoryStackSourceProvider.cs # Local Stacks
Manifests/
├── IManifestProvider.cs
├── ManifestProvider.cs # Release Manifest Loading
├── ReleaseManifest.cs # Manifest Model
└── DockerComposeParser.cs # YAML to DeploymentPlan
Tls/
├── ITlsService.cs
└── TlsService.cs # Self-Signed & Custom Certificates
- Technology: React + TypeScript + Tailwind CSS
-
Features:
- Setup Wizard
- Dashboard with container overview
- Stack deployments
- Environment management
- Feature flags management
- TLS configuration
- Technology: ASP.NET Core + FastEndpoints
-
Responsibilities:
- REST endpoints under
/api/v1/* - JWT authentication
- Input validation
- MediatR dispatch to UseCases
- REST endpoints under
Containers managed by ReadyStackGo are labeled:
Labels:
rsgo.stack: "my-stack"
rsgo.context: "api"
rsgo.environment: "env-id-guid"
These labels enable:
- Grouping by stack
- Identification of services
- Assignment to environments
Web UI → API → MediatR → UseCase Handler → Domain/Infrastructure Services
Infrastructure (DockerService) → Docker Socket/API → Docker Engine
┌─────────────┐
│ API │
└──────┬──────┘
│ MediatR
┌──────┴──────┐
│ UseCase │
│ Handler │
└──────┬──────┘
┌───────────────┼───────────────┐
│ │ │
┌──────┴──────┐ ┌──────┴──────┐ ┌──────┴──────┐
│ Domain │ │ Domain │ │ Infrastructure│
│ Service │ │ Repository │ │ Service │
└─────────────┘ └──────┬──────┘ └──────┬──────┘
│ │
┌──────┴──────┐ ┌──────┴──────┐
│ SQLite │ │ Docker │
│ (EF Core) │ │ Engine │
└─────────────┘ └─────────────┘
All components are registered via ASP.NET Core Dependency Injection:
// Domain Services
services.AddScoped<AuthenticationService>();
services.AddScoped<SystemAdminRegistrationService>();
services.AddScoped<OrganizationProvisioningService>();
// Repositories
services.AddScoped<IOrganizationRepository, OrganizationRepository>();
services.AddScoped<IUserRepository, UserRepository>();
services.AddScoped<IRoleRepository, RoleRepository>();
services.AddScoped<IEnvironmentRepository, EnvironmentRepository>();
services.AddScoped<IDeploymentRepository, DeploymentRepository>();
// Infrastructure Services
services.AddScoped<IDockerService, DockerService>();
services.AddScoped<IConfigStore, ConfigStore>();
services.AddScoped<ITokenService, TokenService>();
services.AddScoped<IPasswordHasher, BCryptPasswordHasher>();
services.AddScoped<IDeploymentEngine, DeploymentEngine>();
services.AddScoped<IDeploymentService, DeploymentService>();
services.AddScoped<IEnvironmentService, EnvironmentService>();
services.AddScoped<IStackSourceService, StackSourceService>();
// MediatR
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(DependencyInjection).Assembly));Getting Started
Architecture
Configuration
Security
Setup Wizard
Development
Operations
CI/CD
Reference
- Roadmap
- API Reference
- Configuration Reference
- Manifest Schema
- Multi-Environment
- Stack Sources
- Plugin System
- Technical Specification
- Full Specification
Specifications
Release Notes