A scalable e-commerce platform, and mono-repo microservices example, build using Go and Kratos framework.
This project implements a distributed e-commerce system with the following microservices:
- Shop Interface Service - Main API gateway and user interface layer
- User Service - User management, authentication, and profiles
- Product Service - Product catalog and inventory management
- Order Service - Order processing and management
- Payment Service - Payment processing and transactions
ecommerce-microservices/
βββ api/ # Protocol buffer definitions
β βββ user/service/v1/ # User service API
β βββ ...
βββ app/
β βββ shop/interface/ # Shop interface service
β β βββ internal/
β β β βββ biz/ # Business logic layer
β β β βββ data/ # Data access layer
β β β βββ service/ # Service layer
β βββ user/ # User microservice
β βββ ...
βββ configs/ # Configuration files
- Go 1.19 or higher
- Protocol Buffers compiler
- Docker (for containerized deployment)
-
Clone the repository
git clone https://github.com/danielmoisa/ecommerce-microservices.git cd ecommerce-microservices -
Install dependencies
go mod download
-
Dependencies
docker-compose up -d
-
Generate Protocol Buffer files
make api
-
Run the services
# Start User Service
cd app/user
go run main.go
# Start Shop Interface Service
cd app/shop/interface
go run main.goAPI documentation is available at:
- Swagger UI:
http://localhost:8000/q/swagger-ui/
This project is licensed under the MIT License - see the LICENSE file for details.
