# Install globally from NuGet
dotnet tool install --global MicroserviceKit --prerelease
# Or install specific version
dotnet tool install --global MicroserviceKit --version 0.2.0# Show help
microkit --help
# List available commands
microkit list-commands
# Show version
microkit --versionThe easiest way to start is using interactive mode:
microkit new MyService --interactiveThis will guide you through:
- Architecture level selection
- Domain model configuration
- API style selection
- Database configuration
- Testing setup
- Deployment options
For more control, use a JSON configuration file:
{
"microserviceName": "OrderService",
"architecture": {
"level": "standard",
"patterns": {
"ddd": "enabled",
"cqrs": "enabled"
}
},
"domain": {
"aggregates": [
{
"name": "Order",
"properties": [
{ "name": "CustomerId", "type": "Guid" },
{ "name": "TotalAmount", "type": "decimal" }
],
"operations": ["Create", "UpdateStatus"]
}
]
},
"features": {
"api": {
"style": "controllers",
"authentication": "jwt"
},
"database": {
"writeModel": "postgresql",
"readModel": "mongodb",
"cache": "redis"
}
}
}For simple cases, just specify the architecture level:
microkit new MyService --level minimal # Simple CRUD
microkit new MyService --level standard # Full DDD
microkit new MyService --level enterprise # Enterprise features# Interactive mode
microkit new BlogService --interactive
# Or with config
microkit new BlogService --config templates/examples/blog-service.json# With full DDD and CQRS
microkit new OrderService --config templates/examples/e-commerce-order.json# Enterprise level with all features
microkit new PaymentService --config templates/examples/banking-payment.json- Single project structure
- Basic CRUD operations
- Simple controllers
- In-memory database
- Basic unit tests
- 3-layer architecture (Domain, Application, API)
- Full DDD implementation
- CQRS with Wolverine
- PostgreSQL for write model
- MongoDB for read model
- Redis for caching
- Integration tests
- Docker support
- 4-layer architecture (Domain, Application, Infrastructure, API)
- All Standard features
- Event-driven architecture
- External services integration
- Advanced deployment
- Kubernetes support
- Comprehensive testing suite
- Aggregates with AggregateKit
- Domain Events
- Value Objects
- Domain Services
- Validation Rules
- Commands and Queries
- Command/Query Handlers
- DTOs
- Validation
- Authorization
- REST Controllers
- OpenAPI/Swagger
- API Versioning
- Error Handling
- Authentication/Authorization
- Repositories
- DbContext
- External Services
- Message Brokers
- Caching
- Unit Tests
- Integration Tests
- Test Containers
- Architecture Tests
- Docker
- Docker Compose
- Kubernetes
- Health Checks
- Monitoring
- Use
--interactivefor guided setup - Use
--configfor repeatable configurations - Use
--levelfor quick starts
- Use custom templates in
templates/custom/ - Override specific files in
templates/overrides/ - Use post-generation hooks
# Add new aggregate
microkit add aggregate Order --properties "Id:Guid,Total:decimal"
# Add with operations
microkit add aggregate Order --operations "Create,Update,Cancel"# Run unit tests
dotnet test
# Run integration tests
dotnet test --filter "Category=Integration"
# Run all tests
dotnet test --filter "Category!=Integration"# Development with Docker Compose
docker-compose up -d
# Production with Kubernetes
kubectl apply -f k8s/# Update to latest version
dotnet tool update --global MicroserviceKit
# Update to specific version
dotnet tool update --global MicroserviceKit --version 0.2.0# Clone repository
git clone https://github.com/suranig/microservice-net8-ddd.git
# Build solution
make build
# Run tests
make test
# Run CLI tests
make cli-test- Fork the repository
- Create feature branch
- Implement changes
- Add tests
- Update documentation
- Submit pull request
- GitHub Issues: Report bugs or request features
- Documentation: Full documentation
- Examples: Example configurations