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
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: @SubochArtem