This project is a microservices-based e-commerce platform that demonstrates the use of various technologies and architectural patterns in a distributed system.
This e-commerce platform is designed to handle product management and shopping cart functionality. It utilizes a microservices architecture to ensure scalability and maintainability.
Key Features:
- Product catalog management
- Shopping cart functionality
- Real-time stock updates
- Asynchronous communication between services
The system consists of the following main components:
- Product Service: Manages product information (MongoDB)
- Basket Service: Handles shopping cart operations (Redis)
- RabbitMQ: Message broker for asynchronous communication
- .NET 8
- MongoDB
- Redis
- RabbitMQ
- Docker
- Swagger
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/yourusername/ecommerce-microservices.git -
Navigate to the project directory:
cd ecommerce-microservices -
Run the following command to start all services:
docker-compose up -d
This command will build and start all the necessary containers for the project.
After starting the services, you can access the Swagger UI for each service:
- Product Service:
http://localhost:5248/swagger - Basket Service:
http://localhost:5265/swagger
-
Product Management:
- Add, update, and delete products
- View product details and inventory
-
Shopping Cart:
- Add products to cart
- Update quantities
- Remove products from cart
- View cart contents
-
Stock Management:
- Real-time stock updates
- Notifications when stock is low (via RabbitMQ)
To develop and extend this project:
- Ensure you have .NET 6 SDK installed
- Open the solution in your preferred IDE (e.g., Visual Studio, Rider)
- Make changes to the services as needed
- Rebuild the Docker images if you make changes:
docker-compose build docker-compose up -d
[Önceki içerik aynı kalacak...]
Here are some screenshots demonstrating the core functionalities of our e-commerce platform:
This screenshot shows the process of adding a new product to our catalog using the Product Service API.
Here, you can see how a user can add an item to their shopping cart using the Basket Service API.
This image demonstrates how the contents of a user's shopping cart are displayed.
This is the RabbitMQ management interface, showing the queues and message rates for our stock depletion events.When a product's stock runs low, our system automatically generates an event using RabbitMQ. This screenshot shows the event being published and consumed.
-
Product Management:
- Administrators can add, update, or remove products using the Product Service API.
- Product information is stored in MongoDB.
-
Shopping Cart Operations:
- Users can add products to their cart, update quantities, or remove items using the Basket Service API.
- Basket data is stored in Redis for fast access and updates.
-
Stock Management:
- When a product is added to a cart, the system checks the available stock.
- If the stock falls below a certain threshold, a "Low Stock" event is published to RabbitMQ.