π Base URL: https://user-management-api-dsp6.onrender.com
π Swagger UI: https://user-management-api-dsp6.onrender.com/swagger
A production-ready ASP.NET Core Web API for managing users, roles, authentication, and permissions using Clean Architecture and JWT-based security.
This project is a multi-tenant User Management System designed with industry best practices:
- π Secure authentication using JWT
- π‘οΈ Role-based and permission-based authorization
- ποΈ Clean Architecture (Domain, Application, Infrastructure, API)
- πΎ Entity Framework Core with SQL Server
- β»οΈ Soft Delete with Audit Logging
- β‘ Rate Limiting + Global Exception Handling
- π Swagger API documentation
- JWT Access Token & Refresh Token
- Secure password hashing
- Token validation with custom claims
- Create, update, delete users
- Multi-tenant support
- Pagination support
- Role-based access (Admin, User)
- Permission-based policies
- Custom authorization handlers
- Users are not deleted permanently
IsDeleted,DeletedAt,DeletedBy- Global query filters (auto exclude deleted data)
- Rate limiting (API protection)
- Global exception middleware
- Logging with Serilog
- Health check endpoint
This project follows Clean Architecture with clear separation of concerns:
User Management System
β
βββ π¦ UserManagement.Api
β βββ Controllers, Middleware, Swagger
β
βββ π© UserManagement.Application
β βββ Business Logic (CQRS, MediatR, Validators)
β
βββ π¨ UserManagement.Domain
β βββ Entities, Enums, Interfaces
β
βββ π₯ UserManagement.Infrastructure
βββ EF Core, Repositories, Security, PersistenceClient β API β Application β Domain β Infrastructure β Database
graph TD
A[Client] --> B[API Layer]
B --> C[Application Layer]
C --> D[Domain Layer]
C --> E[Infrastructure Layer]
E --> F[(Database)]
- Backend: ASP.NET Core Web API (.NET 8)
- Database: SQL Server
- ORM: Entity Framework Core
- Authentication: JWT
- Architecture: Clean Architecture + CQRS
- MediatR
- FluentValidation
- Serilog
- ASP.NET Rate Limiting
git clone https://github.com/rushikesh-jagdale/user-management-api.git{
"ConnectionStrings": {
"DefaultConnection": "your-sql-server-connection"
}
}dotnet ef database updatedotnet runhttp://localhost:xxxx/swagger
- Email: admin@gmail.com
- Password: Admin@123
POST /api/auth/registerPOST /api/auth/loginPOST /api/auth/refreshPOST /api/auth/logout
GET /api/usersGET /api/users/{id}POST /api/usersPUT /api/users/{id}DELETE /api/users/{id}(Soft Delete)
| Swagger UI | Login API |
![]() |
![]() |
| Users API | Database |
![]() |
![]() |
βοΈ Implemented Clean Architecture + CQRS pattern
βοΈ Designed multi-tenant system with tenant isolation
βοΈ Built JWT Authentication with Refresh Token mechanism
βοΈ Implemented role-based & permission-based authorization
βοΈ Created custom authorization policies & handlers
βοΈ Added soft delete with global query filters (EF Core)
βοΈ Integrated rate limiting for API protection
βοΈ Implemented global exception handling middleware
βοΈ Added structured logging using Serilog
βοΈ Built production-ready scalable backend structure
- Add Audit Log Table (history tracking)
- Add Restore (Undo delete)
- Docker support
- CI/CD pipeline
- Deployment on Azure / AWS
Rushikesh Jagdale
Give it a β on GitHub!



