Giter Site home page Giter Site logo

clean-architecture-cqrs's Introduction

Clean Architecture with CQRS Pattern

This is template and sample, and used pure .NET. I tried to biuld a simple structure.

This project is an implementation of the Clean Architecture with CQRS Pattern using .NET 8. The Clean Architecture provides a robust and flexible software design that can easily adapt to changes and maintainability. CQRS (Command Query Responsibility Segregation) pattern separates the application into two parts: Commands and Queries. Commands are responsible for modifying the state of the application while Queries are responsible for retrieving data from the application. The separation of concerns enables scalability and performance optimization for the application.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • .NET 8 SDK
  • Visual Studio 2019 or Visual Studio Code

Installing

  1. Clone the repository:
git clone https://github.com/Rezakazemi890/Clean-Architecture-CQRS.git
  1. Open the solution file CleanArchitectureCQRS.sln in Visual Studio.

  2. Build the solution by pressing Ctrl + Shift + B or by navigating to Build -> Build Solution.

  3. Run the application by pressing F5 or by navigating to Debug -> Start Debugging.

Running the Tests

The project includes unit tests that can be run using the Test Explorer in Visual Studio or by running the following command in the terminal:

dotnet test

Architecture

The Clean Architecture with CQRS Pattern consists of the following layers:

  • Api Layer: This layer contains the user interface components of the application. It is responsible for handling user input and displaying output. The presentation layer communicates with the Application Layer using DTOs (Data Transfer Objects).

  • Application Layer: This layer contains the business logic of the application. It is responsible for coordinating the use cases of the application. The Application Layer communicates with the Domain Layer using commands and queries.

  • Domain Layer: This layer contains the core entities and business logic of the application. It is responsible for defining the rules and behaviors of the application.

  • Infrastructure Layer: This layer contains the implementation details of the application. It is responsible for communicating with external systems and services. The Infrastructure Layer communicates with the Application Layer using repositories and data access objects.

  • Shared Layer: This layer contains the implementation of common and share abstraction or details that could used by other layers.

Technologies Used

  • .NET 8
  • ASP.NET Core
  • Entity Framework Core
  • xUnit

License

This project is licensed under the MIT License - see the License.md file for details.

clean-architecture-cqrs's People

Contributors

rezakazemi890 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.