How laiquanghai2k6/shopee works
Shopee Clone is a full-stack storefront and administration app. A shopper browses or searches products, manages a cart, checks out through payment, and can review order history; administrators manage catalog, vouchers, users, banners, and revenue. The client is a Next.js app with query/state layers, while NestJS exposes domain controllers and services backed by PostgreSQL entities. The README documents Stripe; the tree also includes VNPay and Cloudinary integrations. Some client-to-API wiring and backend service internals were not sampled, so those links are omitted unless directly evidenced.
Main entry points: auth.service.ts Auth service · page.tsx Product search · admin.controller.ts Admin endpoints · admin.service.ts Admin service
Components 24
Storefront client
- Storefront
client/src/app/page.tsx - Product details
client/src/app/[slug]/page.tsx - Product search
client/src/app/search/[title]/page.tsx - Search results UI
client/src/components/Product/SearchClient.tsx - Shopping cart
client/src/app/cart/page.tsx - Checkout UI
client/src/components/Modal/ModalPayment.tsx - Order history
client/src/app/history/page.tsx - Admin dashboard
client/src/app/admin/page.tsx - History query
client/src/hooks/useHistoryQuery.ts
Commerce API
- Product endpoints
server/src/product/product.controller.ts - Category endpoints
server/src/category/category.controller.ts - Cart and history
server/src/history_cart/history_cart.controller.ts - Stripe endpoints
server/src/stripe/stripe.controller.ts - VNPay endpoints
server/src/vnpay/vnpay.controller.ts
Identity and admin
- Authentication
server/src/auth/auth.controller.ts - Auth service
server/src/auth/auth.service.ts - Admin endpoints
server/src/admin/admin.controller.ts - Admin service
server/src/admin/admin.service.ts
Data and integrations
- PostgreSQL entities
server/src/entities - Stripe
- VNPay gateway
- Cloudinary
server/src/cloudinary/cloudinary.service.ts
Other components
- Shopper
- Administrator
Connections 17
- Shopper → Storefront: browses
- Shopper → Product details: views
- Shopper → Product search: searches
- Product search → Search results UI: renders
- Shopper → Shopping cart: manages cart
- Shopper → Checkout UI: checks out
- Shopper → Order history: reviews orders
- Administrator → Admin dashboard: manages store
- Product endpoints → Category endpoints
- History query → Admin endpoints: requests history
- Admin endpoints → Admin service: dispatches
- Admin service → PostgreSQL entities: reads/writes
- Authentication → Auth service: dispatches
- Auth service → PostgreSQL entities: reads/writes
- Stripe endpoints → Stripe: uses
- VNPay endpoints → VNPay gateway: creates payment URL
- Auth service → Cloudinary: uploads image