https://github.com/clifftech123/aspirecleanarch.net10
Enterprise-grade e-commerce platform built with .NET 10, Aspire, Clean Architecture, CQRS, DDD, gRPC, RabbitMQ, and EF Core. Features vendor management, order processing, payment integration, and real-time event-driven architecture.
https://github.com/clifftech123/aspirecleanarch.net10
clean-architecture cqrs ddd domain-driven-design dotnet dotnet-aspire ecommerce entity-framework-core grpc jwt-authentication masstransit payment-gateway rabbitmq redis
Last synced: about 1 month ago
JSON representation
Enterprise-grade e-commerce platform built with .NET 10, Aspire, Clean Architecture, CQRS, DDD, gRPC, RabbitMQ, and EF Core. Features vendor management, order processing, payment integration, and real-time event-driven architecture.
- Host: GitHub
- URL: https://github.com/clifftech123/aspirecleanarch.net10
- Owner: Clifftech123
- License: mit
- Created: 2025-11-23T09:31:19.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-11-23T10:09:16.000Z (7 months ago)
- Last Synced: 2025-11-23T12:09:12.172Z (7 months ago)
- Topics: clean-architecture, cqrs, ddd, domain-driven-design, dotnet, dotnet-aspire, ecommerce, entity-framework-core, grpc, jwt-authentication, masstransit, payment-gateway, rabbitmq, redis
- Language: C#
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE.txt
Awesome Lists containing this project
README
๏ปฟ
[](https://dotnet.microsoft.com/)
[](https://learn.microsoft.com/en-us/dotnet/aspire/)
[](LICENSE)
[]()
> **Enterprise-grade e-commerce platform** built with modern .NET technologies, Clean Architecture, CQRS, Domain-Driven Design, gRPC, and Event-Driven Architecture.

---
## โจ Features
### **Multi-Vendor Marketplace**
- Vendor registration and approval workflow
- Product catalog management
- Real-time inventory tracking
- Commission-based revenue model
- Vendor analytics dashboard
### **Order Management**
- Shopping cart with real-time stock validation
- Multi-vendor order support
- Order lifecycle tracking (Pending โ Delivered)
- Cancellation and refund workflows
- Order history and tracking
### **Payment Processing**
- Multiple payment methods (Credit Card, PayPal, Wallet)
- Stripe and PayPal integration
- Secure payment processing
- Automated refund handling
- Payment history and receipts
### **User Management**
- ASP.NET Core Identity integration
- JWT-based authentication
- Role-based authorization (Customer, Vendor, Admin)
- User profiles and address management
- Email verification
### **Admin Dashboard**
- System-wide metrics and analytics
- Vendor approval and management
- Order oversight
- Revenue tracking
- Real-time monitoring
---
## Architecture
### **Communication Patterns**
- **REST API** - External client communication
- **gRPC** - Internal service-to-service synchronous calls
- **RabbitMQ** - Asynchronous event-driven messaging
- **Redis** - Distributed caching
---
## Technology Stack
### **Backend**
- **.NET 10** - Latest .NET framework
- **ASP.NET Core** - Web API framework
- **Entity Framework Core 10** - ORM
- **MediatR** - CQRS implementation
- **FluentValidation** - Input validation
- **AutoMapper** - Object mapping
### **Messaging & Communication**
- **RabbitMQ** - Message broker
- **MassTransit** - Distributed application framework
- **gRPC** - High-performance RPC framework
- **SignalR** - Real-time communication
### **Data & Caching**
- **SQL Server** - Primary database
- **Redis** - Distributed cache
### **Authentication & Security**
- **ASP.NET Core Identity** - User management
- **JWT Bearer** - Token-based authentication
- **BCrypt** - Password hashing
### **External Integrations**
- **Stripe** - Payment processing
- **PayPal** - Alternative payment method
- **SendGrid** - Email notifications
### **DevOps & Monitoring**
- **.NET Aspire** - Cloud-native orchestration
- **Docker** - Containerization
- **OpenTelemetry** - Distributed tracing
- **Serilog** - Structured logging
- **Health Checks** - Service health monitoring
### **Testing**
- **xUnit** - Unit testing framework
- **FluentAssertions** - Assertion library
- **Moq/NSubstitute** - Mocking framework
- **Testcontainers** - Integration testing
---
## ๐ Project Structure
```
AspireCleanArch.NetI0/
โโโ src/
โ โโโ AspireCleanArch.Shared/ # Shared DTOs, Events, Protos
โ โโโ AspireCleanArch.Domain/ # Domain entities & business logic
โ โโโ AspireCleanArch.Application/ # CQRS, Use cases
โ โโโ AspireCleanArch.Infrastructure/ # EF Core, RabbitMQ, gRPC clients
โ โโโ AspireCleanArch.Api/ # REST API & gRPC servers
โ โโโ AspireCleanArch.AppHost/ # Aspire orchestration
โ
โโโ tests/
โ โโโ Domain.Tests/ # Domain unit tests
โ โโโ Application.Tests/ # Application tests
โ โโโ Api.Tests/ # Integration tests
โ
โโโ docs/ # Documentation
โโโ Directory.Packages.props # Centralized package management
โโโ Directory.Build.props # Common build properties
```
---
## Getting Started
### **Prerequisites**
- [.NET 10 SDK](https://dotnet.microsoft.com/download)
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
- [Visual Studio 2022](https://visualstudio.microsoft.com/) or [VS Code](https://code.visualstudio.com/)
- [SQL Server](https://www.microsoft.com/sql-server) (or use Docker)
- [RabbitMQ](https://www.rabbitmq.com/) (or use Docker)
### **Installation**
1. **Clone the repository**
```bash
git clone https://github.com/Clifftech123/AspireCleanArch.Net10.git
```
### **Using Docker Compose**
```bash
docker-compose up -d
```
---
## ๐งช Running Tests
```bash
# Run all tests
dotnet test
# Run with coverage
dotnet test --collect:"XPlat Code Coverage"
# Run specific test project
dotnet test tests/AspireCleanArch.Domain.Tests
```
## Key Design Patterns
- **Clean Architecture** - Clear separation of concerns
- **CQRS** - Command Query Responsibility Segregation
- **Domain-Driven Design** - Rich domain models
- **Repository Pattern** - Data access abstraction
- **Unit of Work** - Transaction management
- **Result Pattern** - Functional error handling
- **Outbox Pattern** - Reliable event publishing
- **Gateway Pattern** - External service abstraction
---
## Domain Model
### **Core Entities**
- **Vendor** - Marketplace sellers
- **Product** - Product catalog
- **Order** - Customer orders
- **OrderItem** - Order line items
- **Payment** - Payment transactions
- **User** - System users
### **Entity Relationships**
```
Vendor (1) โโโบ (N) Product
User (1) โโโบ (N) Order
Order (1) โโโบ (N) OrderItem
Order (1) โโโบ (1) Payment
OrderItem (N) โโโบ (1) Product
OrderItem (N) โโโบ (1) Vendor
```
---
## Event Flow
### **Order Creation Flow**
```
1. User creates order (REST API)
2. Order Service validates products (gRPC โ Vendor Service)
3. Order Service reserves stock (gRPC โ Vendor Service)
4. Order Service creates order (saves to database)
5. Order Service publishes OrderPlacedEvent (RabbitMQ)
6. Payment Service consumes event โ processes payment
7. Payment Service publishes PaymentSucceededEvent (RabbitMQ)
8. Order Service consumes event โ confirms order
```