Clean Architecture Full-Stack Starter

A production-ready full-stack application with Angular 19, .NET 9, and PostgreSQL using Clean Architecture principles

Get Started View on GitHub Feature List


Application Demo

A modern, full-stack contact management system built with Angular 19, .NET 9, and PostgreSQL following Clean Architecture principles. This project demonstrates how to structure enterprise applications for maintainability, testability, and scalability while providing a complete development workflow with Docker containerization.

🌟 What You’ll Learn

  • Clean Architecture principles and implementation
  • Angular 19 with signals, standalone components, and Material Design
  • .NET 9 with dependency injection and repository pattern
  • PostgreSQL with Dapper for efficient data access
  • JWT Authentication with role-based permissions
  • Docker containerization for development and production
  • NGINX as a reverse proxy and API gateway
  • CI/CD with GitHub Actions

πŸš€ Quick Start in 60 Seconds

Prerequisites

Launch Commands

Clone the repository:

git clone https://github.com/nitin27may/clean-architecture-docker-dotnet-angular.git clean-app
cd clean-app

Create environment file:

cp .env.example .env

Start the application:

docker-compose up

That’s it! Visit http://localhost in your browser.

πŸ‘€ Default Users

Username Password Role
nitin27may@gmail.com P@ssword#321 Admin
editor@gmail.com P@ssword#321 Editor
reader@gmail.com P@ssword#321 Reader

πŸ—οΈ System Architecture

Architecture Diagram

Container Architecture

The application is structured into multiple containers that work together:

  • Frontend Container: Angular 19 with Material Design and TailwindCSS
  • API Container: .NET 9 RESTful API built with Clean Architecture
  • Database Container: PostgreSQL for data persistence
  • NGINX Container: Reverse proxy that routes requests to the appropriate service

πŸ“ Clean Architecture Explained

Clean Architecture Diagram

Why Choose Clean Architecture?

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

Core Principles

  • Separation of concerns: Each layer has a specific responsibility
  • Dependency rule: Dependencies point inward, with inner circles having no knowledge of outer circles
  • Abstraction: Business rules are independent of UI, database, and external services
  • Testability: Core business logic can be tested without dependencies on external systems

πŸ’» Key Features

Modern Angular Frontend

  • Signals-based state management
  • Material Design with TailwindCSS for responsive UI
  • Role-based routing and permissions
  • Dark/light theme support

Secure .NET Backend

  • Clean Architecture implementation
  • Generic Repository pattern
  • JWT authentication
  • Global exception handling

Contact Management

  • CRUD operations for contacts
  • Role-based access control
  • Search, sort, and filter functionality
  • Form validation

πŸ“š Documentation

For more detailed information, explore these documentation pages:

🀝 Contributing

We welcome contributions! Please check our contributing guide for details on how to get involved.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.