A robust and scalable .NET starter template following Onion Architecture, integrated with essential tools like OpenTelemetry, Swagger, and Rate Limiter to provide a production-ready foundation for building modern web applications.
Onion Architecture - Clean and maintainable code structure
OpenTelemetry - Distributed tracing and monitoring
Swagger - API documentation for easy testing and interaction
Rate Limiting - Prevent abuse and improve performance
Logging - Structured logging with built-in integrations
Docker Support - Containerized development and deployment
Ensure you have the following installed before running the project:
-
Clone the repository:
git clone https://github.com/onrcanogul/dotnet-webapi-starter-template.git cd your-repo-folder -
Install dependencies:
dotnet restore
-
Configure environment variables (e.g., database connection, telemetry settings).
-
Run the project:
dotnet run
To run the project in a Docker container, use:
docker build -t your-app-name .
docker run -p 5000:5000 your-app-nameThis template follows the Onion Architecture, which enforces separation of concerns and enables maintainability.
Core Layer
- Domain models
Infrastructure Layer
- Database interactions
- Middlewares
Application Layer
- Use cases
- Service interfaces
API Layer
- Controllers
After running the project, access Swagger UI at:
http://localhost:5000/swagger