Modul praktis Level 2 VibeKoding: Proyek: E-Commerce Sembako Berbasis Microservices.Modul praktis Level 2 VibeKoding: Proyek: E-Commerce Sembako Berbasis Microservices.
This project requires you to build a grocery e-commerce microservices system from scratch, based on a real PRD. Unlike previous single-service projects, the backend here is split into multiple independent services by business domain, unified through an API gateway. You'll learn how to design service boundaries and handle cross-service data consistency.This project requires you to build a grocery e-commerce microservices system from scratch, based on a real PRD. Unlike previous single-service projects, the backend here is split into multiple independent services by business domain, unified through an API gateway. You'll learn how to design service boundaries and handle cross-service data consistency.
This is the comprehensive practical section of Stage 2. Microservices architecture is very common in real-world applications. Once you understand service decomposition and gateway routing, you'll be able to handle more complex backend system designs.This is the comprehensive practical section of Stage 2. Microservices architecture is very common in real-world applications. Once you understand service decomposition and gateway routing, you'll be able to handle more complex backend system designs.
Before starting this project, you should already be familiar with:Before starting this project, you should already be familiar with:
After completing this project, you will be able to:After completing this project, you will be able to:
You will build a grocery e-commerce microservices system:You will build a grocery e-commerce microservices system:
| Subsystem | Responsibility |
|---|---|
| User Frontend | Browse products, place orders, view order history |
| Admin Portal | Product management, inventory management, order management |
The backend is split into these services:The backend is split into these services:
| Service | Responsibility |
|---|---|
| API Gateway | Unified entry point, route forwarding, auth verification |
| Auth Service | User registration, login, JWT issuance |
| Catalog Service | Product information management |
| Inventory Service | Stock quantity management |
| Order Service | Order creation, status management |
The requirements document for this project is on GitHub: [View PRD](https://github.com/datawhalechina/easy-vibe/blob/main/docs/en/stage-2/assignments/simple-grocery-microservices/PRD.md)The requirements document for this project is on GitHub: [View PRD](https://github.com/datawhalechina/easy-vibe/blob/main/docs/en/stage-2/assignments/simple-grocery-microservices/PRD.md)
{ title: 'Scaffold', description: 'Generate frontend, gateway, and service skeletons' },{ title: 'Scaffold', description: 'Generate frontend, gateway, and service skeletons' }, { title: 'Iterate', description: 'Add APIs module by module, fix inventory and order consistency' },{ title: 'Iterate', description: 'Add APIs module by module, fix inventory and order consistency' }, { title: 'Launch', description: 'End-to-end testing, deploy, and prepare demo' }{ title: 'Launch', description: 'End-to-end testing, deploy, and prepare demo' } ]" />]" />
Open the PRD document and answer these key questions:Open the PRD document and answer these key questions:
If the above questions don't have clear answers, don't start coding. Unclear requirements are the most common cause of rework.If the above questions don't have clear answers, don't start coding. Unclear requirements are the most common cause of rework.
mermaid flowchart TD prd["PRD"] --> fe["Frontend Pages"] fe --> gw["API Gateway"] gw --> auth["Auth Service"] gw --> catalog["Catalog Service"] gw --> inventory["Inventory Service"] gw --> order["Order Service"] order --> inventory
Prompt reference:Prompt reference:
text Based on the current PRD, help me generate a project scaffold for a grocery e-commerce microservices system. Requirements: 1. Generate user frontend and admin portal skeletons 2. Generate five directories: api-gateway, auth-service, catalog-service, inventory-service, order-service 3. Each service should only have a minimal runnable entry point 4. Don't connect to a real database or payment system yet
Check each item:Check each item:
| Check Item | Verification Method |
|---|---|
| Gateway routing | Are service APIs correctly forwarded through the gateway? |
| Auth isolation | Are user and admin APIs properly separated? |
| Data consistency | Are product and inventory data in sync? |
| Transaction loop | After ordering, are inventory deduction and order status consistent? |
| Failure handling | Is there a compensation mechanism for insufficient stock or timeout? |
At minimum, verify these scenarios:At minimum, verify these scenarios:
After completing this project, submit the following:After completing this project, submit the following:
| Dimension | Basic Requirements | Advanced Requirements |
|---|---|---|
| PRD Alignment | Pages, features, and service decomposition basically match PRD | Can clearly explain service decomposition rationale |
| Product Loop | Browse โ Order โ Inventory deduction โ View order works end-to-end | Order timeout or insufficient stock has compensation mechanism |
| Service Architecture | Each service starts independently, accessible through gateway | Inter-service communication has error handling and retry |
| Admin Capability | Product, inventory, and order management are functional | Admin portal has data statistics |
| Engineering Completeness | Frontend, gateway, services, database pipeline connected | Has Docker Compose or similar orchestration |