{"id":15039491,"url":"https://github.com/rafaelfgx/architecture","last_synced_at":"2025-05-14T01:11:52.011Z","repository":{"id":39609896,"uuid":"106144134","full_name":"rafaelfgx/Architecture","owner":"rafaelfgx","description":".NET 9, Angular 19, Clean Architecture, Clean Code, SOLID Principles, KISS Principle, DRY Principle, Fail Fast Principle, Common Closure Principle, Common Reuse Principle, Acyclic Dependencies Principle, Mediator Pattern, Result Pattern, Folder-by-Feature Structure, Separation of Concerns.","archived":false,"fork":false,"pushed_at":"2025-05-12T15:35:15.000Z","size":29,"stargazers_count":3214,"open_issues_count":0,"forks_count":816,"subscribers_count":269,"default_branch":"main","last_synced_at":"2025-05-12T16:48:24.805Z","etag":null,"topics":["angular","angular-19","angular19","architecture","aspnet-core","aspnetcore","best-practices","c-charp","clean-architecture","clean-code","csharp","domain-driven-design","dot-net","dot-net-9","dotnet","dotnet-9","dotnet9","entity-framework","solid","typescript"],"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/rafaelfgx.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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":"2017-10-08T02:17:11.000Z","updated_at":"2025-05-12T15:35:20.000Z","dependencies_parsed_at":"2024-05-31T21:28:31.131Z","dependency_job_id":"1ec0201e-ea89-47cc-a8bb-4d24318f1892","html_url":"https://github.com/rafaelfgx/Architecture","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"8cb638ed7641942c31bfb1fe2baaa4546594aeb6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaelfgx%2FArchitecture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaelfgx%2FArchitecture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaelfgx%2FArchitecture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaelfgx%2FArchitecture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafaelfgx","download_url":"https://codeload.github.com/rafaelfgx/Architecture/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254049521,"owners_count":22006078,"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":["angular","angular-19","angular19","architecture","aspnet-core","aspnetcore","best-practices","c-charp","clean-architecture","clean-code","csharp","domain-driven-design","dot-net","dot-net-9","dotnet","dotnet-9","dotnet9","entity-framework","solid","typescript"],"created_at":"2024-09-24T20:43:02.313Z","updated_at":"2025-05-14T01:11:46.982Z","avatar_url":"https://github.com/rafaelfgx.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ARCHITECTURE\n\n![](https://github.com/rafaelfgx/Architecture/actions/workflows/build.yaml/badge.svg)\n\nThis project is an example of architecture using new technologies and best practices.\n\nThe goal is to learn and share knowledge and use it as reference for new projects.\n\n## PRINCIPLES and PATTERNS\n\n* Clean Architecture\n* Clean Code\n* SOLID Principles\n* KISS Principle\n* DRY Principle\n* Fail Fast Principle\n* Common Closure Principle\n* Common Reuse Principle\n* Acyclic Dependencies Principle\n* Mediator Pattern\n* Result Pattern\n* Folder-by-Feature Structure\n* Separation of Concerns\n\n## BENEFITS\n\n* Simple and evolutionary architecture.\n* Standardized and centralized flow for validation, log, security, return, etc.\n* Avoid cyclical references.\n* Avoid unnecessary dependency injection.\n* Segregation by feature instead of technical type.\n* Single responsibility for each request and response.\n* Simplicity of unit testing.\n\n## TECHNOLOGIES\n\n* [.NET](https://dotnet.microsoft.com/download)\n* [ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core)\n* [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core)\n* [C#](https://docs.microsoft.com/en-us/dotnet/csharp)\n* [Angular](https://angular.dev)\n* [UIkit](https://getuikit.com/docs/introduction)\n\n## RUN\n\n\u003cdetails\u003e\n\u003csummary\u003eCommand Line\u003c/summary\u003e\n\n#### Prerequisites\n\n* [.NET SDK](https://dotnet.microsoft.com/download/dotnet)\n* [SQL Server](https://go.microsoft.com/fwlink/?linkid=866662)\n* [Node](https://nodejs.org)\n* [Angular CLI](https://angular.dev/tools/cli)\n\n#### Steps\n\n1. Open directory **source\\Web\\Frontend** in command line and execute **npm run restore**.\n2. Open directory **source\\Web** in command line and execute **dotnet run**.\n3. Open \u003chttps://localhost:8090\u003e.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eVisual Studio Code\u003c/summary\u003e\n\n#### Prerequisites\n\n* [.NET SDK](https://dotnet.microsoft.com/download/dotnet)\n* [SQL Server](https://go.microsoft.com/fwlink/?linkid=866662)\n* [Node](https://nodejs.org)\n* [Angular CLI](https://angular.dev/tools/cli)\n* [Visual Studio Code](https://code.visualstudio.com)\n* [C# Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp)\n\n#### Steps\n\n1. Open directory **source\\Web\\Frontend** in command line and execute **npm run restore**.\n2. Open **source** directory in Visual Studio Code.\n3. Press **F5**.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eVisual Studio\u003c/summary\u003e\n\n#### Prerequisites\n\n* [Visual Studio](https://visualstudio.microsoft.com)\n* [Node](https://nodejs.org)\n* [Angular CLI](https://angular.dev/tools/cli)\n\n#### Steps\n\n1. Open directory **source\\Web\\Frontend** in command line and execute **npm run restore**.\n2. Open **source\\Architecture.sln** in Visual Studio.\n3. Set **Architecture.Web** as startup project.\n4. Press **F5**.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDocker\u003c/summary\u003e\n\n#### Prerequisites\n\n* [Docker](https://www.docker.com/get-started)\n\n#### Steps\n\n1. Execute **docker compose up --detach --build --force-recreate --remove-orphans**.\n2. Open \u003chttp://localhost:8090\u003e.\n\n\u003c/details\u003e\n\n## PACKAGES\n\n**Source:** [https://github.com/rafaelfgx/DotNetCore](https://github.com/rafaelfgx/DotNetCore)\n\n**Published:** [https://www.nuget.org/profiles/rafaelfgx](https://www.nuget.org/profiles/rafaelfgx)\n\n## LAYERS\n\n**Web:** Frontend and Backend.\n\n**Application:** Flow control.\n\n**Domain:** Business rules and domain logic.\n\n**Model:** Data transfer objects.\n\n**Database:** Data persistence.\n\n## WEB\n\n### FRONTEND\n\n### Service\n\nIt is the interface between frontend and backend and has logic that does not belong in components.\n\n### Guard\n\nIt validates if a route can be activated.\n\n### ErrorHandler\n\nIt provides a hook for centralized exception handling.\n\n### HttpInterceptor\n\nIt intercepts and handles an HttpRequest or HttpResponse.\n\n### BACKEND\n\n### Controller\n\nIt has no any logic, business rules or dependencies other than mediator.\n\n## APPLICATION\n\nIt has only business flow, not business rules.\n\n### Request\n\nIt has properties representing the request.\n\n### Request Validator\n\nIt has rules for validating the request.\n\n### Response\n\nIt has properties representing the response.\n\n### Handler\n\nIt is responsible for the business flow and processing a request to return a response.\n\nIt call factories, repositories, unit of work, services or mediator, but it has no business rules.\n\n### Factory\n\nIt creates a complex object.\n\nAny change to object affects compile time rather than runtime.\n\n## DOMAIN\n\nIt has no any references to any layer.\n\nIt has aggregates, entities, value objects and services.\n\n### Aggregate\n\nIt defines a consistency boundary around one or more entities.\n\nThe purpose is to model transactional invariants.\n\nOne entity in an aggregate is the root, any other entities in the aggregate are children of the root.\n\n### Entity\n\nIt has unique identity. Identity may span multiple bounded contexts and may endure beyond the lifetime.\n\nChanging properties is only allowed through internal business methods in the entity, not through direct access to the properties.\n\n### Value Object\n\nIt has no identity and it is immutable.\n\nIt is defined only by the values ​​of its properties.\n\nTo update a value object, you must create a new instance to replace the old one.\n\nIt can have methods that encapsulate domain logic, but these methods must have no side effects on the state.\n\n### Services\n\nIt performs domain operations and business rules.\n\nIt is stateless and has no operations that are not a part of an entity or value object.\n\n## MODEL\n\nIt has properties to transport and return data.\n\n## DATABASE\n\nIt encapsulates data persistence.\n\n### Context\n\nIt configures the connection and represents the database.\n\n### Entity Configuration\n\nIt configures the entity and its properties in the database.\n\n### Repository\n\nIt inherits from the generic repository and only implements specific methods.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaelfgx%2Farchitecture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafaelfgx%2Farchitecture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaelfgx%2Farchitecture/lists"}