{"id":15366390,"url":"https://github.com/talento90/caravel-template","last_synced_at":"2025-10-12T08:14:07.750Z","repository":{"id":145200453,"uuid":"231817423","full_name":"Talento90/Caravel-Template","owner":"Talento90","description":":speedboat:  Caravel Template - code less, ship more.","archived":false,"fork":false,"pushed_at":"2024-09-29T18:35:55.000Z","size":409,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T12:26:05.698Z","etag":null,"topics":["csharp","dotnet-core","template-project"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Talento90.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-01-04T19:30:21.000Z","updated_at":"2025-01-05T14:42:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"914bf1a4-ae60-4910-9677-9aaf539a23df","html_url":"https://github.com/Talento90/Caravel-Template","commit_stats":{"total_commits":32,"total_committers":3,"mean_commits":"10.666666666666666","dds":0.625,"last_synced_commit":"f50cf648770b712f59d06b68be34e53755332cf8"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/Talento90/Caravel-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talento90%2FCaravel-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talento90%2FCaravel-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talento90%2FCaravel-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talento90%2FCaravel-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Talento90","download_url":"https://codeload.github.com/Talento90/Caravel-Template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talento90%2FCaravel-Template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010802,"owners_count":26084807,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["csharp","dotnet-core","template-project"],"created_at":"2024-10-01T13:18:39.746Z","updated_at":"2025-10-12T08:14:07.734Z","avatar_url":"https://github.com/Talento90.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Caravel Template\n\nThis template uses Caravel package as an SDK and it bootstraps a full functional web api following the Hexagonal Architecture:\n\n* CaravelTemplate (Application Domain)\n* CaravelTemplate.Application (Application business logic)\n* CaravelTemplate.Adapter.MassTransit (Adapter to enable message queuing using MassTransit)\n* CaravelTemplate.Adapter.Quartz (Adapter to enable scheduling jobs using Quartz)\n* CaravelTemplate.Adapter.PostgreSql (Adapter to enable database assess queuing using Entity Framework and PostgreSql)\n* CaravelTemplate.Adapter.Identity (Adapter to enable user management using ASP.NET Identity)\n* CaravelTemplate.Adapter.API (HTTP API Server using ASP.NET 8.0)\n* CaravelTemplate.Host (The program entry point that glues all the adapters and server)\n* CaravelTemplate.Migrator (A slim program to handle entity framework migrations)\n\n![architecture](./assets/architecture.png)\n\n### Features\n\n* [Caravel SDK](https://github.com/talento90/caravel) (Errors, Middleware, Exceptions)\n* HTTP Api using Minimal APIs.\n* Business logic using CQRS pattern + behaviours  ([MediatR](https://github.com/jbogard/MediatR))\n* Message bus using ([MassTransit](https://github.com/MassTransit/MassTransit))\n* Job Schedulers using ([Quartz](https://github.com/quartznet/quartznet))\n* Observability + Dashboard using ([OpenTelemetry](https://github.com/open-telemetry/opentelemetry-dotnet)) and Aspire\n* Entity Framework and Migrations using PostgreSQL\n* Health Check mechanism\n* OpenApi 3.0 Spec using [Swashbuckle](https://github.com/domaindrivendev/Swashbuckle)\n* Docker and Docker Compose\n* Logging using [Serilog](https://serilog.net/)\n* Testing using [Bogus](https://github.com/bchavez/Bogus) (Fake data generator) + [Fluent Assertions](https://fluentassertions.com/) + [Test Containers](https://github.com/testcontainers/testcontainers-dotnet) + [Respawn](https://github.com/jbogard/Respawn) (Database Cleanup)\n\n\n### Aspire Dashboard\n![telemetry](./assets/telemetry.png)\n\n## Installation\n\n#### Download and Install Template\n```bash\ngit clone git@github.com:Talento90/caravel-template.git\ndotnet new --install ~/caravel-template\n```\n\n#### Generate Project\n```bash\ndotnet new caravel-webapi -n MyProject -o ./\n```\nNote: `MyProject` is  going to replace the `CaravelTemplate`  \n\n#### Run Web Api\n\n`dotnet run --project src/MyProject.WebApi`\n\n`open http://localhost:5000/swagger/index.html`\n\n\n## Docker Compose\n\n- Setup PostgreSql container\n- Setup RabbitMQ container\n- Setup Aspire Dashboard container\n\n```bash\n# Setup and run docker compose\ndocker compose up\n\n# Remove containers\ndocker compose down\n```\n\n## Entity Framework Migrations\n\n* **[Official Documentation](https://learn.microsoft.com/en-us/ef/core/cli/dotnet)**\n* Setup database from scratch: `sh scripts/database-init.sh`\n\n```bash\n# Install dotnet-ef tool\ndotnet tool install --global dotnet-ef\n\n# Update dotnet-ef tool\ndotnet tool update --global dotnet-ef\n\n# List all migrations\ndotnet ef migrations list --startup-project src/CaravelTemplate.Migrator --project src/CaravelTemplate.Adapter.PostgreSql --context ApplicationDbContext --no-build\n\n# Generate SQL Scripts\ndotnet ef migrations script --startup-project src/CaravelTemplate.Migrator --project src/CaravelTemplate.Adapter.PostgreSql --context ApplicationDbContext --no-build \n\n# Add new database migration changes to the Application DbContext\ndotnet ef migrations add CreateApplicationSchema --startup-project src/CaravelTemplate.Migrator --output-dir Migrations --project src/CaravelTemplate.Adapter.PostgreSql --context ApplicationDbContext --no-build\n \n# Apply the migration changes\ndotnet ef database update --startup-project src/CaravelTemplate.Migrator --project src/CaravelTemplate.Adapter.PostgreSql --context ApplicationDbContext --no-build   \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalento90%2Fcaravel-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftalento90%2Fcaravel-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalento90%2Fcaravel-template/lists"}