# Core modules

### 1. Store Management
- Store registration and activation
- Store profile management
- Store schedule configuration
- Online/offline status
- Store front customization

**Key Files:**
- `controller/store.controller.js`
- `router/store.routes.js`
- `model/store.model.js`

### 2. Product Management
- Product CRUD operations
- Product variants
- Inventory management
- Category management
- Product photos (up to 20 images)
- POS integration

**Key Files:**
- `controller/product.controller.js`
- `router/product.routes.js`
- `model/product.model.js`

### 3. Shopping Cart
- Add/remove items
- Update quantities
- Cart listing
- Invalid item detection

**Key Files:**
- `controller/cart.controller.js`
- `router/cart.routes.js`
- `model/cart.model.js`

### 4. Order Processing
- Checkout flow
- Order creation
- Order status updates
- Order management (seller side)
- Order tracking
- Delivery monitoring
- Invoice generation

**Key Files:**
- `controller/transaction/checkout.controller.js`
- `controller/transaction/order_management.controller.js`
- `controller/transaction/update_status.controller.js`

### 5. Payment System
- Xendit integration
- Virtual account generation
- Payment callbacks
- Payment verification
- Balance management
- Payout processing

**Key Files:**
- `controller/virtualAccount/virtual_account.controller.js`
- `controller/balance.controller.js`
- `controller/webhook.controller.js`

### 6. Affiliate Marketing
- 3-level referral system
- Affiliate link generation
- Click tracking
- Commission calculation
- Referral bonus distribution (20% per level)
- Affiliate dashboard

**Key Files:**
- `controller/affiliate/`
- `router/affiliate.routes.js`
- See `REFERRAL_SYSTEM_README.md` for details

### 7. Shipping & Expedition
- Multiple courier support
- GoSend Instant integration
- Shipping cost calculation
- Real-time price API
- Order booking
- Delivery tracking

**Key Files:**
- `controller/expedition.controller.js`
- `utility/shipment.utility.js`
- See `GOSEND_INTEGRATION_README.md` for details

### 8. Review System
- Product reviews
- Rating system
- Photo/video uploads
- Review moderation
- Order review

**Key Files:**
- `controller/review.controller.js`
- `router/review.routes.js`

### 9. Real-time Chat
- Customer-seller messaging
- WebSocket communication
- Chat rooms
- Message history
- Unread message tracking

**Key Files:**
- `services/chat.services.js`
- `controller/chat.controller.js`
- `model/mongodb/store_chat.model.js`

### 10. CMS
- Banner management
- Category management
- Content pages
- Promotional content

**Key Files:**
- `controller/cms.controller.js`
- `model/cms/`