A modern, microservices-based e-commerce platform that combines seamless online shopping with rich social interaction, AI-powered search, and real-time community features.
- Overview
- Key Features
- Tech Stack
- System Architecture
- Screenshots
- Getting Started
- Contributing
- License
Lemoo is a full-featured e-commerce ecosystem built from the ground up on a microservices architecture, designed to handle massive scale while delivering a personalized, community-driven shopping experience.
Unlike traditional e-commerce platforms that focus purely on transactions, Lemoo blends social commerce into the core product β users can connect as friends, share vouchers, chat in real-time, and get AI-powered shopping recommendations, all within a single integrated ecosystem.
- Personalized product recommendations
- Shopping cart management
- Voucher collection and redemption
- Order placement and real-time order tracking (pending β processing β shipping β delivered)
- Natural language search: describe what you're looking for in plain Vietnamese or English
- Semantic vector search using Google Text-Embedding-004 + Qdrant
- Traditional keyword search with filtering
- Integrated LLM chatbot (Gemini 2.0 Flash) for personalized shopping advice
- Budget-based product planning (e.g. "I have 2 million VND, what massage chair should I buy?")
- Order tracking and voucher management via natural language
- Built on the Model Context Protocol (MCP) for structured tool-calling into backend services
- Real-time 1-on-1 and group messaging
- Friend discovery and requests
- Voucher sharing between friends
- Notification center for order and product events
- Product creation with variant management (SKU, size, color, images)
- Inventory and pricing management
- Promotion/voucher campaign creation
- Order fulfillment and shipping status management
- AI-assisted product listing evaluation (auto-moderation)
- Store approval workflow (approve / reject with notifications)
- Product moderation (manual + AI-assisted auto-approval)
- System monitoring via Kubernetes Dashboard, Kafka UI, Redis Insight
| Layer | Technology |
|---|---|
| Microservices Framework | Spring Boot, Spring Cloud, Spring Security |
| Service Discovery | Spring Cloud Eureka |
| API Gateway | Spring Cloud Gateway |
| AI Integration | Spring AI, LangChain, LangGraph |
| MCP Protocol | Spring MCP Server, Spring MCP Client |
| Authentication | OAuth 2.0, JWT |
| Layer | Technology |
|---|---|
| UI Framework | ReactJS |
| Data Fetching | TanStack Query |
| Routing | TanStack Router |
| Purpose | Technology |
|---|---|
| Relational Data | PostgreSQL |
| Document Data | MongoDB |
| Distributed Cache & Locks | Redis (Redisson) |
| Vector Database | Qdrant |
| Message Broker | Apache Kafka |
| Purpose | Technology |
|---|---|
| LLM (Chat & Evaluation) | Gemini 2.0 Flash |
| Text Embeddings | Google Text-Embedding-004 |
| Agent Framework | LangChain + LangGraph |
| Purpose | Technology |
|---|---|
| Containerization | Docker |
| Orchestration | Kubernetes (K8s) |
| Cloud Provider | Google Cloud Platform (GCP) |
| CI/CD | GitHub Actions |
| Monitoring | K8s Dashboard, Kafka UI, Redis Insight |
The Lemoo ecosystem is divided into three primary layers: the Client Layer, the Microservices Layer (orchestrated on Kubernetes), and the Data Layer.
Client Applications:
- Lemoo Mall β buyer-facing storefront with search, cart, and order tracking
- Lemoo Chat β social layer: friends, direct messaging, voucher sharing, AI chat
- Lemoo Seller Center β seller dashboard for product, order, promotion management
- Lemoo Admin β back-office for store/product approval and system monitoring
Lemoo SSO provides single sign-on across all four apps via OAuth 2.0, so users authenticate once and move freely between surfaces.
The authentication system uses a token-based, gateway-enforced model:
- Login via SSO β Auth Service validates credentials β issues JWT access token
- Every API request passes through the API Gateway, which validates the token
- If the token is missing or invalid β
HTTP 401 Unauthorized - Internal resource services call Auth Service's
/auth/internal/token_keyendpoint to decode the token and extract the user's roles - If the user lacks required permissions β
HTTP 403 Forbidden
This design means no service trusts the client directly β all authorization is verified internally, ensuring clean separation of concerns and a strong security posture.
Becoming a seller on Lemoo goes through a structured approval pipeline:
When a seller creates a product, it goes through a multi-stage asynchronous pipeline before becoming visible to buyers:
Key design decisions:
- LLM-based auto-moderation reduces admin workload significantly
- Vector embeddings are generated at creation time, so AI search is always up-to-date
- All steps are fully decoupled via Kafka β Product Service never blocks on evaluation
Order processing is the most complex workflow in Lemoo, coordinating multiple services with strict consistency requirements. It uses the Saga Orchestration Pattern with Order Service as the central orchestrator.
Why Saga over 2PC?
Traditional two-phase commit (2PC) requires global resource locks across services β this kills throughput at scale. Saga breaks the transaction into local transactions per service, with compensating transactions that roll back only what's needed if a step fails. Combined with Kafka as the event bus, this approach supports 10 million orders per minute without bottlenecks.
In high-concurrency scenarios, multiple order requests may target the same product SKU or promotion code simultaneously. Without synchronization, this leads to:
- Race conditions β two requests both read stock = 1, both proceed, stock goes to -1
- Overselling β more units sold than available
- Promotion overuse β voucher used more times than its configured limit
Lemoo solves this using Redis distributed locks via Redisson:
Inventory lock key: lock:product:<productId>
Promotion lock key: lock:promotion:<promotionId>
Redis also serves as a distributed cache layer (via Redis Cluster) for frequently accessed data like product listings, voucher metadata, and session state β significantly reducing load on PostgreSQL and MongoDB.
The chat system is built on WebSocket + Kafka to achieve low-latency message delivery at scale:
Design choices:
- MongoDB is used for chat storage β its flexible document model and high write throughput fit chat history perfectly
- Kafka decouples the Socket Service from Chat Service, allowing each to scale independently
- Target message delivery latency: < 100ms under high load
The AI layer uses Model Context Protocol (MCP) to give the LLM structured, real-time access to backend data without tight coupling.
Three MCP Servers:
| MCP Server | Connected Service | Example Queries |
|---|---|---|
| Product MCP Server | Product Service + Qdrant | "Find me a blue t-shirt under 300k" |
| Order MCP Server | Order Service | "Where is my order?" |
| Voucher MCP Server | Promotion Service | "Do I have any vouchers for this shop?" |
This architecture means the AI can answer complex, multi-step queries like:
"I have 2 million VND. What's the best massage chair I can buy right now, and do I have any vouchers I can apply?"
The LLM will call the Product MCP Server to find matching products, then call the Voucher MCP Server to check applicable vouchers, and synthesize a complete answer.
Every push to the main branch triggers an automated GitHub Actions pipeline:
| Login | Register |
|---|---|
![]() |
![]() |
Homepage
---Product Detail Page
--- *Example conversation: User asks for a massage chair recommendation within budget β the AI searches the platform, finds matching products, and suggests the best fit.*| Shopping Cart | Checkout |
|---|---|
![]() |
![]() |
| Order List | Order Tracking |
|---|---|
![]() |
| Create Product | Manage Products |
|---|---|
![]() |
![]() |
| Promotions Dashboard | Create Promotion |
|---|---|
![]() |
![]() |
Store Registration
---| Friend Suggestions | Friend Requests |
|---|---|
![]() |
![]() |
Real-Time Chat
**Notification Center**| GCP VPS Nodes | Kubernetes Node |
|---|---|
![]() |
![]() |
| K8s Deployments | Kafka Topics |
|---|---|
![]() |
![]() |
Redis Cache Monitoring
---This project is licensed under the MIT License β see the LICENSE file for details.
Built with β€οΈ by the Lemoo Team
































