Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goodtocode/entities
GoodToCode Stack is a collection of common domain entities written in dotNet Core with Gherkin Specflow tests. Focused on DDD, CQRS, Microservices, Serverless and guided by the SOLID principle.
https://github.com/goodtocode/entities
azure-app-services azure-devops azure-functions azure-pipelines ddd-cqrs dotnet dotnet-core entity-framework-core
Last synced: 7 days ago
JSON representation
GoodToCode Stack is a collection of common domain entities written in dotNet Core with Gherkin Specflow tests. Focused on DDD, CQRS, Microservices, Serverless and guided by the SOLID principle.
- Host: GitHub
- URL: https://github.com/goodtocode/entities
- Owner: goodtocode
- License: apache-2.0
- Created: 2020-07-19T01:46:47.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-29T19:36:33.000Z (4 months ago)
- Last Synced: 2024-12-16T14:14:14.924Z (7 days ago)
- Topics: azure-app-services, azure-devops, azure-functions, azure-pipelines, ddd-cqrs, dotnet, dotnet-core, entity-framework-core
- Language: C#
- Homepage: https://www.goodtocode.com
- Size: 11.8 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# GoodToCode Entities
The goal of GoodToCode Entities is to quick-start custom software applications by providing easy-to-extend Domain Entities and the APIs/Azure Functions that exposes these entities.![Entities LZ](https://github.com/goodtocode/entities/actions/workflows/gtc-rg-entities-landingzone.yml/badge.svg)
![Subjects LZ](https://github.com/goodtocode/entities/actions/workflows/gtc-rg-subjects-landingzone.yml/badge.svg)
![Subjects API](https://github.com/goodtocode/entities/actions/workflows/gtc-rg-subjects-api.yml/badge.svg)
GoodToCode Entities is a Microservice/Serverless centric collection of common Domain Entities that you often include in software applications. These Entities, like Person and Location, can be assembled and used in your business apps and APIs.
GoodToCode Entities is based on DDD, onion-architecture, vertical slice and CQRS in .NET Core and EF Core code-first.
## Dev Environment Installation
### Environment Variables
1. Create "ASPNETCORE_ENVIRONMENT" and set it to Development. These relate to the appsettings.ENVIRONMENT.json files.
* Development
* ProductionPowershell: $env:ASPNETCORE_ENVIRONMENT="Development"
### Azure Infrastructure
#### Create a Cloud Adoption Framework (CAF) Landing Zone[About CAF Landing Zones](https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/landing-zone/)
1. If you are using GitHub Actions
* Create the shared Entities resource group: .github/workflows/gtc-rg-entities-landingzone.yml
* Create the Subjects resource group: .github/workflows/gtc-rg-subjects-landingzone.yml
* Deploy the Subjects API and runs EF Migrations: .github/workflows/gtc-rg-subjects-api.yml2. If you are using Azure DevOps Pipelines
* Create the shared Entities resource group: .azure-devops/pipelines/gtc-entities-landingzone.yml
* Create the Subjects resource group: .azure-devops/pipelines/gtc-entities-subjects-landingzone.yml
* Deploy the Subjects API: .azure-devops/pipelines/gtc-entities-subjects-api.yml
* Deploy the Subjects EF Migrations: .azure-devops/pipelines/gtc-entities-subjects-ef.yml#### Azure AD and B2C Identity
[Blazor WebAssebly Azure B2C](https://learn.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/hosted-with-azure-active-directory-b2c?view=aspnetcore-6.0)
## Projects and Namespaces
Namespace | Path | Contents
--- | --- | ---
Goodtocode.Subjects.Common | /src/Subjects/Common | Includes shared kernel library that are candidates to share with other projects.
Goodtocode.Subjects.Domain | /src/Subjects/Core/Domain | Includes core domain objects, entities and interfaces. This only references .NET.
odtocode.Subjects.Application | /src/Subjects/Core/Application | Includes core application commands and queries. This only references Domain.
Goodtocode.Subjects.Persistence | /src/Subjects/Infrastructure/Persistence |Includes infrastructure concerns such as repositories, dbcontexts. This references Domain and Application.
Goodtocode.Subjects.WebApi | /src/Subjects/Common | Includes presentation Web API. This references Persistence.
Goodtocode.Subjects.Unit | /src/Subjects/Specs/Application.Unit | Unit tests that exercise Domain and Applicaiton with mocked infrastructure. This references Persistence.
Goodtocode.Subjects.Integration | /src/Subjects/Specs/Application.Integration | Unit tests that exercise Domain, Application and Presistence. Uses In-memory Database. This references Persistence.## Dev Box Installation
Package | Command
--- | ---
OS | Windows or Linux (default Windows)
Windows Terminal | winget install --id=Microsoft.WindowsTerminal -e
Git SCM | winget install --id Git.Git -e --source winget
Visual Studio Code | winget install Microsoft.VisualStudioCode -e
.NET 7 SDK | winget install dotnet-sdk-74## Visual Studio Code Setup
Action/Command | Operation
--- | ---
Extensions C# | ms-dotnettools.csharp - https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp
Extensions SQL Server | ms-mssql.mssql - https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql
Ctrl+Shft+P | .NET Generate Assets for Build and Debug -> Create tasks.json from Template -> .NET Core
`
Type build | Select Tasks: Configure Default Build Task
Optional Py/Js/Jsx/Tsx | VisualStudioExptTeam.vscodeintellicode - https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode## Notable NuGet packages
### Api.WebApi
Package | Purpose
--- | ---
dotnet add package Azure.Extensions.AspNetCore.Configuration.Secrets | Key Vault Secrets
dotnet add package FluentValidation.AspNetCore | Fluent Assertions
dotnet add package Microsoft.AspNetCore.OpenApi | OpenAPI (swagger UI)
dotnet add package Swashbuckle.AspNetCore | Swagger Gen (swagger.json)
### Web.BlazorServer
Package | Purpose
--- | ---
dotnet add package Azure.Extensions.AspNetCore.Configuration.Secrets | Key Vault Secrets
dotnet add package BlazorPro.Spinkit | Spinners for progress