E-Commerce Platform
Clean Architecture at scale — extensible, production-ready, AI-recommended.
At a Glance
The Problem
Standard e-commerce implementations result in tightly coupled controllers that become unmaintainable as features grow. Adding a new payment provider typically requires changes across 15+ files. This project demonstrated that Clean Architecture keeps e-commerce codebases extensible — adding a payment provider requires changing only one infrastructure class.
The Solution
A four-layer Clean Architecture where all business rules live in framework-agnostic C# classes. Redis caches product listings at the infrastructure boundary, keeping the Application layer unaware of any caching strategy. A collaborative-filtering recommendation engine analyses purchase history to surface personalised suggestions without a third-party ML service.
Architecture
- →Presentation Layer: ASP.NET Core MVC controllers and Razor Views.
- →Application Layer: Service interfaces, DTOs, and all business logic.
- →Domain Layer: Entities, business rules, and repository interfaces.
- →Infrastructure Layer: EF Core, SQL Server, Redis caching, payment providers — all swappable behind interfaces.
Key Features
- ✓Complete shopping cart with real-time AJAX updates and instant badge counter
- ✓AI-powered product recommendation via collaborative filtering — no third-party ML service
- ✓Secure payment integration with multiple providers, swappable via one infrastructure class
- ✓Role-based authorization — Customer and Admin with separate interfaces
- ✓Product management with categories, inventory tracking, and low-stock alerts
- ✓Order tracking and management with full status history
- ✓Advanced product search and filtering across categories and brands
- ✓Product reviews and ratings with verified-purchase enforcement
- ✓Admin analytics dashboard with sales reports and Chart.js visualizations
- ✓Two-factor authentication via email OTP
Screenshots
Code Highlight
Challenges & Solutions
🎯 Real-time cart updates without page refresh
Used AJAX with vanilla JavaScript to handle cart operations asynchronously, providing instant UI feedback and updating the cart counter badge without a full page reload.
🎯 Building a recommendation engine without ML dependencies
Implemented collaborative filtering in pure C# that analyses user purchase patterns and product category overlap to generate personalised recommendations — no ML.NET, no external service.
🎯 Inventory race conditions with concurrent orders
Used EF Core optimistic concurrency (RowVersion) wrapped in a database transaction — if two users buy the last item simultaneously, only one succeeds and the other receives a clear, actionable error message.
Tech Stack
What I Learned
- 💡Clean Architecture adds upfront complexity but pays dividends — adding Redis caching required zero changes to the Application layer.
- 💡Collaborative filtering suffers from a cold-start problem for new users. A hybrid with content-based filtering as fallback is the correct production solution.
- 💡Optimistic concurrency is non-negotiable for inventory systems — discovered a race condition during load testing that could have silently oversold stock.
Links
Interested in a similar solution?
Let's discuss how I can build something like this for your business.






