How mmykesser/ecommerce works
This is an eCommerce platform with an Express/MongoDB API and an in-progress React frontend. The documented backend workflow is HTTP routing and middleware → controller → business service → Mongoose model; its domain capabilities include authentication, users, catalog, cart, orders, and InPost pickup-point support. The frontend excerpt shows authentication initialization and state management, but not the full shopping flow. Some domain modules are unsampled, so their components are included from the tree and README, while unsupported internal call details are omitted.
Main entry points: routes API Routers · controllers HTTP Controllers · models Mongoose Models · server.ts Express Server
Components 22
API Runtime
- Express Server
backend/src/server.ts - API Routers
backend/src/routes - Auth and Validation
backend/src/middleware - HTTP Controllers
backend/src/controllers
Commerce Services
- Authentication
backend/src/services/auth.service.ts - User Management
backend/src/services/user.service.ts - Product Catalog
backend/src/services/product.service.ts - Category Management
backend/src/services/category.service.ts - Shopping Cart
backend/src/services/cart.service.ts - Order Processing
backend/src/services/order.service.ts - InPost Integration
backend/src/services/inpost.service.ts
Persistence
- Mongoose Models
backend/src/models
Web Authentication
- React App
frontend/src/App.tsx - Auth Initialization
frontend/src/features/auth/hooks/useAuthInit.ts - Auth State
frontend/src/features/auth/authSlice.ts - Auth API Client
frontend/src/features/auth/authApi.ts - HTTP Client
frontend/src/api/axios.ts - Redux Store
frontend/src/store/store.ts
Other components
- API Client
- MongoDB
- InPost API
- Browser User
Connections 27
- API Client → Express Server: sends requests
- Express Server → API Routers: mounts routers
backend/src/server.ts - Express Server → MongoDB: connects
backend/src/server.ts - API Routers → HTTP Controllers: routes to
backend/src/routes/product.routes.ts - API Routers → Auth and Validation: applies guards
backend/src/routes/product.routes.ts - API Routers → Authentication: constructs service
backend/src/routes/auth.routes.ts - API Routers → Product Catalog: constructs service
backend/src/routes/product.routes.ts - API Routers → Category Management: constructs service
backend/src/routes/category.routes.ts - API Routers → Shopping Cart: constructs service
backend/src/routes/cart.routes.ts - API Routers → User Management: constructs service
backend/src/routes/user.routes.ts - HTTP Controllers → Authentication: calls service
backend/src/controllers/auth.controller.ts - HTTP Controllers → Shopping Cart: calls service
backend/src/controllers/cart.controller.ts - HTTP Controllers → Product Catalog: calls service
backend/src/controllers/product.controller.ts - HTTP Controllers → Category Management: calls service
backend/src/controllers/category.controller.ts - HTTP Controllers → Order Processing: calls service
backend/src/controllers/order.controller.ts - Authentication → Mongoose Models: queries users
backend/src/services/auth.service.ts - Shopping Cart → Mongoose Models: reads and writes
backend/src/services/cart.service.ts - Product Catalog → Mongoose Models: queries catalog
backend/src/services/product.service.ts - Order Processing → Mongoose Models: queries orders
backend/src/services/order.service.ts - Mongoose Models → MongoDB: persists documents
- InPost Integration → InPost API: uses API
- Browser User → React App: uses storefront
frontend/src/App.tsx - React App → Auth Initialization: initializes auth
frontend/src/App.tsx - Auth Initialization → Auth State: dispatches profile
frontend/src/features/auth/hooks/useAuthInit.ts - Auth State → Auth API Client: requests auth
frontend/src/features/auth/authSlice.ts - Auth API Client → HTTP Client: sends requests
frontend/src/features/auth/authApi.ts - Redux Store → Auth State: registers reducer
frontend/src/store/store.ts