Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hazeliscoding/clean-todo-api
An example of a Clean Architecture approach in an ASP.NET Core Web API project, leveraging Dapper as the ORM and MySQL as the database.
https://github.com/hazeliscoding/clean-todo-api
cqrs domain-driven-design mediatr mysql
Last synced: about 1 month ago
JSON representation
An example of a Clean Architecture approach in an ASP.NET Core Web API project, leveraging Dapper as the ORM and MySQL as the database.
- Host: GitHub
- URL: https://github.com/hazeliscoding/clean-todo-api
- Owner: hazeliscoding
- License: mit
- Created: 2023-09-08T12:39:05.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-11T20:04:23.000Z (over 1 year ago)
- Last Synced: 2024-11-27T22:13:46.078Z (about 1 month ago)
- Topics: cqrs, domain-driven-design, mediatr, mysql
- Language: C#
- Homepage:
- Size: 42 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Clean Architecture with ASP.NET Core, Dapper, and MySQL
A simple Todo App API used as an example of a Clean Architecture approach in an ASP.NET Core, leveraging Dapper as the ORM and MySQL as the database.## 🚀 Features
* **Clean Architecture**: Clear separation of concerns with four main layers: API, Application, Domain, and Infrastructure.
* **Dapper ORM**: Flexible and fast micro ORM.
* **MySQL**: Robust open-source relational database.
* **CQRS with MediatR**: Command Query Responsibility Segregation to clearly differentiate read and write actions.
* **Docker-Compose**: Easily containerize the application for consistent development and deployment experiences.## 📚 Project Structure
* **API Layer**: Entry point of the application. Contains the ASP.NET Core Web API setup, controllers, and DI configuration.
* **Application Layer**: Houses the application's business logic, DTOs, interfaces, and application-specific services. Contains MediatR commands and queries.
* **Domain Layer**: Core layer of the project. Contains all the domain entities, value objects, domain events, and domain services.
* **Infrastructure Layer**: Deals with the external concerns, data access, and other integrations. Contains the Dapper ORM configurations and repository implementations.## 🐋 Docker-Compose
This project includes a `docker-compose.yml file` to help you containerize your application. This simplifies setup, especially for contributors who want to run the project without manually configuring external dependencies like MySQL.### Running with Docker
Ensure you have Docker and Docker-Compose installed. Then:```
docker-compose up --build
```This will build the required images and start the containers. Once running, you can access the API typically at `http://localhost:`.
## 🌱 Getting Started
1. Clone this repository:
```
git clone https://github.com/nekomatadev/clean-architecture-demo.git
```
2. Navigate to the project directory:
```
cd path-to-project-directory
```
3. Use Docker-Compose to run the application:
```
docker-compose up --build
```## 📜 License
[MIT](https://choosealicense.com/licenses/mit/)