A scalable e-commerce platform built with microservices architecture on Google Cloud Platform (GCP). This project demonstrates modern cloud-native development practices with automated CI/CD, container orchestration, and multi-database support.
π Public API Endpoint: http://34.143.235.74
π± Quick Test:
curl http://34.143.235.74/health
curl http://34.143.235.74/productsStatus: π’ DEPLOYED & RUNNING on Google Kubernetes Engine (GKE)
- Features
- Architecture
- Technology Stack
- Quick Start
- API Documentation
- Development
- Contributing
- License
- Authors
- Microservices Architecture: Independently deployable services
- Multi-Database Support: PostgreSQL for relational data, Firestore for NoSQL
- Automated CI/CD: GitHub Actions with comprehensive testing
- Container Orchestration: Kubernetes with auto-scaling and self-healing
- API Gateway: Centralized API management
- Monitoring & Logging: Cloud-native observability
- Security: JWT authentication and secure communication
| Service | Technology | Database | Description |
|---|---|---|---|
| Users Service | Node.js/Express | PostgreSQL | User management, authentication |
| Products Service | Node.js/Express | PostgreSQL | Product catalog, inventory |
| Orders Service | Node.js/Express | Firestore | Shopping cart, order processing |
- Node.js 18+ with Express.js
- Docker for containerization
- Kubernetes (GKE) for orchestration
- Cloud SQL (PostgreSQL) for relational data
- Firestore for document-based data
- Google Cloud Platform
- GKE (Kubernetes Engine)
- Cloud SQL
- Firestore
- Cloud Build
- Artifact Registry
- Cloud Monitoring
- GitHub Actions for automation
- kubectl for cluster management
- Docker Compose for local development
- Google Cloud SDK (
gcloudCLI) - Docker Desktop
kubectlconfigured for GKE- Node.js 18+
- Git
git clone https://github.com/EurusDFIR/ecommerce_Microservice.git
cd ecommerce_Microservice# Authenticate
gcloud auth login
# Set project
gcloud config set project ecommerce-micro-0037
# Configure kubectl for GKE cluster
gcloud container clusters get-credentials my-ecommerce-cluster --region asia-southeast1# Deploy all services
kubectl apply -f infrastructure/k8s/
# Check deployment status
kubectl get pods -n ecommerce
kubectl get services -n ecommerce# Health check
curl http://34.143.235.74/health
# Get products
curl http://34.143.235.74/products
# Get categories
curl http://34.143.235.74/categories| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Service health check |
| GET | /products |
List all products |
| GET | /products/{id} |
Get product details |
| GET | /categories |
List product categories |
| GET | /search?q={query} |
Search products |
| Service | Endpoint | Description |
|---|---|---|
| Users | /auth/register |
User registration |
| Users | /auth/login |
User authentication |
| Users | /users/me |
Get user profile |
| Orders | /cart |
Shopping cart operations |
| Orders | /orders |
Order management |
Note: Users and Orders services are internal only. For full API testing, use Postman collection in postman/ directory.
# Install dependencies for all services
cd services/users-service && npm install
cd ../products-service && npm install
cd ../orders-service && npm install
# Start local databases
docker-compose up -d postgres firestore-emulator
# Run services locally
npm run dev # in each service directoryecommerce_Microservice/
βββ docs/ # Documentation
β βββ architecture.md # Architecture details
β βββ ARCHITECTURE_DIAGRAM.md # Visual diagrams
βββ services/ # Microservices
β βββ users-service/ # User management
β βββ products-service/ # Product catalog
β βββ orders-service/ # Order processing
βββ infrastructure/ # Infrastructure as Code
β βββ k8s/ # Kubernetes manifests
βββ postman/ # API testing collections
βββ scripts/ # Utility scripts
βββ README.md
# Run unit tests
npm test
# Run integration tests
npm run test:integration
# Run E2E tests
npm run test:e2eWe welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow ESLint configuration
- Write tests for new features
- Update documentation as needed
- Ensure all CI checks pass
This project is licensed under the MIT License - see the LICENSE file for details.
This project was developed by:
- LΓͺ VΔn HoΓ ng
- Nguyα» n TuαΊ₯n Viα»t
- Diα»p ΔαΊ‘i LΓͺ HoΓ i
- Nguyα» n Ngα»c HΓ²a
- ΔoΓ n Thanh PhΓΊc
- Nguyα» n VΔn Linh
For detailed contributor information, see CONTRIBUTORS.md
Built with β€οΈ on Google Cloud Platform
Last updated: October 12, 2025




