How madgulavamshi06/jumia_clone_backend works
This repository is the backend for a Jumia-style e-commerce application. Its main workflow routes product discovery and administration requests through Express handlers to product and category models; authenticated buyers can pay and view orders, while administrators can manage catalog data and order status. Separate routes handle registration, login, and profile access. The README also describes frontend-facing features such as favorites and sorting, but this tree provides no distinct backend implementation for them. Edges reflect shown route wiring and source-index references; unsampled implementations are not inferred.
Main entry points: productRoute.js Product routes · authRoute.js Auth routes · index.js Express server · authToken.js Token and roles
Components 23
HTTP entry
- Express server
index.js - Auth routes
routes/authRoute.js - Category routes
routes/categoryRoutes.js - Product routes
routes/productRoute.js
Identity and access
- Registration
controllers/registerController.js - Login
controllers/loginController.js - Profile update
controllers/updateprofileController.js - Password reset
controllers/forgotPasswordController.js - Token and roles
middleware/authToken.js - Password hashing
helpers/authHelper.js
Catalog
- Product management
controllers/createproductController.js - Product updates
controllers/updateproductController.js - Product discovery
controllers/getproductController.js - Category operations
controllers/categoryController.js
Orders and payments
- Payment processing
controllers/braintreePaymentController.js - Buyer orders
controllers/getOrdersController.js - Order administration
controllers/getAllOrdersController.js
Data models
- Category data
models/categoryModel.js - Product data
models/productModel.js - User data
models/userModel.js - Order data
models/orderModel.js
Other components
- API client
- Braintree
Connections 32
- API client → Express server: sends requests
- Express server → Auth routes: mounts routes
index.js - Express server → Category routes: mounts routes
index.js - Express server → Product routes: mounts routes
index.js - Auth routes → Registration: routes registration
routes/authRoute.js - Auth routes → Login: routes login
routes/authRoute.js - Auth routes → Profile update: routes profile
routes/authRoute.js - Auth routes → Password reset: routes reset
routes/authRoute.js - Auth routes → Token and roles: guards requests
routes/authRoute.js - Category routes → Category operations: routes category
routes/categoryRoutes.js - Category routes → Token and roles: guards admin routes
routes/categoryRoutes.js - Product routes → Product management: routes creation
routes/productRoute.js - Product routes → Product updates: routes updates
routes/productRoute.js - Product routes → Product discovery: routes browsing
routes/productRoute.js - Product routes → Payment processing: routes payment
routes/productRoute.js - Product routes → Buyer orders: routes buyer orders
routes/productRoute.js - Product routes → Order administration: routes admin orders
routes/productRoute.js - Product routes → Token and roles: guards operations
routes/productRoute.js - Registration → User data: saves user
controllers/registerController.js - Registration → Password hashing: hashes password
controllers/registerController.js - Login → User data: checks user
controllers/loginController.js - Login → Password hashing: checks password
controllers/loginController.js - Profile update → User data: updates user
controllers/updateprofileController.js - Token and roles → User data: checks role
middleware/authToken.js - Product management → Product data: creates product
controllers/createproductController.js - Product updates → Product data: updates product
controllers/updateproductController.js - Product discovery → Product data: queries products
controllers/getproductController.js - Category operations → Category data: manages categories
controllers/categoryController.js - Payment processing → Order data: records order
controllers/braintreePaymentController.js - Payment processing → Braintree: charges payment
- Buyer orders → Order data: queries orders
controllers/getOrdersController.js - Order administration → Order data: queries orders
controllers/getAllOrdersController.js