{"id":25709168,"url":"https://github.com/mreshboboyev/aspire-customization","last_synced_at":"2026-05-15T11:16:27.193Z","repository":{"id":279251180,"uuid":"927268347","full_name":"MrEshboboyev/aspire-customization","owner":"MrEshboboyev","description":"ApiService is a modern .NET 9 Web API that integrates OpenAPI, Swagger UI, and ReDoc for interactive API documentation. It includes custom service defaults and Scalar integration for efficient data handling, ensuring scalability, flexibility, and ease of use.","archived":false,"fork":false,"pushed_at":"2025-02-24T15:52:57.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T16:35:49.970Z","etag":null,"topics":["api-best-practices","api-documentation","asp-net-core","c-sharp","custom-service-defaults","dotnet-core-9","open-api","redoc","rest-api","scalable-systems","scalar","swagger","web-api"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrEshboboyev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-04T17:22:06.000Z","updated_at":"2025-02-24T15:55:27.000Z","dependencies_parsed_at":"2025-02-24T16:35:55.865Z","dependency_job_id":"75b25434-4b5b-4309-bec6-cdbeb1c61e83","html_url":"https://github.com/MrEshboboyev/aspire-customization","commit_stats":null,"previous_names":["mreshboboyev/aspire-customization"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrEshboboyev%2Faspire-customization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrEshboboyev%2Faspire-customization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrEshboboyev%2Faspire-customization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrEshboboyev%2Faspire-customization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrEshboboyev","download_url":"https://codeload.github.com/MrEshboboyev/aspire-customization/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240637776,"owners_count":19833194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-best-practices","api-documentation","asp-net-core","c-sharp","custom-service-defaults","dotnet-core-9","open-api","redoc","rest-api","scalable-systems","scalar","swagger","web-api"],"created_at":"2025-02-25T09:22:34.326Z","updated_at":"2025-11-19T11:03:57.686Z","avatar_url":"https://github.com/MrEshboboyev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aspire Customization - Enhanced Weather Forecast Service\n\nThis project demonstrates a production-ready implementation of a weather forecast service using .NET Aspire with real-world requirements and best practices.\n\n## Features\n\n- **Full CRUD Operations**: Complete REST API for weather forecasts\n- **Health Checks**: Comprehensive health monitoring\n- **API Documentation**: Swagger UI, ReDoc, and Scalar integration\n- **Containerization**: Docker support for deployment\n- **Observability**: OpenTelemetry integration\n- **Resilience**: Built-in resilience patterns\n- **Service Discovery**: Automatic service discovery\n- **CORS Support**: Cross-origin resource sharing configuration\n- **Response Compression**: Optimized payload delivery\n- **Configuration Management**: Environment-specific settings\n\n## Project Structure\n\n```\n├── ApiService/\n│   ├── Controllers/           # API controllers\n│   ├── Models/               # Data models\n│   ├── Services/             # Business logic services\n│   ├── Program.cs            # Application entry point\n│   └── Dockerfile            # Container definition\n├── Aspire.Customization.AppHost/\n│   ├── Program.cs            # Aspire application host\n│   └── ResourceBuilderExtensions.cs\n└── Aspire.Customization.ServiceDefaults/\n    └── Extensions.cs         # Shared service configurations\n```\n\n## API Endpoints\n\n### Weather Forecast Operations\n\n- `GET /api/weatherforecast` - Get all weather forecasts\n- `GET /api/weatherforecast/{date}` - Get a specific weather forecast\n- `POST /api/weatherforecast` - Create a new weather forecast\n- `PUT /api/weatherforecast/{date}` - Update an existing weather forecast\n- `DELETE /api/weatherforecast/{date}` - Delete a weather forecast\n\n### Health and Monitoring\n\n- `GET /health` - Application health status\n- `GET /alive` - Liveness probe\n- `GET /swagger` - Swagger UI documentation\n- `GET /scalar/v1` - Scalar API reference\n- `GET /api-docs` - ReDoc documentation\n\n## Getting Started\n\n### Prerequisites\n\n- .NET 9 SDK\n- Docker (optional, for containerization)\n\n### Running the Application\n\n1. **Using .NET CLI**:\n   ```bash\n   cd Aspire.Customization.AppHost\n   dotnet run\n   ```\n\n2. **Using Docker**:\n   ```bash\n   docker-compose up\n   ```\n\n### Development\n\nThe project follows clean architecture principles with separation of concerns:\n\n1. **Controllers**: Handle HTTP requests and responses\n2. **Services**: Implement business logic\n3. **Models**: Define data structures\n4. **Extensions**: Provide reusable functionality\n\n## Configuration\n\nThe application supports multiple environments through configuration files:\n\n- `appsettings.json` - Base configuration\n- `appsettings.Development.json` - Development environment\n- `appsettings.Production.json` - Production environment (if created)\n\nKey configuration sections include:\n\n- **ApiSettings**: API metadata\n- **HealthCheckSettings**: Health monitoring configuration\n- **CorsSettings**: Cross-origin resource sharing settings\n\n## Deployment\n\n### Container Deployment\n\nThe application can be containerized using the provided Dockerfile:\n\n```bash\n# Build the image\ndocker build -t weather-api -f ApiService/Dockerfile .\n\n# Run the container\ndocker run -p 8080:8080 weather-api\n```\n\n### Aspire Deployment\n\nThe Aspire application host provides orchestration capabilities for deploying the entire solution with dependent services.\n\n## Best Practices Implemented\n\n1. **Error Handling**: Comprehensive exception handling with proper HTTP status codes\n2. **Logging**: Structured logging with appropriate levels\n3. **Documentation**: XML documentation for all public APIs\n4. **Health Monitoring**: Custom health checks with detailed reporting\n5. **Security**: HTTPS enforcement and CORS configuration\n6. **Performance**: Response compression and caching considerations\n7. **Resilience**: Retry policies and circuit breaker patterns\n8. **Observability**: OpenTelemetry integration for metrics and tracing\n\n## Extending the Application\n\nTo add new features:\n\n1. Create a new model in the `Models` folder\n2. Define a service interface in the `Services` folder\n3. Implement the service\n4. Create a controller to expose the functionality\n5. Register the service in `Program.cs`\n6. Add appropriate tests\n\n## Contributing\n\nThis project demonstrates enterprise-grade development practices. Contributions should follow the established patterns and include appropriate tests.\n\n## License\n\nThis project is a demonstration and educational resource.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmreshboboyev%2Faspire-customization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmreshboboyev%2Faspire-customization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmreshboboyev%2Faspire-customization/lists"}