Skip to content

Latest commit

Β 

History

History
90 lines (64 loc) Β· 2.12 KB

File metadata and controls

90 lines (64 loc) Β· 2.12 KB

E-commerce Microservices

A scalable e-commerce platform, and mono-repo microservices example, build using Go and Kratos framework.

πŸ—οΈ Architecture Overview

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

πŸ“ Project Structure

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

🚦 Getting Started

Prerequisites

  • Go 1.19 or higher
  • Protocol Buffers compiler
  • Docker (for containerized deployment)

Installation

  1. Clone the repository

    git clone https://github.com/danielmoisa/ecommerce-microservices.git
    cd ecommerce-microservices
  2. Install dependencies

    go mod download
  3. Dependencies

    docker-compose up -d
  4. Generate Protocol Buffer files

    make api
  5. Run the services

# Start User Service
cd app/user
go run main.go

# Start Shop Interface Service
cd app/shop/interface
go run main.go

Architecture

Description

πŸ“‹ API Documentation

API documentation is available at:

  • Swagger UI: http://localhost:8000/q/swagger-ui/

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.