How nguyen1976/shopee_clone works
Main Architecture Components
A. Frontend Layer (React Application)
• As the topmost layer with these key components:
• Pages (User & Admin sections)
• Components
• Layouts
• Context Providers
• Redux Store
B. State Management & Business Logic Layer
• Redux Store with slices (Product, Order, User)
• Context Providers (Order, Toast, User)
• Hooks (useDebounce)
C. Services Layer
• API Services:
• UserService
• ProductService
• OrderService
• AddressService
• PaymentService
• VisitService
• ShipEngine API Integration
• Cloudinary Integration (for image handling)
Component Organization
Layouts
• AdminLayout
• UserLayout
• DefaultLayout
• AccessLayout
• FooterLayout
Components
• Core Components (Modal, Loading, Toast, etc.)
• Feature Components (CardProduct, Header, Footer, etc.)
Pages
• Admin Section
• Products
• Orders
• Users
• User Section
• Home
• Product Details
• Payment
• Orders
• Profile
Data Flow Visualization
• User interactions → Components
• Components → Redux Actions
• Redux Actions → Services
• Services → External APIs
• API Responses → Redux Store
• Store Updates → Component Re-renders
Integration Points
Key integration points:
• ShipEngine API for shipping functionality
• Cloudinary for image management
• Authentication/Authorization flows
• Payment processing
• Address management
Technical Stack Indicators
• React
• Redux
• Tailwind CSS
• Axios
• JWT handling