How praveenkuamrs/ecommerce_ai works
ApexStore is a React storefront and administration console backed by an Express/Prisma e-commerce API. Customers browse products, authenticate, manage a cart and addresses, check out, and view orders; administrators manage catalog, fulfillment, users, and dashboard data. The README documents transactional stock protection, server-validated pricing, local image uploads, and payment handling. Source excerpts show frontend providers and page routing plus selected backend calls; unsampled domain links are shown only where the README supports them, with uncertain wiring left out.
Main entry points: AppRoutes.jsx App routing · services Commerce services · api API clients · CheckoutPage.jsx Checkout
Components 26
Customer experience
- App routing
frontend/src/routes/AppRoutes.jsx - Shop pages
frontend/src/pages/shop - Cart page
frontend/src/pages/cart/CartPage.jsx - Checkout
frontend/src/pages/checkout/CheckoutPage.jsx - Order views
frontend/src/pages/orders - Profile
frontend/src/pages/profile/ProfilePage.jsx - Cart state
frontend/src/context/CartContext.jsx - HTTP client
frontend/src/api/axios.js - API clients
frontend/src/api
Identity and access
- Auth state
frontend/src/context/AuthContext.jsx - Sign-in pages
frontend/src/pages/auth - Auth controller
backend/src/controllers/authController.js - Auth service
backend/src/services/authService.js
Commerce API
- API routes
backend/src/routes - Commerce controllers
backend/src/controllers - Commerce services
backend/src/services - Pricing logic
backend/src/utils/pricing.js - MySQL database
backend/src/config/prisma.js - Payment handling
backend/src/services/paymentService.js - Mock provider
backend/src/services/payment/mockPaymentProvider.js - Image storage
backend/src/utils/fileStorage.js
Administration
- Admin console
frontend/src/pages/admin - Admin API routes
backend/src/routes/adminRoutes.js - Admin controller
backend/src/controllers/adminController.js - Admin service
backend/src/services/adminService.js
Other components
- Customer
Connections 31
- Customer → App routing: uses
frontend/src/routes/AppRoutes.jsx - App routing → Shop pages: routes to
frontend/src/routes/AppRoutes.jsx - App routing → Cart page: routes to
frontend/src/routes/AppRoutes.jsx - App routing → Checkout: routes to
frontend/src/routes/AppRoutes.jsx - App routing → Order views: routes to
frontend/src/routes/AppRoutes.jsx - App routing → Profile: routes to
frontend/src/routes/AppRoutes.jsx - App routing → Sign-in pages: routes to
frontend/src/routes/AppRoutes.jsx - Cart page → Cart state: uses
frontend/src/pages/cart/CartPage.jsx - Checkout → Cart state: uses
frontend/src/pages/checkout/CheckoutPage.jsx - Checkout → API clients: requests addresses and orders
frontend/src/pages/checkout/CheckoutPage.jsx - Order views → API clients: requests order data
frontend/src/pages/orders/OrderDetailPage.jsx - Sign-in pages → Auth state: authenticates through
frontend/src/pages/auth/RegisterPage.jsx - Auth state → API clients: calls auth API
frontend/src/context/AuthContext.jsx - Cart state → API clients: calls cart API
frontend/src/context/CartContext.jsx - API clients → HTTP client: uses
frontend/src/api/authApi.js - HTTP client → API routes: sends requests
- API routes → Auth controller: dispatches auth
backend/src/routes/authRoutes.js - Auth controller → Auth service: calls
backend/src/controllers/authController.js - Auth service → MySQL database: reads and writes
backend/src/services/authService.js - API routes → Commerce controllers: dispatches
backend/src/routes/adminRoutes.js - Commerce controllers → Commerce services: calls
backend/src/controllers/productController.js - Commerce services → MySQL database: reads and writes
backend/src/services/authService.js - Commerce services → Pricing logic: uses pricing logic
backend/src/services/cartService.js - Commerce services → Payment handling: handles payments
README.md - Payment handling → Mock provider: uses provider
- Commerce services → Image storage: manages product files
backend/src/services/productService.js - App routing → Admin console: routes to
frontend/src/routes/AppRoutes.jsx - Admin console → Admin API routes: requests admin operations
README.md - Admin API routes → Admin controller: dispatches
backend/src/routes/adminRoutes.js - Admin controller → Admin service: delegates business logic
backend/src/controllers/adminController.js - Admin service → MySQL database: reads and writes