How lindsey5/kdmotoshop works
KD Motoshop is an e-commerce and shop-management application. Customers browse products, maintain a cart, place and track orders, and can review products or request refunds; administrators manage inventory, orders, suppliers, purchasing, and sales. The backend exposes these capabilities through Express routes and controllers, with MongoDB models holding domain data. The tree and sampled files establish the broad subsystems, but most page-to-API and controller-to-model wiring was not sampled, so those uncertain links are omitted. The README is empty.
Main entry points: App.tsx Frontend app · orderController.ts Order controller · app.ts Express application · reviewController.ts Review controller
Components 28
Customer storefront
- Frontend app
frontend/src/App.tsx - Product catalog
frontend/src/pages/customer/Product/Products.tsx - Cart and checkout
frontend/src/pages/customer/Order/Checkout.tsx - Customer orders
frontend/src/pages/customer/Order/Orders.tsx - Customer profile
frontend/src/pages/customer/Profile/CustomerProfile.tsx - Reviews and refunds
frontend/src/pages/customer/ui/CreateRefund.tsx
Shop administration
- Dashboard and sales
frontend/src/pages/admin/Dashboard/Dashboard.tsx - Catalog and inventory
frontend/src/pages/admin/Product/Products.tsx - Order management
frontend/src/pages/admin/Order/Orders.tsx - Suppliers and purchasing
frontend/src/pages/admin/PurchaseOrders/PurchaseOrders.tsx - Admin tools
frontend/src/pages/admin/Refunds/Refunds.tsx
Backend API
- Express application
backend/app.ts - Product routes
backend/routes/productRoutes.ts - Order routes
backend/routes/orderRoutes.ts - Review routes
backend/routes/reviewRoutes.ts - Order controller
backend/controllers/orderController.ts - Review controller
backend/controllers/reviewController.ts - Product API client
frontend/src/services/productService.tsx
Domain services
- Order service
backend/services/orderService.ts - Notifications
backend/services/notificationService.ts - Email service
backend/services/emailService.ts - Activity logging
backend/services/activityLogServices.ts
External services
- MongoDB
- PayMongo
- Cloudinary
- Brevo email
Other components
- Customer
- Administrator
Connections 28
- Customer → Frontend app: uses storefront
- Administrator → Frontend app: uses admin
- Frontend app → Product catalog: routes to
- Frontend app → Cart and checkout: routes to
- Frontend app → Customer orders: routes to
- Frontend app → Customer profile: routes to
- Frontend app → Reviews and refunds: routes to
- Frontend app → Dashboard and sales: routes to
- Frontend app → Catalog and inventory: routes to
- Frontend app → Order management: routes to
- Frontend app → Suppliers and purchasing: routes to
- Frontend app → Admin tools: routes to
- Product API client → Express application: sends product requests
- Express application → Product routes: mounts at API
- Express application → Order routes: mounts at API
- Express application → Review routes: mounts at API
- Review routes → Review controller: dispatches
- Order routes → Order controller: dispatches
- Order controller → Order service: creates orders
- Order controller → Activity logging: logs changes
- Order controller → Notifications: notifies users
- Order controller → Email service: emails updates
- Review controller → Cloudinary: uploads images
- Review controller → Notifications: notifies admins
- Order controller → MongoDB: reads and writes
- Review controller → MongoDB: reads and writes
- Email service → Brevo email: sends email
- Express application → PayMongo: receives webhook