A modern e-commerce platform built with microservices architecture, featuring user management and product catalog services with React frontend.
- Overview
- Architecture
- Features
- Tech Stack
- Project Structure
- Getting Started
- API Documentation
- Screenshots
- Testing
- Contributing
InnoShop is a microservices-based e-commerce platform that demonstrates modern software architecture principles. The system consists of two independent microservices communicating via REST APIs and RabbitMQ message broker, with a responsive React frontend.
✅ Clean Architecture - Follows Onion/Clean Architecture principles with clear separation of concerns
✅ Microservices - Independent, scalable services for Users and Products
✅ Event-Driven - RabbitMQ integration for asynchronous inter-service communication
✅ Comprehensive Testing - Unit and integration tests with high coverage
✅ Docker Ready - Complete containerization with docker-compose
✅ Modern Frontend - React SPA with Tailwind CSS
✅ Security First - JWT authentication, email confirmation, password recovery
The application follows a microservices architecture with the following components:
┌─────────────────────────────────────────────────────────────┐
│ React Frontend │
│ (innoshop-frontend) │
└─────────────────────────────────────────────────────────────┘
│
┌────────────────┴────────────────┐
│ │
┌─────────▼──────────┐ ┌─────────▼──────────┐
│ Users Service │ │ Products Service │
│ (Port 5001) │◄──────────►│ (Port 5002) │
│ │ RabbitMQ │ │
│ - Authentication │ │ - Product CRUD │
│ - User Management │ │ - Search/Filter │
│ - Email Service │ │ - User Validation │
│ - JWT Tokens │ │ │
└────────────────────┘ └────────────────────┘
│ │
▼ ▼
┌──────────┐ ┌──────────┐
│ SQLite │ │ SQLite │
│ Database │ │ Database │
└──────────┘ └──────────┘
Each microservice follows the Clean Architecture pattern:
- Domain Layer - Entities, enums, exceptions, value objects
- Application Layer - DTOs, interfaces, services, validators, events
- Infrastructure Layer - Repositories, database context, external services
- API Layer - Controllers, middleware, configuration
-
🔐 Authentication & Authorization
- JWT-based token authentication
- Role-based access control (User, Admin)
- Refresh token mechanism
-
📧 Email Features
- Email confirmation on registration
- Password recovery via email
- Mailtrap integration for email delivery
-
👥 User Operations
- CRUD operations for user profiles
- User activation/deactivation (Admin only)
- Role management
-
🔔 Event Publishing
- Publishes user lifecycle events (activated, deactivated, deleted)
- RabbitMQ integration for event-driven architecture
-
📦 Product CRUD
- Create, read, update, delete products
- Owner-based authorization (users can only modify their own products)
-
🔍 Advanced Search & Filtering
- Search by name and description
- Filter by price range
- Filter by availability
- Pagination support
-
🎯 Event Consumption
- Listens to user events from Users Service
- Automatic product soft-delete on user deactivation
- Product restoration on user activation
-
🎨 Modern UI/UX
- Responsive design with Tailwind CSS
- Clean and intuitive interface
-
🔑 Authentication Pages
- Login and registration
- Email confirmation
- Password recovery and reset
-
🛍 Product Management
- Product listing with filters
- My Products page
- Add/Edit/Delete products
-
👑 Admin Panel
- User management dashboard
- Activate/deactivate users
- Role management
- Framework: ASP.NET Core 8.0
- Architecture: Clean Architecture (Onion)
- ORM: Entity Framework Core 9.0
- Database: SQLite (easily swappable to PostgreSQL/SQL Server)
- Validation: FluentValidation
- Messaging: RabbitMQ
- Authentication: JWT Bearer Tokens
- Mapping: AutoMapper
- Email: Mailtrap
- Testing: xUnit, Moq, FluentAssertions
- Framework: React 18.x
- Styling: Tailwind CSS
- HTTP Client: Axios
- Routing: React Router DOM
- Icons: Lucide React
- Containerization: Docker & Docker Compose
- Web Server: Nginx (for frontend)
- Message Broker: RabbitMQ
InnoShop/
├── docker-compose.yml # Main orchestration file
├── innoshop-frontend/ # React frontend
│ ├── src/
│ │ ├── api/ # API integration
│ │ ├── components/ # React components
│ │ ├── context/ # Context providers
│ │ ├── hooks/ # Custom hooks
│ │ ├── pages/ # Page components
│ │ └── utils/ # Utilities
│ └── Dockerfile
└── src/
├── InnoShop.Users/ # Users microservice
│ ├── InnoShop.Users.API/ # API layer
│ ├── InnoShop.Users.Application/ # Application layer
│ ├── InnoShop.Users.Domain/ # Domain layer
│ ├── InnoShop.Users.Infrastructure/ # Infrastructure layer
│ └── InnoShop.Users.Tests/ # Test project
└── InnoShop.Products/ # Products microservice
├── InnoShop.Products.API/
├── InnoShop.Products.Application/
├── InnoShop.Products.Domain/
├── InnoShop.Products.Infrastructure/
└── InnoShop.Products.Tests/
- Docker & Docker Compose
- .NET 8.0 SDK (for local development)
- Node.js 18+ (for local frontend development)
- Clone the repository
git clone https://github.com/OlegZubrr/InnoShop.git
cd InnoShop- Run with Docker Compose
docker-compose up -d- Access the application
- Frontend: http://localhost:3000
- Users API: http://localhost:5001
- Products API: http://localhost:5002
- RabbitMQ Management: http://localhost:15672 (guest/guest)
- Users Service
cd src/InnoShop.Users/InnoShop.Users.API
dotnet restore
dotnet run- Products Service
cd src/InnoShop.Products/InnoShop.Products.API
dotnet restore
dotnet runcd innoshop-frontend
npm install
npm start{
"JwtSettings": {
"Secret": "your-secret-key-here",
"ExpiryMinutes": 60
},
"EmailSettings": {
"Host": "sandbox.smtp.mailtrap.io",
"Port": 2525,
"Username": "your-username",
"Password": "your-password"
}
}{
"JwtSettings": {
"Secret": "same-secret-as-users-service"
}
}POST /api/auth/register- Register new userPOST /api/auth/login- User loginPOST /api/auth/confirm-email- Confirm email addressPOST /api/auth/forgot-password- Request password resetPOST /api/auth/reset-password- Reset password
GET /api/users- Get all users (Admin only)GET /api/users/{id}- Get user by IDPUT /api/users/{id}- Update userDELETE /api/users/{id}- Delete userPUT /api/users/{id}/role- Update user role (Admin only)PUT /api/users/{id}/activate- Activate user (Admin only)PUT /api/users/{id}/deactivate- Deactivate user (Admin only)
GET /api/products- Get all products (with filtering)GET /api/products/{id}- Get product by IDPOST /api/products- Create product (authenticated)PUT /api/products/{id}- Update product (owner only)DELETE /api/products/{id}- Delete product (owner only)
Query Parameters for GET /api/products:
searchTerm- Search in name/descriptionminPrice- Minimum price filtermaxPrice- Maximum price filterisAvailable- Availability filterpageNumber- Page number (default: 1)pageSize- Items per page (default: 10)
Public product catalog with search and filtering capabilities
User registration form with validation
Email confirmation system (Mailtrap integration)
Secure login with JWT authentication
User's product management dashboard
Product creation form with validation
User's products with edit and delete options
Advanced product search and filtering
Admin dashboard for user management
# Users Service Tests
cd src/InnoShop.Users/InnoShop.Users.Tests
dotnet test
# Products Service Tests
cd src/InnoShop.Products/InnoShop.Products.Tests
dotnet testdotnet test- Unit Tests: Service layer business logic
- Integration Tests: API endpoints with in-memory database
- Mocking: Email service and message bus for isolated testing
This project is licensed under the MIT License.
Oleg Zubr
- GitHub: @OlegZubrr