A production-ready RESTful API for E-commerce platforms built with ASP.NET Core 9. This project implements advanced security patterns, complex business logic, and high-performance data handling.
- Complete Auth Cycle: Register, Login, and Logout.
- Account Security: OTP Verification, Forgot Password, and Reset Password via Email Service.
- Session Management: Implemented JWT Access Tokens with Refresh Token logic for secure and seamless user sessions.
- User Profile: Managed user data updates and secure Change Password functionality.
- Review System: Star rating and commenting system with Verified Purchase logic.
- Smart Cart: Full Cart management (Add, Update, Delete items) synchronized with user accounts.
- Order Orchestration: * Transaction-based ordering system to ensure data consistency.
- Administrative control for updating order statuses.
- Dashboard Stats: Real-time analytics for Admin (Revenue, Orders, and Top Selling Products).
- Product & Category CRUD: Full administrative control over the catalog.
- Data Optimization: Implemented Pagination, Filtering, Search, and Sorting to handle large product lists.
- Image Handling: Integrated gallery image management and file cleanup logic.
- Framework: .NET 9 (Web API)
- Database: SQL Server using Entity Framework Core.
- Mapping: AutoMapper for clean DTO/Entity transformations.
- Reliability: Global Exception Handling Middleware and Fluent Validation.
- Documentation: Fully documented via Swagger UI.
Following Clean Architecture principles:
Controllers: Handles API routing and requests.Services: Contains the core business rules and logic.Models & Dtos: Data structures and transfer objects.Middlewares: Custom logic for errors and security.Helpers: Utility classes for Email and JWT logic. Global exception handling and custom pipelines.
To test the API easily, you can use our Postman Collection:
- Download the JSON file from the
Postmanfolder in this repo. - Import it into Postman.
- Set the
baseUrlvariable to your local running URL. - Run the Login request; the Auth Token will be automatically saved for all subsequent requests.
- Clone the repository.
- Update the connection string in
appsettings.json. - Run
Update-Databasein the Package Manager Console. - Press
F5to run the project and explore the Swagger documentation.



