Plan Your Solution
Dev, Test, and Production Environments
Dev
Local Development with .NET Aspire
What It Is
The dev environment runs entirely on your local machine. .NET Aspire acts as the orchestrator: it starts Sql Server, the Control Panel, and every Arch microservice as Docker containers, then starts your application as a .NET project — all in one run. There are no external services, no yml files to manage, and no manual container lifecycle. Every component is wired together and ready the moment you press F5.
System Diagram
All services run on localhost. Sql Server is a Docker container managed by Aspire. The Control Panel and Arch microservices are Docker containers pulled from the Triunnia Labs registry. Your application is a .NET project running in the same Aspire AppHost. Microservices connect to Sql Server and to each other via host.docker.internal when localhost does not resolve inside a container.
Aspire AppHost
The AppHost project is the entry point for the entire dev environment. Add each Arch microservice you intend to use as an extension method call, then add your application project. Comment out services you have not yet set up in the Control Panel — add them incrementally as you register and configure each one.
var builder = DistributedApplication.CreateBuilder(args); var sqlServer = builder.AddArchSqlServer(); builder.AddControlPanel(sqlServer); builder.AddApplicationApi(sqlServer); builder.AddKeysApi(sqlServer); builder.AddTokensApi(sqlServer); // builder.AddEmailApi(sqlServer); // builder.AddUsersApi(sqlServer); // builder.AddEntityApi(sqlServer); // builder.AddCommentsApi(sqlServer); // builder.AddFilesApi(sqlServer); builder.AddProject("MyApp", "..\\..\\MyApp\\MyApp.csproj"); builder.Build().Run();
Each extension method follows the same pattern as shown in the Hello World Setup and each Api's Development page. Refer to those pages for the full method body with environment variable placeholders.
Control Panel
The Control Panel runs on http://localhost:50000. Use it to create the Application and register each microservice before adding it to the AppHost. Configure the database connection strings to point to Aspire's Sql Server — use host.docker.internal if localhost does not resolve from inside the Control Panel container.
The Control Panel generates all encrypted environment variable values. Copy them directly into the corresponding extension method in AppHost.cs.
Application Code
Your application runs as a .NET project inside the Aspire solution. Set it up with TriunniaLabs.Arch.Microservice and the client packages for any APIs you are using. The appsettings.json block generated by the Control Panel provides all connection and authorization settings.
For local development, add DummyIpAddressMiddleware to your application startup. This is required when running behind Aspire because the middleware layer does not forward a real client IP address in the local environment.
if (builder.Environment.IsDevelopment()) builder.Services.AddSingleton<DummyIpAddressMiddleware>(); // ... if (app.Environment.IsDevelopment()) app.UseMiddleware<DummyIpAddressMiddleware>();
Third-Party Integrations
Apis such as the Email Api require third-party credentials (Postmark server token, webhook credentials). In a dev environment you can use a Postmark test account or sandbox credentials — email will not be delivered to real recipients. This lets you exercise the full code path without affecting production streams. Each integration's credentials go into the environment variable placeholders for that Api's extension method in AppHost.cs.
Tech Sovereignty
Arch
Company
About Contact