AppHost (MILTON.AppHost)
This project wraps the whole application together utilizing .NET Aspire. It acts as the orchestrator to spin up all services and infrastructure:
Resources
flowchart TD subgraph Infrastructure PG["PostgreSQL"] RMQ["RabbitMQ"] RustFS["RustFS (S3)"] Gotenberg["Gotenberg (PDF)"] KC["Keycloak (Auth)"] end subgraph Services API["MILTON API"] NS["NotificationService"] DG["DocumentGenerator"] Git["GitOperations"] Mig["MigrationService"] Cluster["Clustering (Python)"] end Gateway["YARP Gateway"] Client["MILTON.Client (Blazor WASM)"] Gateway -- "/keycloak/**" --> KC Gateway -- "/hubs/**" --> NS Gateway -- "/milton-documents/**" --> RustFS Gateway -- "/**" --> API API --> PG API --> RMQ API --> Gateway API --> KC API --> Gotenberg API --> Cluster API --> NS NS --> RMQ DG --> PG DG --> RMQ Git --> RMQ Mig --> PG Client --> Gateway Client --> KC
| Resource | Type | Purpose |
|---|---|---|
| PostgreSQL | Container | Primary database for all services |
| RabbitMQ | Container | Message broker for Wolverine messaging |
| RustFS | Container | S3-compatible object storage for documents |
| Gotenberg | Container | Stateless PDF conversion sidecar |
| Keycloak | Container | OpenID Connect identity provider |
| YARP Gateway | ASP.NET Core | Reverse proxy — unified TLS entry point routing to API, NotificationService, RustFS, and Keycloak |
| MILTON API | ASP.NET Core | Primary REST API + Blazor host |
| NotificationService | ASP.NET Core | Standalone SignalR hub + Wolverine RabbitMQ consumer for real-time notifications |
| DocumentGenerator | Worker Service | Wolverine saga for document processing |
| GitOperations | Worker Service | Repository cloning via RabbitMQ commands |
| MigrationService | Worker Service | One-shot EF Core database migrations |
| Clustering | Docker (Python) | Code analysis using Leiden algorithm |
| MILTON.Client | Blazor WASM | Frontend SPA |
Running
Run aspire run in the project root to compose the whole system together.