https://github.com/faiz-mohamed/shoeecommerce-cleanarchitecture-api
A production-grade Shoe E-Commerce API built with .NET 8, following Clean Architecture principles. Features include CQRS, Domain-Driven Design (DDD), secure Identity (JWT), and Razorpay integration
https://github.com/faiz-mohamed/shoeecommerce-cleanarchitecture-api
clean-architecture cqrs csharp ddd dotnet-core ef-core razorpay sql-server web-api
Last synced: 5 months ago
JSON representation
A production-grade Shoe E-Commerce API built with .NET 8, following Clean Architecture principles. Features include CQRS, Domain-Driven Design (DDD), secure Identity (JWT), and Razorpay integration
- Host: GitHub
- URL: https://github.com/faiz-mohamed/shoeecommerce-cleanarchitecture-api
- Owner: Faiz-mohamed
- Created: 2026-01-01T05:03:44.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-01T05:14:13.000Z (6 months ago)
- Last Synced: 2026-01-05T23:27:21.562Z (5 months ago)
- Topics: clean-architecture, cqrs, csharp, ddd, dotnet-core, ef-core, razorpay, sql-server, web-api
- Language: C#
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 👞 Shoe Ecommerce API (Clean Architecture)
A production-grade RESTful API for a shoe e-commerce platform, built with .NET 8 and following the principles of Clean Architecture. This project demonstrates advanced backend patterns including CQRS, Domain-Driven Design (DDD), and secure payment integration.
## 🚀 Key Features
### 🏗 Architecture & Design
* **Clean Architecture:** Strict separation of concerns (Domain, Application, Infrastructure, API).
* **CQRS Pattern:** Command Query Responsibility Segregation using custom Handlers.
* **Domain-Driven Design:** Rich domain entities with encapsulated logic.
* **Repository Pattern:** Abstraction over Entity Framework Core.
* **Dependency Injection:** Heavy use of .NET Core's DI container.
### 🛒 E-Commerce Modules
* **Product Catalog:** Supports complex variants (Size, Color, Price), Categories, and Brands.
* **Smart Cart:** Persistent shopping cart with stock validation.
* **Wishlist:** "Toggle" logic for adding/removing favorites.
* **Order Management:** Atomic transactions for order creation and inventory deduction.
* **Payment Gateway:** Full integration with **Razorpay** (Order Creation, Signature Verification, Webhooks).
### 🛡 Security & Identity
* **JWT Authentication:** Secure access/refresh token flow.
* **RBAC:** Role-Based Access Control (Admin vs. Customer).
* **Admin Panel:** User management, blocking mechanisms, and catalog control.
* **Validation:** Robust input validation using **FluentValidation**.
## 🛠 Tech Stack
* **Framework:** .NET 8 / ASP.NET Core Web API
* **Database:** Microsoft SQL Server
* **ORM:** Entity Framework Core (Code-First)
* **Documentation:** Swagger / OpenAPI
* **Validation:** FluentValidation
* **Payments:** Razorpay SDK
## ⚙️ Setup & Installation
1. **Clone the repository**
```bash
git clone [https://github.com/Faiz-mohamed/ShoeEcommerce-CleanArchitecture-API.git](https://github.com/Faiz-mohamed/ShoeEcommerce-CleanArchitecture-API.git)
```
2. **Configure AppSettings**
* Rename `appsettings.json` and update the placeholders with your SQL Server credentials and Razorpay Keys.
3. **Database Migration**
```bash
Update-Database
```
*The app includes a `DbInitializer` that will automatically seed dummy products, brands, and categories on first run.*
4. **Run the API**
```bash
dotnet run
```
Access Swagger documentation at `https://localhost:YOUR_PORT/swagger`.
## 📂 Project Structure
```text
src/
├── ShoeEcommerce.API # Entry point, Controllers, Middlewares
├── ShoeEcommerce.Application # Business Logic, CQRS Handlers, Validators, DTOs
├── ShoeEcommerce.Domain # Entities, Enums, Common Interfaces
└── ShoeEcommerce.Infrastructure # EF Core, Migrations, External Services (Razorpay)
```
🤝 Contributing
This is a learning project intended to showcase backend architecture skills. Suggestions are welcome!