Skip to content

codevidyalaya/CodeVidyalaya.Clean

Repository files navigation

Clean Architecture ASP.NET Core Web API

This repository contains an ASP.NET Core Web API project implemented using the clean architecture approach. Clean architecture emphasizes separation of concerns and maintainability by organizing code into distinct layers based on their responsibilities.

Project Structure The project structure follows the principles of clean architecture, consisting of the following layers:

Domain Layer: Contains business entities, interfaces, and domain logic. This layer is independent of other layers and represents the core business logic of the application.

Application Layer: Implements use cases or application-specific logic. It acts as a mediator between the presentation and domain layers, orchestrating the flow of data and invoking domain logic.

Infrastructure Layer: Contains implementations for external concerns such as database access, external services, and other infrastructure-related code. It depends on the domain layer but is isolated from the application layer.

Presentation Layer: In this project, the presentation layer is represented by the ASP.NET Core Web API. It handles HTTP requests, routing, serialization, and interacts with the application layer to fulfill client requests.

Prerequisites Before running this application, ensure you have the following installed:

.NET Core SDK version X.X or later Visual Studio Code or any preferred code editor

Getting Started 1.Clone this repository to your local machine: git clone https://github.com/your-username/your-repository.git

2.Navigate to the project directory: cd your-repository

3.Run the application: dotnet run

4.Once the application is running, you can access the API endpoints using your preferred HTTP client.

Configuration The application configuration can be found in the appsettings.json file. Adjust the settings as needed for your environment, such as database connection strings, logging configuration, etc.

Testing Unit tests and integration tests are located in the tests directory. You can run the tests using the following command:

dotnet test

Contributing Contributions are welcome! Feel free to open an issue or submit a pull request for any improvements or features you'd like to add.

License This project is licensed under the MIT License.