{"id":21861723,"url":"https://github.com/alertbox/skol-backend-monolithic-webapi","last_synced_at":"2025-03-21T20:19:29.169Z","repository":{"id":148872119,"uuid":"376512953","full_name":"alertbox/skol-backend-monolithic-webapi","owner":"alertbox","description":"Cocktails 🍸 ordering backend API demo code for minimal API with CQRS pattern using ASP.NET Web API.","archived":false,"fork":false,"pushed_at":"2021-06-24T06:37:38.000Z","size":74,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T14:54:14.591Z","etag":null,"topics":["cqrs-pattern","onion-architecture","skol-backend-api"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"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/alertbox.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":"2021-06-13T10:38:32.000Z","updated_at":"2021-06-28T10:15:20.000Z","dependencies_parsed_at":"2023-07-11T13:45:31.993Z","dependency_job_id":null,"html_url":"https://github.com/alertbox/skol-backend-monolithic-webapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alertbox%2Fskol-backend-monolithic-webapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alertbox%2Fskol-backend-monolithic-webapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alertbox%2Fskol-backend-monolithic-webapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alertbox%2Fskol-backend-monolithic-webapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alertbox","download_url":"https://codeload.github.com/alertbox/skol-backend-monolithic-webapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244860650,"owners_count":20522471,"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":["cqrs-pattern","onion-architecture","skol-backend-api"],"created_at":"2024-11-28T03:12:29.310Z","updated_at":"2025-03-21T20:19:29.139Z","avatar_url":"https://github.com/alertbox.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Skol Monolithic Web API (Backend)\n\nThis [Cocktails][cocktails-list] :cocktail: ordering backend API code demonstrates developing a minimal API with CQRS pattern for ASP.NET Web API.\n\n\u003e Originally, **Skol** is the Swedish way of saying :beers: Cheers! \n\n### What's included:\n- Uses .NET 5.0 as target framework\n- Uses Top-level Class, Minimal Hosting, Record types, et al.\n- Uses ASP.NET Core for the RESTful Web API\n- Uses API Versioning, REST Convensions, et al.\n- Uses Seed Data for EF Core InMemory database\n- Uses DbContext for the Unit of Work and repository pattern\n- Uses Mediatr for Publisher/Subscriber pattern\n- Uses Onion Architecture for solution structure and layers\n- Uses REST Client extension for trying out the api endpoints from VS Code\n- Built with Visual Studio 2019 for Mac\n- Configured to build and run from the VS Code tasks\n- Configured to build and run from Remote - Container found in @kosalanuwan/devcontainers\n\n## Todo\n\n- [X] Use of Mediatr Behavior for post process\n- [ ] Use of Global imports\n- [ ] Use of Web Application hosting for API.NET Web API\n- [ ] Use of Minimal API routes with versioning\n\n## Quick Start\nIf you want to fork or clone the repo locally, then open up the source code in a remote container.\n\n```zsh\n#!/bin/zsh\n# Clone with GitHub CLI\ngh repo clone kosalanuwan/vscode-remote-try-skol-minimal-api\ncd vscode-remote-try-skol-minimal-api\n```\n\nWith VS Code:\n```zsh\n#!/bin/zsh\n# Run in watch mode\ndotnet restore\ndotnet build\ndotnet watch --project Services/Skol.Services.csproj run\n```\n\n### Troubleshooting\nUnable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found.\n```zsh\n#!/bin/zsh\n# Clean all HTTP developer certs\ndotnet dev-certs https --clean\n# Trust the cert on the current platform\ndotnet dev-certs https -t\n```\n\n## Useful Commands\n\n\n```zsh\n#!/bin/zsh\n# Create new projects\ndotnet new classlib -n Skol.Domain -o Domain\ndotnet new classlib -n Skol.Application -o Application\ndotnet new classlib -n Skol.Infrastructure -o Infrastructure\ndotnet new webapi -n Skol.Services -o Services\n# Update .vscode/tasks.json \u003e watch \u003e command \u003e Path to starter project.\n```\n\n```zsh\n#!/bin/zsh\n# Add project-to-project (P2P) references\ndotnet add Services/ reference Application/ Infrastructure/\ndotnet add Application/ reference Domain/\ndotnet add Infrastructure/ reference Application/\n```\n\n```zsh\n#!/bin/zsh\n# Create a solution file and add projects\ndotnet new sln -n Skol\ndotnet sln add Domain/ Infrastructure/ Application/ Services/\n```\n\n```zsh\n#!/bin/zsh\n# Add NuGet packages for Application\ncd Application/\ndotnet add package MediatR.Extensions.Microsoft.DependencyInjection\ndotnet add package Microsoft.EntityFrameworkCore\ndotnet add package Microsoft.Extensions.Configuration \n```\n\n```bash\n#!/bin/zsh\n# Add NuGet packages for Infrastructure\ncd Infrastructure/\ndotnet add package Microsoft.EntityFrameworkCore.InMemory\n```\n\n```bash\n#!/bin/zsh\n# Add NuGet packages for Versioning the API\ncd Services/\ndotnet add package Microsoft.AspnetCore.Mvc.Versioning --prerelease\n```\n\n- [The VS Code Remote - Containers docs][vscode-remote-docs] is a good source to learn more about `.devcontainer.json` configuration options and its usage.\n- [See .NET Core CLI page][dotnet-core-cli-docs] to learn the full-blown `dotnet` options.\n\n[cocktails-list]: https://www.thespruceeats.com/a-to-z-cocktail-recipes-3962886\n[devcontainers-repo]: https://github.com/microsoft/vscode-dev-containers\n[dotnet-sdk-docker-image]: https://hub.docker.com/_/microsoft-dotnet-sdk/\n[azure-cli-docs]: https://docs.microsoft.com/en-us/cli/azure/get-started-with-azure-cli\n[node-js-docs]: https://nodejs.dev/learn\n[vscode-remote-docs]: https://code.visualstudio.com/docs/remote/containers\n[dotnet-core-cli-docs]: https://docs.microsoft.com/en-us/dotnet/core/tools/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falertbox%2Fskol-backend-monolithic-webapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falertbox%2Fskol-backend-monolithic-webapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falertbox%2Fskol-backend-monolithic-webapi/lists"}