1- # 🚀 Clean Architecture Full-Stack Starter: .NET, Angular, and PostgreSQL
2-
3- <!-- <p align="center">
4- <img src="docs/logo.png" alt="Clean Architecture Logo" width="150px">
5- <br>
6- <em>Production-ready | Maintainable | Scalable</em>
7- </p> -->
8-
1+ # Clean Architecture Full-Stack Starter: .NET, Angular, and PostgreSQL
2+ > Clean Architecture with RBAC implementation for API (.Net) and UI (Angular)
93 <p align="center">
104 <a href="https://github.com/nitin27may/clean-architecture-docker-dotnet-angular/actions/workflows/angular-build.yml">
115 <img src="https://github.com/nitin27may/clean-architecture-docker-dotnet-angular/actions/workflows/angular-build.yml/badge.svg" alt="Angular Build">
1610 <a href="LICENSE">
1711 <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License">
1812 </a>
19- <img src =" https://img.shields.io/badge/Angular-19-DD0031.svg " alt =" Angular 20 " >
20- <img src =" https://img.shields.io/badge/.NET-9-512BD4.svg " alt =" .NET 9 " >
21- <img src =" https://img.shields.io/badge/PostgreSQL-16-336791.svg " alt =" PostgreSQL 16 " >
13+ <img src="https://img.shields.io/badge/Angular-21-512BD4.svg" alt="Angular 21">
14+ <img src="https://img.shields.io/badge/.NET-10-512BD4.svg" alt=".NET 10">
15+ <img src="https://img.shields.io/badge/PostgreSQL-17-336791.svg" alt="PostgreSQL 17">
16+ <img src="https://img.shields.io/badge/Aspire-9.5-6C3483.svg" alt=".NET Aspire 9.5">
2217 </p>
2318
2419<p align =" center " >
2823<em >Contact Management Application with Role-Based Access Control</em >
2924</p >
3025
31- ## ✨ What is this?
26+ ## What is this?
3227
3328A production-ready ** full-stack starter kit** built with modern technologies and best practices:
3429
35- - ** Frontend** : Angular 20 with signals, Material Design, and TailwindCSS
36- - ** Backend** : .NET 9 API with Clean Architecture
37- - ** Database** : PostgreSQL with Dapper
30+ - ** Frontend** : Angular 21 with signals, Material Design, TailwindCSS v4, and Fluent Design
31+ - ** Backend** : .NET 10 API with Clean Architecture and Scalar API documentation
32+ - ** Database** : PostgreSQL 17 with pgAdmin and Dapper ORM
33+ - ** Orchestration** : .NET Aspire 9.5 for local development with service discovery
3834- ** DevOps** : Docker, GitHub Actions, NGINX
3935
4036Perfect for developers who want to ** focus on business logic** instead of configuring infrastructure.
4137
42- ## 🏗️ Why Clean Architecture?
38+ ## Why Clean Architecture?
4339
4440<p align =" center " >
4541 <img src =" docs/screenshots/clean-architecture.png " alt =" Clean Architecture Diagram " width =" 60% " >
@@ -54,7 +50,44 @@ Clean Architecture provides **significant benefits** for your application:
5450
5551[ Clean Architecture Series] ( ./docs/architecture-series.md ) - Read more about it!
5652
57- ## 🚀 Quick Start
53+ ## Quick Start
54+
55+ ### Option 1: Using .NET Aspire (Recommended for Development)
56+
57+ ** .NET Aspire** provides a streamlined local development experience with automatic service discovery, health monitoring, and an integrated dashboard.
58+
59+ #### Prerequisites
60+
61+ > ** Important** : Make sure you have the correct versions installed before proceeding.
62+
63+ - [ .NET SDK 10.0] ( https://dotnet.microsoft.com/download/dotnet/10.0 ) or later
64+ - [ Node.js 22 LTS] ( https://nodejs.org/ ) (** not** Node 23 - use LTS version only)
65+ - [ Docker Desktop] ( https://www.docker.com/products/docker-desktop ) (for PostgreSQL container)
66+
67+ #### Steps
68+
69+ ``` bash
70+ # Clone the repository
71+ git clone https://github.com/nitin27may/clean-architecture-docker-dotnet-angular.git clean-app
72+ cd clean-app
73+
74+ # IMPORTANT: Install Angular dependencies first
75+ cd frontend
76+ npm install
77+ cd ..
78+
79+ # Run with Aspire
80+ dotnet run --project aspire/AppHost
81+ ```
82+
83+ 🔗 Then access:
84+ - ** Aspire Dashboard** : https://localhost:17178 (see all services, logs, traces)
85+ - ** Frontend** : http://localhost:4200
86+ - ** API** : Check Aspire dashboard for the assigned port
87+ - ** Scalar API Docs** : ` {API_URL}/scalar/v1 `
88+ - ** pgAdmin** : Check Aspire dashboard for the assigned port
89+
90+ ### Option 2: Using Docker Compose (Production-like)
5891
5992``` bash
6093# Clone the repository
@@ -68,10 +101,10 @@ cp .env.example .env
68101docker-compose up
69102```
70103
71- 🔗 Then access:
104+ Then access:
72105- Frontend: http://localhost
73106- API: http://localhost/api
74- - Swagger : http://localhost/swagger
107+ - Scalar API Docs : http://localhost/scalar/v1
75108
76109### 👤 Default Users
77110
@@ -81,78 +114,126 @@ docker-compose up
81114| editor@gmail.com | P@ssword #321 | Editor |
82115| reader@gmail.com | P@ssword #321 | Reader |
83116
84- ## 🔥 Key Features
117+ ## Key Features
85118
86119<table >
87120 <tr >
88121 <td width="33%">
89- <h3>📱 Modern Frontend</h3>
122+ <h3>Modern Frontend</h3>
90123 <ul>
91- <li>Angular 20 with standalone components</li>
124+ <li>Angular 21 with standalone components</li>
92125 <li>Signal-based state management</li>
93- <li>Material Design + TailwindCSS</li>
126+ <li>Material Design + TailwindCSS v4</li>
127+ <li>Fluent Design System tokens</li>
94128 <li>Dark/light theme support</li>
95129 <li>Responsive mobile-first design</li>
96- <li>Role Based Routing and Menu </li>
130+ <li>Role-based routing and menu </li>
97131 </ul>
98132 </td>
99133 <td width="33%">
100- <h3>🔒 Secure Backend</h3>
134+ <h3>Secure Backend</h3>
101135 <ul>
102136 <li>Clean Architecture implementation</li>
103137 <li>Generic Repository pattern</li>
104138 <li>JWT authentication</li>
105139 <li>Role-based permissions</li>
106- <li>User Activity Logging</li>
107- <li>Golbal Exception Handling</li>
108- <li>PostgreSQL with Dapper</li>
140+ <li>User activity logging</li>
141+ <li>Global exception handling</li>
142+ <li>Scalar API documentation</li>
143+ <li>PostgreSQL 17 with Dapper</li>
109144 </ul>
110145 </td>
111146 <td width="33%">
112- <h3>🚢 DevOps Ready</h3>
147+ <h3>DevOps Ready</h3>
113148 <ul>
149+ <li>.NET Aspire orchestration</li>
114150 <li>Docker containerization</li>
115151 <li>GitHub Actions workflows</li>
116152 <li>NGINX reverse proxy</li>
153+ <li>pgAdmin database management</li>
117154 <li>Multi-environment configs</li>
118- <li>Database migrations </li>
155+ <li>Database seeding </li>
119156 </ul>
120157 </td>
121158 </tr >
122159</table >
123160
124- ## 🧩 Architecture
161+ ## Project Structure
162+
163+ ```
164+ clean-architecture-docker-dotnet-angular/
165+ ├── aspire/ # .NET Aspire orchestration
166+ │ ├── AppHost/ # Aspire host application
167+ │ │ └── AppHost.cs # Service configuration
168+ │ └── ServiceDefaults/ # Shared Aspire defaults
169+ ├── backend/ # .NET 10 API (Clean Architecture)
170+ │ ├── Contact.Api/ # API Layer (Controllers, Middleware)
171+ │ ├── Contact.Application/ # Application Layer (Services, DTOs)
172+ │ ├── Contact.Domain/ # Domain Layer (Entities, Interfaces)
173+ │ ├── Contact.Infrastructure/ # Infrastructure Layer (Repositories)
174+ │ └── Contact.Common/ # Shared utilities
175+ ├── frontend/ # Angular 21 SPA
176+ │ ├── src/app/@core/ # Core module (guards, interceptors, layout)
177+ │ ├── src/app/feature/ # Feature modules (contact, user, admin)
178+ │ └── src/app/styles/ # Global styles, Tailwind config
179+ ├── scripts/ # Database initialization
180+ │ ├── 01-init-db.sh # Create database
181+ │ └── 02-seed-data.sql # Seed initial data
182+ ├── api-collection/ # Bruno API collection for testing
183+ ├── docs/ # Documentation
184+ ├── loadbalancer/ # NGINX configuration
185+ ├── Contact.Api.sln # .NET Solution file
186+ ├── docker-compose.yml # Docker Compose configuration
187+ └── Dockerfile.api # API Dockerfile
188+ ```
189+
190+ ## Architecture
125191
126192<p align =" center " >
127193 <img src =" docs/screenshots/architecture.png " alt =" Container Architecture " width =" 80% " >
128194 <br >
129195 <em >Container Architecture Overview</em >
130196</p >
131197
132- ## 📚 Documentation
198+ ## Documentation
133199
134- 📖 Comprehensive documentation is available:
200+ Comprehensive documentation is available:
135201
202+ - [ Aspire Guide] ( ./docs/aspire-guide.md ) - Running with .NET Aspire
136203- [ Development Guide] ( ./docs/development-guide.md ) - Get started with development
137204- [ Frontend Documentation] ( ./docs/frontend.md ) - Angular architecture details
138205- [ Backend Documentation] ( ./docs/backend.md ) - .NET API implementation
206+ - [ Docker Guide] ( ./docs/docker-guide.md ) - Container configuration
139207- [ Feature List] ( ./docs/visual-feature-guide.md ) - Detailed feature breakdown
140208- [ Clean Architecture Series] ( ./docs/architecture-series.md ) - In-depth articles
141209- [ Roadmap] ( ./docs/roadmap.md ) - Upcoming features
142210
211+ ## Technology Stack
212+
213+ | Layer | Technology | Version |
214+ | -------| ------------| ---------|
215+ | Frontend | Angular | 21.0 |
216+ | UI Components | Angular Material | 21.0 |
217+ | CSS Framework | TailwindCSS | 4.1 |
218+ | Backend | .NET | 10.0 |
219+ | API Docs | Scalar | 2.1 |
220+ | Database | PostgreSQL | 17 |
221+ | ORM | Dapper | 2.1 |
222+ | Orchestration | .NET Aspire | 9.5 |
223+ | Containerization | Docker | Latest |
143224
144225## 🤝 Contributing
145226
146227We welcome contributions! See our [ contributing guide] ( ./CONTRIBUTING.md ) for details on how to get involved.
147228
148- ## 📄 License
229+ ## License
149230
150231This project is licensed under the MIT License - see the [ LICENSE] ( LICENSE ) file for details.
151232
152- ## 📧 Contact
233+ ## Contact
153234
154235For questions or support, please contact Nitin Singh at nitin27may@gmail.com .
155236
156- ## 🌟 Star the Repository
237+ ## Star the Repository
157238
158- If you find this project useful, please consider giving it a star on GitHub to show your support!
239+ If you find this project useful, please consider giving it a star on GitHub to show your support!
0 commit comments