{"id":25268225,"url":"https://github.com/morven11/webapi.template","last_synced_at":"2025-04-06T04:19:11.172Z","repository":{"id":276380159,"uuid":"929049279","full_name":"MorveN11/WebApi.Template","owner":"MorveN11","description":"This is a robust and scalable ASP.NET Core Web API template built with Clean Architecture, following best practices for modern web development. It incorporates CQRS (Command Query Responsibility Segregation) for efficient data handling, RBAC (Role-Based Access Control) for secure authorization, and JWT Authentication for secure user authentication.","archived":false,"fork":false,"pushed_at":"2025-02-17T17:00:08.000Z","size":107,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T18:22:36.576Z","etag":null,"topics":["asp-net-core","cache","clean-architecture","cqrs","csharp","docker","dotnet","efcore","github-actions","husky","jwt-authentication","papercut","postgresql","rbac","redis","rest-api","seq","swagger"],"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/MorveN11.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2025-02-07T18:01:27.000Z","updated_at":"2025-02-17T17:00:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ffe6bbf-7355-4d50-9577-72193cb5d322","html_url":"https://github.com/MorveN11/WebApi.Template","commit_stats":null,"previous_names":["morven11/webapi.template"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MorveN11%2FWebApi.Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MorveN11%2FWebApi.Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MorveN11%2FWebApi.Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MorveN11%2FWebApi.Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MorveN11","download_url":"https://codeload.github.com/MorveN11/WebApi.Template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247431226,"owners_count":20937915,"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":["asp-net-core","cache","clean-architecture","cqrs","csharp","docker","dotnet","efcore","github-actions","husky","jwt-authentication","papercut","postgresql","rbac","redis","rest-api","seq","swagger"],"created_at":"2025-02-12T10:24:22.070Z","updated_at":"2025-04-06T04:19:11.167Z","avatar_url":"https://github.com/MorveN11.png","language":"C#","readme":"# Manuel - Morales | Clean Architecture Template\n\n## Tools and Technologies Needed\n\n- [Dotnet 9.0 SDK](https://dotnet.microsoft.com/download)\n- [node.js](https://nodejs.org/en/)\n- [pnpm](https://pnpm.io/)\n- [Docker](https://www.docker.com/)\n- [Docker Compose](https://docs.docker.com/compose/)\n\n## Pending Implementations\n\n```csharp\n// TODO: Add API title for Swagger\nbuilder.Services.AddSwaggerGenWithAuth(\"Clean Architecture API\");\n```\n\nIn the `Presentation` project, you'll find the `Program`. You can add the API\ntitle and description to the Swagger documentation.\n\n```json\n{\n  \"name\": \"api\",\n  \"version\": \"3.11.0\",\n  \"private\": false,\n  \"description\": \"A template for building clean, testable APIs with ASP.NET Core\",\n  \"scripts\": {\n    \"dev\": \"dotnet watch --project ./src/Presentation/ run\",\n    \"restore\": \"dotnet restore\",\n    \"build\": \"dotnet build --configuration Release --no-restore\",\n    \"publish\": \"dotnet publish --configuration Release --no-restore --no-build\",\n    \"migrate:add\": \"dotnet ef migrations --project ./src/Infrastructure/ --startup-project ./src/Presentation/ add\",\n    \"ef:install\": \"dotnet tool install --global dotnet-ef\",\n    \"ef:bundle\": \"dotnet ef migrations bundle --configuration HealthChecks__Enabled=false --force --project ./src/Infrastructure/ --startup-project ./src/Presentation/ --output efbundle\",\n    \"prepare\": \"husky\"\n  },\n  \"devDependencies\": {\n    \"@commitlint/cli\": \"^19.5.0\",\n    \"@semantic-release/changelog\": \"^6.0.3\",\n    \"@semantic-release/commit-analyzer\": \"^12.0.0\",\n    \"@semantic-release/git\": \"^10.0.1\",\n    \"@semantic-release/github\": \"^10.0.5\",\n    \"@semantic-release/npm\": \"^12.0.1\",\n    \"@semantic-release/release-notes-generator\": \"^13.0.0\",\n    \"commitizen\": \"^4.3.1\",\n    \"cz-conventional-changelog\": \"^3.3.0\",\n    \"husky\": \"^9.1.6\",\n    \"semantic-release\": \"^23.1.1\"\n  },\n  \"config\": {\n    \"commitizen\": {\n      \"path\": \"./node_modules/cz-conventional-changelog\"\n    }\n  }\n}\n```\n\nUpdate the version of the API in the `package.json` file to 0.1.0. to reset the\nversion of the API. Update the description of the API in the `package.json` with\nyour own description. Update any other fields in the `package.json` file as\nneeded.\n\nRemove `CHANGELOG.md` file to reset the changelog record.\n\nRemove `LICENSE` file to reset the license, use your own license.\n\n## Set Production Migrations\n\nFor production, you can use the `ef:bundle` command to bundle the migrations\ninto a single migration. This will allow you to deploy the application with a\nsingle migration file. To execute the command, run the following:\n\n```sh\npnpm ef:bundle\n```\n\nTo execute this in a CI/CD pipeline, only uncomment this:\n\n```yaml\n# TODO: If you are going to Deploy your API, you can run the migrations here for your production database\n# Only you need to add the connection string to your secrets\n# - name: Run EF Migrations\n#   run: ./efbundle --connection \"${{ secrets.DB_CONNECTION_STRING }}\"\n```\n\nIn the `.github/workflows/release.yml` file, uncomment the section that runs the\nmigrations and set you DB_CONNECTION_STRING in your GitHub Secrets.\n\n### Commands\n\n- **dev**: Initializes the .NET project in Development configuration.\n\n  ```sh\n  pnpm dev\n  ```\n\n- **restore**: Restores the .NET project dependencies.\n\n  ```sh\n  pnpm restore\n  ```\n\n- **build**: Builds the .NET project in Release configuration without restoring\n  dependencies.\n\n  ```sh\n  pnpm build\n  ```\n\n- **publish**: Publishes the .NET project in Release configuration without\n  restoring or building.\n\n  ```sh\n  pnpm publish\n  ```\n\n- **migrate:add**: Adds a new migration to the `Infrastructure` project.\n\n  ```sh\n  pnpm migrate:add \u003cMigrationName\u003e\n  ```\n\n- **ef:install**: Installs the Entity Framework CLI tool.\n\n  ```sh\n  pnpm ef:install\n  ```\n\n- **ef:bundle**: Bundles the migrations into a single migration.\n\n  ```sh\n  pnpm ef:bundle\n  ```\n\n- **prepare**: Sets up Husky for managing Git hooks.\n\n  ```sh\n  pnpm prepare\n  ```\n\n## Ports - localhost\n\n- **API**: 5001\n  - **Swagger**: /swagger/index.html\n- **Postgres**: 5432\n- **Redis**: 6379\n- **Papercut**: 8080\n- **Seq**: 8081\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorven11%2Fwebapi.template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorven11%2Fwebapi.template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorven11%2Fwebapi.template/lists"}