This repository contains the source code for a simple toy project using CQRS and event sourcing.
Features:
- CQRS (separate read and write stores) with event sourcing
- Code-first migrations, managed in separate console apps (not at application start of the dependent app(s))
- A pretty rough first cut of DDD
- Integration and unit tests
- Everything runs in docker compose
- Authentication/authorization (using a simple instance of Identity Server 4)
Broken, incomplete, or aspirational:
- Working AKS stack in Azure
- Infrastructure as Code using
Pulumibicep - helm charts for app deployments
- CI/CD pipeline in GitHub Actions
- A richer domain implementation
- UI
In docker compose:
// change directory to the build folder
docker-compose build
docker-compose up api
In an IDE like Visual Studio:
- Add configuration to user secrets for the read migrations project (sample below)
- Run the read migrations project
- Add configuration to user secrets for the write migrations project (sample below)
- Make sure the identity project is running
- Run the API project
Tests:
Docker compose happily runs using either of these:
docker-compose up integration-tests
docker-compose up unit-tests
Tests will also run in Visual Studio or similar, and don't require migrations to be run first (databases are migrated on an independent connection).