How er-ajayqa/ecommerceapplicationadvancebackendlearning works
This is an Express e-commerce API: clients can authenticate, browse products and categories, manage addresses and carts, and place orders. The visible product workflow routes requests through the app to product controllers and services, which handle catalog operations, image uploads, caching, and persistence. Other domain modules are included because the source tree establishes them as major API capabilities, but their internal call chains were not sampled. The graph therefore omits uncertain links rather than inferring them from module names or imports.
Main entry points: app.ts Express app · product.service.ts Product service · auth.service.ts Auth module · prisma.ts PostgreSQL
Components 19
API entry
- Express app
backend/src/app.ts
Commerce domains
- Product controller
backend/src/modules/product/product.controller.ts - Product service
backend/src/modules/product/product.service.ts - Product repository
backend/src/modules/product/product.repository.ts - Category module
backend/src/modules/category/category.service.ts - Cart controller
backend/src/modules/cart/cart.controller.ts - Cart service
backend/src/modules/cart/cart.service.ts - Cart repository
backend/src/modules/cart/cart.repository.ts - Order module
backend/src/modules/order/order.service.ts - Address module
backend/src/modules/address/address.service.ts
Identity
- Auth module
backend/src/modules/auth/auth.service.ts - Auth helpers
backend/src/utils/auth.helper.ts - JWT helpers
backend/src/utils/jwt.helper.ts
Infrastructure
- PostgreSQL
backend/src/lib/prisma.ts - Redis client
backend/src/lib/redis.ts - Cache helper
backend/src/utils/cache.helper.ts - Cloudinary helper
backend/src/utils/cloudinary/cloudinary.helper.ts - Environment config
backend/src/config/env.config.ts
Other components
- API client
Connections 20
- API client → Express app: sends requests
- Express app → Auth module: mounts auth routes
backend/src/app.ts - Express app → Category module: mounts category routes
backend/src/app.ts - Express app → Product controller: mounts product routes
backend/src/app.ts - Express app → Order module: mounts order routes
backend/src/app.ts - Express app → Address module: mounts address routes
backend/src/app.ts - Express app → Cart controller: mounts cart routes
backend/src/app.ts - Product controller → Product service: calls
backend/src/modules/product/product.controller.ts - Cart controller → Cart service: calls
backend/src/modules/cart/cart.controller.ts - Product service → Product repository: uses repository
- Cart service → Cart repository: uses repository
- Product service → Cloudinary helper: uploads images
backend/src/modules/product/product.service.ts - Product service → Redis client: reads and writes cache
backend/src/modules/product/product.service.ts - Product service → Cache helper: invalidates cache
backend/src/modules/product/product.service.ts - Auth module → Auth helpers: hashes passwords
backend/src/modules/auth/auth.service.ts - Auth module → JWT helpers: issues tokens
backend/src/modules/auth/auth.service.ts - Product repository → PostgreSQL: persists products
backend/src/modules/product/product.repository.ts - Cart repository → PostgreSQL: persists carts
backend/src/modules/cart/cart.repository.ts - Environment config → PostgreSQL: configures connection
backend/src/lib/prisma.ts - Environment config → Redis client: configures connection
backend/src/lib/redis.ts