A template project for building web applications integrating a React frontend with ASP.NET Core backend, designed using Clean Architecture principles.
This template follows Clean Architecture principles with the following layers:
src/Domain/- Core business entities and rules (has no dependencies)src/Application/- Business logic and use cases (depends only on Domain)src/Infrastructure/- External concerns like persistence, I/O (depends on Application)src/Api/- ASP.NET Core backend API exposing functionality to clientssrc/Client/- React TypeScript client application using Vite
This project serves as a starting point for building applications with Clean Architecture. While the structure is in place, many components remain to be implemented according to your specific requirements. The template provides:
- Basic project structure following Clean Architecture
- Sample Hello World implementation spanning all layers
- Integration between .NET backend and React frontend
- Modern tooling for both backend and frontend development
- Unit testing setup with Vitest for the client application
- Independent of Frameworks: The architecture doesn't depend on the existence of some library or framework
- Testable: Business rules can be tested without UI, database, web server, or any external element
- Independent of UI: The UI can change without changing the rest of the system
- Independent of Database: Business rules are not bound to a specific database
- Independent of any external agency: Business rules don't know anything about outside world interfaces
- .NET 8.0: This project requires .NET 8.0 or higher. You can install it directly from the link or via Visual Studio 2022 installer.
- PNPM: This project uses PNPM as the package manager for the frontend instead of NPM. Follow the installation instructions from the link to set it up on your system.
Each project contains its own README.md file with specific instructions for that layer:
To start using this template for your own project:
- Clone or fork the repository
- Rename namespaces and solution files as needed
- Implement your own domain entities and business logic
- Add infrastructure implementations for your specific requirements
- Extend the API with your own controllers and endpoints
- Develop the client application to fit your UI needs