ZKCleanAuth.Template
1.0.0
The previous Version has a flaw it does not authenticate he routes. The newer version has this feature and the routes must include [Authorize] decorator
See the version list below for details.
dotnet add package ZKCleanAuth.Template --version 1.0.0
NuGet\Install-Package ZKCleanAuth.Template -Version 1.0.0
<PackageReference Include="ZKCleanAuth.Template" Version="1.0.0" />
<PackageVersion Include="ZKCleanAuth.Template" Version="1.0.0" />
<PackageReference Include="ZKCleanAuth.Template" />
paket add ZKCleanAuth.Template --version 1.0.0
#r "nuget: ZKCleanAuth.Template, 1.0.0"
#:package ZKCleanAuth.Template@1.0.0
#addin nuget:?package=ZKCleanAuth.Template&version=1.0.0
#tool nuget:?package=ZKCleanAuth.Template&version=1.0.0
ZKCleanAuthTemplate
๐ฏ ZKCleanAuthTemplate is a production-ready, plug-and-play Clean Architecture template for ASP.NET Core with fully integrated JWT Authentication, Role-based Authorization, MediatR, FluentValidation, AutoMapper, and more.
Created by Zohaib Khan, this template accelerates your project kickoff by eliminating repetitive setup and promoting industry-standard architectural practices.
๐ Features
- โ Clean Architecture (Domain, Application, Infrastructure, WebAPI)
- ๐ JWT Authentication (Login/Register with Role Claims)
- ๐ฅ Role-based Authorization (Admin/User separation)
- ๐งฑ MediatR-based CQRS
- ๐งน FluentValidation integration
- ๐ AutoMapper profile setup
- ๐ฆ Configurable with
dotnet new
command - ๐งช Ready for unit/integration testing structure
- ๐ Global Exception Handling
๐ฆ Getting Started
Prerequisites
- .NET 7 or 8 SDK
nuget.exe
(for local development or template publishing)
๐ ๏ธ How to Use
1. Install the Template (from NuGet)
dotnet new install ZKCleanAuthTemplate::1.0.0
###Create a New Project
bash
dotnet new zkauth-n MyAuthProject
Your new project will be scaffolded with Clean Architecture and ready-to-run authentication APIs.
๐๏ธ Project Structure
๐ MyAuthProject/
โโโ ๐ Domain
โโโ ๐ Application
โโโ ๐ Infrastructure
โโโ ๐ WebAPI
All layers are properly separated and follow SOLID principles.
๐ง Customization Guide
You can extend this template to add:
Email confirmation
Refresh Tokens
Social Login
Multi-tenant Support
Swagger Authentication (already wired up partially)
๐ค Contributions & Feedback
I built this for developers who want to skip boilerplate and focus on logic.
If you like it, feel free to:
โญ Star this template
๐ Submit issues or improvements
๐ Fork and extend
๐ License
MIT License
Built with โค๏ธ by Zohaib Khan โ for learners, professionals, and companies who want clean, maintainable solutions from day one.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.