How hakimov0545/e-commerse works
This repository implements an e-commerce product with a customer storefront, a separate administration interface, and an Express/Mongoose API. Customers browse products and categories, manage accounts and wishlists, and reach product, contact, and payment flows; administrators manage catalog and operational areas. The sampled review and auth code confirms route-to-controller behavior and service/model interactions, including review-driven product-rating updates. Other domain modules are represented from the tree; their internal calls were not sampled, so those links are kept at the route/controller level where applicable.
Main entry points: controllers Commerce controllers · models Domain models · index.js API server · auth.service.js Auth service
Components 25
Customer storefront
- Storefront routes
client/src/App.jsx - Shopping pages
client/src/pages - Client API services
client/src/service - Payment flow
client/src/pages/payment/Payment.jsx
Admin console
- Admin application
admin/src/App.tsx - Management pages
admin/src/pages - Admin API services
admin/src/services
API and domain logic
- API server
index.js - Auth routes
routes/auth.routes.js - Review routes
routes/review.routes.js - Commerce routes
routes - Commerce controllers
controllers - Commerce services
services - Review service
services/review.service.js - Product service
services/product.service.js
Identity and messaging
- Auth controller
controllers/auth.controller.js - Auth service
services/auth.service.js - Token service
services/token.service.js - Email service
services/email.service.js
Persistence and files
- Domain models
models - MongoDB
- File storage
services/file.service.js
Other components
- Customer
- Administrator
- Email provider
Connections 29
- Customer → Storefront routes: opens
- Storefront routes → Shopping pages: routes to
- Shopping pages → Client API services: requests data
- Client API services → API server: calls API
- Administrator → Admin application: opens
- Admin application → Management pages: routes to
- Management pages → Admin API services: requests data
- Admin API services → API server: calls API
- API server → Auth routes: mounts routes
- API server → Review routes: mounts routes
- API server → Commerce routes: mounts routes
- Auth routes → Auth controller: dispatches
- Review routes → Commerce controllers: dispatches
- Commerce routes → Commerce controllers: dispatches
- Auth controller → Auth service: calls
- Auth service → Token service: issues tokens
- Auth service → Email service: sends codes
- Auth service → Domain models: reads and writes
- Token service → Domain models: stores tokens
- Email service → Email provider: sends email
- Commerce controllers → Commerce services: calls
- Commerce services → Domain models: reads and writes
- Domain models → MongoDB: persists
- Commerce controllers → Review service: review actions
- Review service → Domain models: queries reviews
- Commerce controllers → Product service: updates ratings
- Product service → Domain models: updates products
- Commerce controllers → File storage: handles uploads
- Shopping pages → Payment flow: opens payment