A scalable and production-ready E-Commerce REST API built with ASP.NET Core following Clean Architecture principles. This project demonstrates modern backend development practices including authentication, modular design, and maintainable code structure.
-
🧠 AI Chatbot Integration Smart assistant for product search and customer support.
-
🏗️ Clean Architecture Structured into Domain, Application, Infrastructure, and API layers.
-
📁 Repository Pattern Decoupled data access layer for better testability and maintainability.
-
🔐 JWT Authentication & Authorization Secure login system with role-based access control (Admin/User).
-
🗄️ Entity Framework Core Code-first approach with SQL Server.
-
📦 Core E-Commerce Modules
- Product Management
- Order Management
- Shopping Cart System
-
✅ FluentValidation Robust request validation for API endpoints.
This project follows Clean Architecture, ensuring separation of concerns:
├── Domain # Entities, Enums, Core Logic
├── Application # Business Logic, Interfaces
├── Infrastructure # Database, Repositories, External Services
├── API # Controllers, Middleware, Endpoints
- ASP.NET Core Web API
- Entity Framework Core
- SQL Server
- JWT Authentication
- FluentValidation
- AutoMapper
- User registers or logs in
- API generates JWT Token
- Token is used for authorized requests
- Role-based access (Admin/User)
- Register
- Login
- Role Management
- Create / Update / Delete
- Get All Products
- Product Details
- Add to Cart
- Remove from Cart
- View Cart
- Place Order
- Order History
- Clone the repository:
git clone https://github.com/your-username/ecommerce-api.git- Navigate to project:
cd ecommerce-api-
Update
appsettings.jsonwith your SQL Server connection string -
Run database migrations:
dotnet ef database update- Run the project:
dotnet run- Clean structure supports easy unit testing
- Repository pattern allows mocking dependencies
- Payment Gateway Integration (Stripe / PayPal)
- Caching (Redis)
- Docker Support
- API Rate Limiting
- Advanced AI Recommendations
Muhammad Ahmad 📍 Pakistan 💻 .NET Developer
If you like this project, please ⭐ the repository!