A production-ready .NET 10 boilerplate with microservices architecture, featuring ScyllaDB (Cassandra-compatible), Redis, RabbitMQ, and comprehensive service implementations.
- β RESTful API with Swagger/ReDoc documentation
- β ScyllaDB (Cassandra-compatible) for distributed NoSQL storage
- β Redis for high-performance caching
- β RabbitMQ for asynchronous message processing
- β JWT Authentication for secure API access
- β Rate Limiting with multiple strategies (Fixed Window, Token Bucket, Sliding Window)
- β Mail Service with queue-based async sending
- β Media Service with MinIO object storage and ImageSharp optimization
- β Worker Service for background job processing
- β Logging with Serilog and Seq dashboard
- β Docker containerization with Docker Compose
- β Health Checks for all services
- β BCrypt password hashing
- β Repository Pattern with dependency injection
βββββββββββββββ ββββββββββββ βββββββββββββ
β Client ββββββΆβ API ββββββΆβ ScyllaDB β
βββββββββββββββ ββββββ¬ββββββ βββββββββββββ
β
ββββββ΄βββββββ
β β
βββββββΌβββββ ββββββΌββββββ
β Redis β β RabbitMQ β
β Cache β β Queue β
ββββββββββββ ββββββ¬ββββββ
β β
βββββββΌβββββ ββββββΌβββββββ
β MinIO β β Worker β
β Media β β Service β
ββββββββββββ βββββββββββββ
git clone https://github.com/Xjectro/dotnet-boilterplate.git
cd dotnet-boilterplate
make dev
# API: http://localhost:5143
# Swagger: http://localhost:5143/swagger
# MinIO Console: http://localhost:9001 (minioadmin/minioadmin123)
# RabbitMQ Management: http://localhost:15672 (admin/admin123)# Restore dependencies
dotnet restore
# Run the API locally
dotnet run --project src/presentation/api/Api.csprojComprehensive documentation is available in the docs folder:
- System Overview - Architecture and project structure
- ScyllaDB (Cassandra-compatible) - Database setup and usage
- RabbitMQ Queue - Message queue implementation
- Mail Service - Email service with async processing
- Media Service - File upload, storage and delivery with MinIO
- Redis Cache - Caching strategies and usage
- JWT Authentication - Security and authentication
- Rate Limiting - API throttling and DDoS protection
- Logging (Serilog + Seq) - Structured logging and monitoring
- Validation (FluentValidation) - Model and request validation
- Docker Setup - Container orchestration
Key configuration can be set via environment variables:
# JWT
JwtSettings__Secret=your-secret-key
JwtSettings__ExpiryMinutes=60
# Redis
Redis__Host=redis:6379
# Scylla (Cassandra-compatible settings)
Cassandra__ContactPoints=scylla
Cassandra__Port=9042
Cassandra__Keyspace=default_keyspace
# RabbitMQ
RabbitMq__Host=rabbitmq
RabbitMq__Port=5672
RabbitMq__Username=admin
RabbitMq__Password=admin123
# Media (MinIO)
Media__Endpoint=http://minio:9000
Media__AccessKey=minioadmin
Media__SecretKey=minioadmin123
Media__BucketName=uploads
Media__PublicUrl=http://localhost:9000
Media__MaxFileSize=10485760
POST /api/mail/send
Content-Type: application/json
{
"to": ["user@example.com"],
"subject": "Welcome!",
"body": "<h1>Hello World</h1>",
"isHtml": true
}# Upload file
POST /api/media/upload?folder=images&generateThumbnail=true
Content-Type: multipart/form-data
# Get file
GET /api/media/{fileName}
# Delete file
DELETE /api/media/{fileName}
# List files
GET /api/media/list?folder=imagesGET /api/client
POST /api/client
PUT /api/client/{id}
DELETE /api/client/{id}Visit /swagger for complete API documentation.
βββ src/
β βββ core/ # Domain entities and shared contracts
β βββ application/ # Use cases, validation, and interfaces
β βββ infrastructure/ # External adapters (DB, messaging, storage)
β βββ presentation/
β βββ api/ # ASP.NET Core API host and middleware
βββ deploy/
β βββ docker/ # Dockerfiles and compose configurations
βββ docs/ # Additional documentation (guides, ADRs)
βββ tests/ # Unit and integration test projects
βββ ops/ # CI/CD pipelines and operational scripts
βββ api.sln # Solution file
βββ README.md
dotnet builddotnet testdotnet format# Start development environment (with build)
make dev
# Start production environment (detached with build)
make prod
# View logs
docker compose -f deploy/docker/dev/docker-compose.yml logs -f
# Stop services
docker compose -f deploy/docker/dev/docker-compose.yml down
# Stop and remove volumes
docker compose -f deploy/docker/dev/docker-compose.yml down -v- Port: 9042
- Keyspace: default_keyspace
- Replication: SimpleStrategy (Dev)
- Port: 6379
- Persistence: AOF enabled
- AMQP Port: 5672
- Management: http://localhost:15672
- Credentials: admin/admin123
- Port: 5143
- Swagger: http://localhost:5143/swagger
- ReDoc: http://localhost:5143/api-docs
- JWT token-based authentication
- BCrypt password hashing
- Environment variable configuration
- Docker secrets support
- HTTPS ready
All services include health checks:
# API Health
curl http://localhost:5143/health
# Docker health status
docker ps --format "table {{.Names}}\t{{.Status}}"- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENCE file for details.
For questions or support, please open an issue on GitHub.
- .NET Team for the amazing framework
- Docker for containerization
- ScyllaDB for distributed database
- Redis for caching
- RabbitMQ for message queuing
Built with β€οΈ using .NET 10