|
1 | | -[](https://github.com/nitin27may/clean-architecture-docker-dotnet-angular/actions/workflows/angular-build.yml) |
2 | | -[](https://github.com/nitin27may/clean-architecture-docker-dotnet-angular/actions/workflows/api-build.yml) |
3 | | - |
4 | | -# Clean Architecture Full-Stack Starter: .NET, Angular, and PostgreSQL with Docker |
5 | | - |
6 | | -A production-ready boilerplate for building modern web applications using .NET 9 Web API, Angular 19, and PostgreSQL with Docker. This template implements clean architecture principles, ensuring maintainable, testable, and scalable code that can evolve with changing business requirements. |
| 1 | +# 🚀 Clean Architecture Full-Stack Starter: .NET, Angular, and PostgreSQL |
7 | 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 | 8 |
|
| 9 | +<p align="center"> |
| 10 | + <a href="https://github.com/nitin27may/clean-architecture-docker-dotnet-angular/actions/workflows/angular-build.yml"> |
| 11 | + <img src="https://github.com/nitin27may/clean-architecture-docker-dotnet-angular/actions/workflows/angular-build.yml/badge.svg" alt="Angular Build"> |
| 12 | + </a> |
| 13 | + <a href="https://github.com/nitin27may/clean-architecture-docker-dotnet-angular/actions/workflows/api-build.yml"> |
| 14 | + <img src="https://github.com/nitin27may/clean-architecture-docker-dotnet-angular/actions/workflows/api-build.yml/badge.svg" alt="API Build"> |
| 15 | + </a> |
| 16 | + <a href="LICENSE"> |
| 17 | + <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License"> |
| 18 | + </a> |
| 19 | + <img src="https://img.shields.io/badge/Angular-19-DD0031.svg" alt="Angular 19"> |
| 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"> |
| 22 | +</p> |
9 | 23 |
|
10 | | -<!-- Application demo gif via HTTP --> |
11 | 24 | <p align="center"> |
12 | | - <img src="docs/clean-architecture-demo.gif" alt="Application Screenshot" width="80%"> |
| 25 | + <img src="docs/clean-architecture-demo.gif" alt="Application Demo" width="80%"> |
13 | 26 | <br> |
14 | | - <em>Contact Management Application with Role based Access Control</em> |
| 27 | + <em>Contact Management Application with Role-Based Access Control</em> |
15 | 28 | </p> |
16 | 29 |
|
17 | | -## Introduction |
| 30 | +## ✨ What is this? |
| 31 | + |
| 32 | +A production-ready **full-stack starter kit** built with modern technologies and best practices: |
18 | 33 |
|
19 | | -Are you tired of spending weeks setting up your project infrastructure before writing a single line of business logic? This starter kit solves that problem by providing: |
| 34 | +- **Frontend**: Angular 19 with signals, Material Design, and TailwindCSS |
| 35 | +- **Backend**: .NET 9 API with Clean Architecture |
| 36 | +- **Database**: PostgreSQL with Dapper |
| 37 | +- **DevOps**: Docker, GitHub Actions, NGINX |
20 | 38 |
|
21 | | -- **Production-Ready Architecture**: Built on enterprise-grade patterns that scale |
22 | | -- **Modern Tech Stack**: Latest versions of .NET 9, Angular 19, and PostgreSQL |
23 | | -- **Developer Experience**: Hot reload, comprehensive testing setup, and Docker integration |
24 | | -- **Best Practices**: Authentication, authorization, logging, and error handling already implemented |
25 | | -- **Code Quality**: Linting, formatting, and static analysis configurations included |
| 39 | +Perfect for developers who want to **focus on business logic** instead of configuring infrastructure. |
| 40 | + |
| 41 | +## 🏗️ Why Clean Architecture? |
26 | 42 |
|
27 | | -Whether you're building a startup MVP or an enterprise application, this template provides the solid foundation you need to focus on what matters - delivering business value. |
28 | 43 | <p align="center"> |
29 | | - <img src="docs/CleanArchitecture.png" alt="Clean Architecture Diagram" width="70%"> |
| 44 | + <img src="docs/CleanArchitecture.png" alt="Clean Architecture Diagram" width="60%"> |
30 | 45 | </p> |
31 | | -## Quick Start |
32 | 46 |
|
33 | | -To quickly start the application, clone the repository and run Docker Compose: |
| 47 | +Clean Architecture provides **significant benefits** for your application: |
34 | 48 |
|
35 | | -```bash |
36 | | -git clone https://github.com/nitin27may/clean-architecture-docker-dotnet-angular.git angular-dotnet |
37 | | -cd angular-dotnet |
38 | | -``` |
| 49 | +- ✅ **Maintainability**: Separate concerns to make your code easier to understand and modify |
| 50 | +- ✅ **Testability**: Independent components that can be tested in isolation |
| 51 | +- ✅ **Flexibility**: Swap frameworks or technologies without rewriting your core business logic |
| 52 | +- ✅ **Scalability**: Grow your application with a clear structure that new team members can quickly understand |
| 53 | + |
| 54 | +## 🚀 Quick Start |
39 | 55 |
|
40 | | -Rename `.env.example` to `.env`: |
41 | 56 | ```bash |
42 | | -cp .env.example .env |
43 | | -``` |
| 57 | +# Clone the repository |
| 58 | +git clone https://github.com/nitin27may/clean-architecture-docker-dotnet-angular.git clean-app |
| 59 | +cd clean-app |
44 | 60 |
|
| 61 | +# Create .env file (required) |
| 62 | +cp .env.example .env |
45 | 63 |
|
46 | | -Run all containers: |
47 | | -```bash |
| 64 | +# Start all services with Docker Compose |
48 | 65 | docker-compose up |
49 | 66 | ``` |
50 | 67 |
|
51 | | -**Note:** The application uses SMTP for email functions. Please update account details in the `.env` file. |
52 | | - |
53 | | -### Default Users |
54 | | - |
55 | | -After startup, the following test users are available: |
56 | | - |
57 | | -| Username | Password | Role | |
58 | | -|----------------------|---------------|---------| |
59 | | -| nitin27may@gmail.com | P@ssword#321 | Admin | |
60 | | -| editor@gmail.com | P@ssword#321 | Editor | |
61 | | -| reader@gmail.com | P@ssword#321 | Reader | |
62 | | - |
63 | | -## Project Overview |
| 68 | +🔗 Then access: |
| 69 | +- Frontend: http://localhost |
| 70 | +- API: http://localhost/api |
| 71 | +- Swagger: http://localhost/swagger |
| 72 | + |
| 73 | +### 👤 Default Users |
| 74 | + |
| 75 | +| Username | Password | Role | |
| 76 | +|----------|----------|------| |
| 77 | +| nitin27may@gmail.com | P@ssword#321 | Admin | |
| 78 | +| editor@gmail.com | P@ssword#321 | Editor | |
| 79 | +| reader@gmail.com | P@ssword#321 | Reader | |
| 80 | + |
| 81 | +## 🔥 Key Features |
| 82 | + |
| 83 | +<table> |
| 84 | + <tr> |
| 85 | + <td width="33%"> |
| 86 | + <h3>📱 Modern Frontend</h3> |
| 87 | + <ul> |
| 88 | + <li>Angular 19 with standalone components</li> |
| 89 | + <li>Signal-based state management</li> |
| 90 | + <li>Material Design + TailwindCSS</li> |
| 91 | + <li>Dark/light theme support</li> |
| 92 | + <li>Responsive mobile-first design</li> |
| 93 | + <li>Role Based Routing and Menu</li> |
| 94 | + </ul> |
| 95 | + </td> |
| 96 | + <td width="33%"> |
| 97 | + <h3>🔒 Secure Backend</h3> |
| 98 | + <ul> |
| 99 | + <li>Clean Architecture implementation</li> |
| 100 | + <li>Generic Repository pattern</li> |
| 101 | + <li>JWT authentication</li> |
| 102 | + <li>Role-based permissions</li> |
| 103 | + <li>User Activity Logging</li> |
| 104 | + <li>Golbal Exception Handling</li> |
| 105 | + <li>PostgreSQL with Dapper</li> |
| 106 | + </ul> |
| 107 | + </td> |
| 108 | + <td width="33%"> |
| 109 | + <h3>🚢 DevOps Ready</h3> |
| 110 | + <ul> |
| 111 | + <li>Docker containerization</li> |
| 112 | + <li>GitHub Actions workflows</li> |
| 113 | + <li>NGINX reverse proxy</li> |
| 114 | + <li>Multi-environment configs</li> |
| 115 | + <li>Database migrations</li> |
| 116 | + </ul> |
| 117 | + </td> |
| 118 | + </tr> |
| 119 | +</table> |
| 120 | + |
| 121 | +## 🧩 Architecture |
64 | 122 |
|
65 | | -<!-- Add dashboard/admin interface screenshot placeholder --> |
66 | | -<!-- <p align="center"> |
67 | | - <img src="docs/dashboard-screenshot.png" alt="Dashboard Screenshot" width="80%"> |
| 123 | +<p align="center"> |
| 124 | + <img src="docs/architecture.png" alt="Container Architecture" width="80%"> |
68 | 125 | <br> |
69 | | - <em>Admin Dashboard with Role-Based Access Control</em> |
70 | | -</p> --> |
71 | | - |
72 | | -This project provides a comprehensive starter template that goes beyond just connecting technologies - it demonstrates how to build a maintainable, production-quality application: |
73 | | - |
74 | | -1. **Complete User Management System** - Registration with email verification, login with JWT, password reset, profile management, and role-based authorization |
75 | | - |
76 | | -2. **Clean Domain-Driven Design** - Business logic isolated from infrastructure concerns, making it easier to adapt to changing requirements |
77 | | - |
78 | | -3. **DevOps Ready** - GitHub Actions workflows, Docker configurations for both development and production, and multi-environment support |
79 | | - |
80 | | -4. **Performance Optimized** - Database query optimization, frontend bundle optimization, and caching strategies implemented |
81 | | - |
82 | | -5. **Enterprise Patterns** - Repository pattern, unit of work, specification pattern, and more to maintain code quality at scale |
83 | | - |
84 | | -6. **Developer Productivity** - Auto-generated API clients, comprehensive test suites, and documentation to help new team members get productive quickly |
85 | | - |
86 | | -### Feature Highlights |
87 | | - |
88 | | -| Feature | Frontend | Backend | |
89 | | -|---------|----------|---------| |
90 | | -| **Authentication** | JWT with auto-refresh, secure storage | Token generation, validation, refresh mechanism | |
91 | | -| **Authorization** | Role-based UI components, route guards | Policy-based endpoints, role verification | |
92 | | -| **User Management** | Profile editing, password management | Secure storage, email verification | |
93 | | -| **Error Handling** | Global error interceptor, user-friendly messages | Exception middleware, structured error responses | |
94 | | -| **Form Management** | Reactive forms with validation | Model validation, error mapping | |
95 | | -| **API Integration** | Strongly-typed HTTP clients | OpenAPI documentation, versioning | |
96 | | -| **State Management** | Signal-based reactive state | Clean separation of concerns | |
97 | | -| **UI Components** | Material Design + TailwindCSS | N/A | |
98 | | -| **Data Access** | N/A | Repository pattern with Dapper | |
99 | | -| **Logging** | Console and error interceptor | Structured logging with Serilog | |
100 | | - |
101 | | -## Architecture |
102 | | - |
103 | | - |
104 | | - |
105 | | -### Container Architecture |
106 | | - |
107 | | - |
108 | | - |
109 | | -## Key Features |
110 | | - |
111 | | -### Frontend (Angular 19) |
112 | | -- Modern dependency injection using `inject()` function |
113 | | -- Signal-based state management |
114 | | -- Angular Material 19 with theme support |
115 | | -- TailwindCSS v4 for utility-first styling |
116 | | -- JWT authentication with auto refresh |
117 | | -- [More details in frontend documentation](./docs/frontend.md) |
118 | | - |
119 | | -### Backend (.NET 9) |
120 | | -- Clean Architecture implementation |
121 | | -- Generic Repository and Service patterns |
122 | | -- Dapper with PostgreSQL for data access |
123 | | -- JWT authentication with role-based permissions |
124 | | -- [More details in backend documentation](./docs/backend.md) |
| 126 | + <em>Container Architecture Overview</em> |
| 127 | +</p> |
125 | 128 |
|
126 | | -## Prerequisites |
| 129 | +## 📚 Documentation |
127 | 130 |
|
128 | | -- [Docker Desktop](https://www.docker.com/products/docker-desktop) (latest version) |
129 | | -- Git |
| 131 | +📖 Comprehensive documentation is available: |
130 | 132 |
|
131 | | -## Learn More |
| 133 | +- [Development Guide](./docs/development-guide.md) - Get started with development |
| 134 | +- [Frontend Documentation](./docs/frontend.md) - Angular architecture details |
| 135 | +- [Backend Documentation](./docs/backend.md) - .NET API implementation |
| 136 | +- [Feature List](./docs/features.md) - Detailed feature breakdown |
| 137 | +- [Clean Architecture Series](./docs/architecture-series.md) - In-depth articles |
| 138 | +- [Roadmap](./docs/roadmap.md) - Upcoming features |
132 | 139 |
|
133 | | -For in-depth understanding, check out our [documentation](./docs/): |
134 | | -- [Clean Architecture Article Series](./docs/architecture-series.md) |
135 | | -- [Detailed Feature List](./docs/features.md) |
136 | | -- [Development Guide](./docs/development-guide.md) |
137 | | -- [Roadmap & Upcoming Features](./docs/roadmap.md) |
138 | 140 |
|
139 | | -## Contributing |
| 141 | +## 🤝 Contributing |
140 | 142 |
|
141 | | -We welcome contributions! See our [contributing guide](./CONTRIBUTING.md) for details. |
| 143 | +We welcome contributions! See our [contributing guide](./CONTRIBUTING.md) for details on how to get involved. |
142 | 144 |
|
143 | | -## License |
| 145 | +## 📄 License |
144 | 146 |
|
145 | | -This project is licensed under the MIT License. See the [LICENSE file](LICENSE) for details. |
| 147 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
146 | 148 |
|
147 | | -## Contact |
| 149 | +## 📧 Contact |
148 | 150 |
|
149 | | -For support or questions, please contact Nitin Singh at nitin27may@gmail.com. |
| 151 | +For questions or support, please contact Nitin Singh at nitin27may@gmail.com. |
150 | 152 |
|
151 | | -## Feature Requests |
| 153 | +## 🌟 Star the Repository |
152 | 154 |
|
153 | | -Have ideas to improve this project? Submit a [feature request](https://github.com/nitin27may/clean-architecture-docker-dotnet-angular/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=). |
| 155 | +If you find this project useful, please consider giving it a star on GitHub to show your support! |
0 commit comments