An ASP.NET Core Web API for managing products, variants, and customer orders. Includes role-based JWT authentication, FluentValidation for input validation, and a clean service architecture.
- Create, update, view, and delete products
- Each product can have multiple variants
- Product Fields:
name,brand,type(enum: Mug, Jug, Cup, etc.) - Variant Fields:
color,specification,size(enum: Small, Medium, Large)
- Create orders in multiple steps:
- Select products
- Select variants and quantity
- Provide customer information
- View, update, and delete orders
- Calculates total quantity automatically
- Register and login using JWT tokens
- Secure endpoints with [Authorize] attributes
- Roles:
Admin,User- Admin can create/update/delete products
- Users can place/view orders
- ASP.NET Core 8 Web API
- Entity Framework Core + MS SQL Server
- ASP.NET Core Identity
- FluentValidation
- JWT Authentication
- Swagger (OpenAPI)
✅ JWT authentication and role-based authorization
✅ SuperAdmin and role seeding
✅ CRUD operations for Products, Variants, Orders
✅ Clean architecture with Dtos, Services, Validators, Controllers
✅ Fluent validations and null-safety
✅ Entity relationships resolved and optimized (e.g., no cascade cycles)
✅ DTO mappings for better API responses
✅ Clean Program.cs with extracted seeding logic