Clean Architecture with RBAC implementation for API (.Net) and UI (Angular)
Contact Management Application with Role-Based Access Control
A production-ready full-stack starter kit built with modern technologies and best practices:
- Frontend: Angular 21 with signals, Material Design, TailwindCSS v4, and Fluent Design
- Backend: .NET 10 API with Clean Architecture and Scalar API documentation
- Database: PostgreSQL 17 with pgAdmin and Dapper ORM
- Orchestration: .NET Aspire 9.5 for local development with service discovery
- DevOps: Docker, GitHub Actions, NGINX
Perfect for developers who want to focus on business logic instead of configuring infrastructure.
Clean Architecture provides significant benefits for your application:
- β Maintainability: Separate concerns to make your code easier to understand and modify
- β Testability: Independent components that can be tested in isolation
- β Flexibility: Swap frameworks or technologies without rewriting your core business logic
- β Scalability: Grow your application with a clear structure that new team members can quickly understand
Clean Architecture Series - Read more about it!
.NET Aspire provides a streamlined local development experience with automatic service discovery, health monitoring, and an integrated dashboard.
Important: Make sure you have the correct versions installed before proceeding.
- .NET SDK 10.0 or later
- Node.js 22 LTS (not Node 23 - use LTS version only)
- Docker Desktop (for PostgreSQL container)
# Clone the repository
git clone https://github.com/nitin27may/clean-architecture-docker-dotnet-angular.git clean-app
cd clean-app
# IMPORTANT: Install Angular dependencies first
cd frontend
npm install
cd ..
# Run with Aspire
dotnet run --project aspire/AppHostπ Then access:
- Aspire Dashboard: https://localhost:17178 (see all services, logs, traces)
- Frontend: http://localhost:4200
- API: Check Aspire dashboard for the assigned port
- Scalar API Docs:
{API_URL}/scalar/v1 - pgAdmin: Check Aspire dashboard for the assigned port
# Clone the repository
git clone https://github.com/nitin27may/clean-architecture-docker-dotnet-angular.git clean-app
cd clean-app
# Create .env file (required)
cp .env.example .env
# Start all services with Docker Compose
docker-compose upThen access:
- Frontend: http://localhost
- API: http://localhost/api
- Scalar API Docs: http://localhost/scalar/v1
| Username | Password | Role |
|---|---|---|
| nitin27may@gmail.com | P@ssword#321 | Admin |
| editor@gmail.com | P@ssword#321 | Editor |
| reader@gmail.com | P@ssword#321 | Reader |
|
|
|
clean-architecture-docker-dotnet-angular/
βββ aspire/ # .NET Aspire orchestration
β βββ AppHost/ # Aspire host application
β β βββ AppHost.cs # Service configuration
β βββ ServiceDefaults/ # Shared Aspire defaults
βββ backend/ # .NET 10 API (Clean Architecture)
β βββ Contact.Api/ # API Layer (Controllers, Middleware)
β βββ Contact.Application/ # Application Layer (Services, DTOs)
β βββ Contact.Domain/ # Domain Layer (Entities, Interfaces)
β βββ Contact.Infrastructure/ # Infrastructure Layer (Repositories)
β βββ Contact.Common/ # Shared utilities
βββ frontend/ # Angular 21 SPA
β βββ src/app/@core/ # Core module (guards, interceptors, layout)
β βββ src/app/feature/ # Feature modules (contact, user, admin)
β βββ src/app/styles/ # Global styles, Tailwind config
βββ scripts/ # Database initialization
β βββ 01-init-db.sh # Create database
β βββ 02-seed-data.sql # Seed initial data
βββ api-collection/ # Bruno API collection for testing
βββ docs/ # Documentation
βββ loadbalancer/ # NGINX configuration
βββ Contact.Api.sln # .NET Solution file
βββ docker-compose.yml # Docker Compose configuration
βββ Dockerfile.api # API Dockerfile
Container Architecture Overview
Comprehensive documentation is available:
- Aspire Guide - Running with .NET Aspire
- Development Guide - Get started with development
- Frontend Documentation - Angular architecture details
- Backend Documentation - .NET API implementation
- Docker Guide - Container configuration
- Feature List - Detailed feature breakdown
- Clean Architecture Series - In-depth articles
- Roadmap - Upcoming features
| Layer | Technology | Version |
|---|---|---|
| Frontend | Angular | 21.0 |
| UI Components | Angular Material | 21.0 |
| CSS Framework | TailwindCSS | 4.1 |
| Backend | .NET | 10.0 |
| API Docs | Scalar | 2.1 |
| Database | PostgreSQL | 17 |
| ORM | Dapper | 2.1 |
| Orchestration | .NET Aspire | 9.5 |
| Containerization | Docker | Latest |
We welcome contributions! See our contributing guide for details on how to get involved.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or support, please contact Nitin Singh at nitin27may@gmail.com.
If you find this project useful, please consider giving it a star on GitHub to show your support!

