A cloud-native ERP system built with .NET 10, Aspire, Dapr, and deployed to Azure Container Apps.
| Metric | Status |
|---|---|
| Build | |
| Tests | |
| Coverage | |
| Code Quality | |
| Security | |
| CodeQL | |
| Deployment |
- Microservices Architecture: 6 independent services (Auth, Billing, Inventory, Orders, Purchasing, Sales)
- API Gateway: YARP-based reverse proxy with external HTTPS ingress
- Dapr Integration: Service invocation, pub/sub, and state management
- Azure Container Apps: Production-ready deployment with auto-scaling
- Local Development: Full stack runs locally with Aspire and Docker
- CI/CD Ready: GitHub Actions workflow included
| Service | Responsibility | Database |
|---|---|---|
| Auth | Authentication & Authorization | AuthDB |
| Billing | Invoice and billing management | BillingDB |
| Inventory | Stock and warehouse management | InventoryDB |
| Orders | Order processing | OrderDB |
| Purchasing | Procurement management | PurchasingDB |
| Sales | Sales operations | SalesDB |
- Gateway: External HTTPS endpoint, routes to internal services
- Azure SQL: One database per microservice
- Azure Redis: Shared distributed cache
- Dapr: Service mesh for microservices communication
- Container Apps: Managed Kubernetes-based hosting
# Prerequisites: .NET 10 SDK, Docker
cd AppHost
dotnet runThe Aspire dashboard will open automatically showing all services.
# Prerequisites: Azure Developer CLI (azd)
azd upSee QUICKSTART.md for detailed 5-minute deployment guide.
Browse the complete documentation site at https://ozymandros.github.io/ERP.Microservices/ (generated with DocFX)
- Quick Start Guide - Get started in 5 minutes
- Deployment Guide - Comprehensive deployment documentation
- Architecture Guide - System architecture and design
- API Reference - Complete API documentation
- .NET 10: Latest .NET framework
- Aspire: Cloud-native orchestration for local development
- Dapr: Distributed application runtime
- Azure Container Apps: Managed container hosting
- Azure SQL Database: Relational database
- Azure Cache for Redis: Distributed caching
- Entity Framework Core: ORM
- Ocelot: API Gateway
- JWT: Authentication
ERP.Microservices/
βββ AppHost/ # Aspire orchestration
βββ ErpApiGateway/ # YARP API Gateway
βββ MyApp.Auth/ # Auth microservice
βββ MyApp.Billing/ # Billing microservice
βββ MyApp.Inventory/ # Inventory microservice
βββ MyApp.Orders/ # Orders microservice
βββ MyApp.Purchasing/ # Purchasing microservice
βββ MyApp.Sales/ # Sales microservice
βββ MyApp.Shared/ # Shared libraries
βββ infra/ # Azure infrastructure (Bicep)
β βββ core/ # Reusable Bicep modules
β βββ main.bicep # Main infrastructure definition
β βββ main.parameters.json # Parameters template
βββ .github/workflows/ # CI/CD pipelines
βββ docs/ # Documentation
βββ azure.yaml # Azure Developer CLI config
βββ README.md # This file
Each microservice follows Clean Architecture:
MyApp.[Service]/
βββ MyApp.[Service].API/ # Web API layer
βββ MyApp.[Service].Application/ # Application logic
βββ MyApp.[Service].Domain/ # Domain entities
βββ MyApp.[Service].Infrastructure/ # Data access
- .NET 10.0 SDK
- Docker Desktop
- Visual Studio 2022 / VS Code / Rider
- Azure Developer CLI (for deployment)
# Restore dependencies
dotnet restore
# Build all projects
dotnet build
# Run tests
dotnet test# Using Aspire (recommended)
cd AppHost
dotnet run
# Or run individual services
cd MyApp.Auth/MyApp.Auth.API
dotnet runLocal development uses appsettings.Development.json in AppHost:
{
"Jwt": {
"SecretKey": "your-secret-key",
"Issuer": "MyApp.Auth",
"Audience": "MyApp.All"
},
"Parameters": {
"FrontendOrigin": "http://localhost:3000"
}
}Production uses Azure Container Apps secrets and environment variables.
# One command deployment
azd upThis deploys:
- β All microservices with Dapr sidecars
- β API Gateway with external HTTPS
- β Azure SQL with 6 databases
- β Azure Cache for Redis
- β Auto-scaling and health checks
See DEPLOYMENT.md for details.
Modular CI/CD with separate workflows for security and speed:
| Workflow | Purpose | Triggers |
|---|---|---|
| build.yml | Build, test, coverage | push/PR to main, develop |
| sonarcloud.yml | SonarCloud code quality & coverage analysis | push/PR to main, develop |
| codeql.yml | CodeQL security analysis | push/PR to main, develop |
| deploy.yml | Provision, Docker build, GHCR push, Azure deploy | after Build & Test succeeds on main/develop, or manual |
Coverage: Tests collect coverage using Coverlet (Cobertura format), merged to coverage/coverage.cobertura.xml and analyzed by SonarCloud.
Required secrets (deploy): AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_SUBSCRIPTION_ID.
Required secrets (SonarCloud): SONAR_TOKEN, SONAR_PROJECT_KEY, SONAR_ORG.
- JWT Authentication: Bearer token authentication
- Role-Based Access Control: Fine-grained permissions
- Azure Managed Identities: No credentials in code
- Secrets Management: Azure Container Apps secrets
- HTTPS Only: TLS termination at gateway
- CORS: Configurable allowed origins
- Application Insights: Performance monitoring (coming soon)
- Log Analytics: Centralized logging
- Health Checks: Liveness and readiness probes
- Dapr Dashboard: Service mesh visibility
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License.
- Use
azd downto delete resources when not in use - Check logs with
az containerapp logs show - Monitor costs in Azure Portal
- Scale services independently as needed