How manan-8017/buildflow works
BuildFlow is a construction-material estimation and procurement app: users enter building dimensions for a material-and-cost estimate, then browse products, manage a cart, place and pay for orders, and track them. The graph follows the React entry point through the API routes to server controllers, services, and MongoDB-backed models. It also shows authentication and the documented product-management capability. The tree and excerpts do not expose every page or controller implementation, so uncertain internal links are omitted.
Main entry points: App.jsx App routes · routes.js API router · api.js HTTP client · db.js MongoDB
Components 34
Web client
- App routes
client/src/App.jsx - Auth context
client/src/context/AuthContext.jsx - Marketplace pages
client/src/pages/Products.jsx - Cart page
client/src/pages/Cart.jsx - Checkout page
client/src/pages/Checkout.jsx - Payment page
client/src/pages/Payment.jsx - Order pages
client/src/pages/Orders.jsx - Estimation pages
client/src/pages/Estimation.jsx - HTTP client
client/src/services/api.js
API dispatch
- API router
server/routes/routes.js - Auth routes
server/routes/authRoutes.js - Cart routes
server/routes/cartRoute.js - Product routes
server/routes/productRoute.js - Order routes
server/routes/orderRoute.js - Payment routes
server/routes/paymentRoute.js - Estimation routes
server/routes/estimationRoute.js
Commerce and identity
- Auth controller
server/controllers/authController.js - Cart controller
server/controllers/cartController.js - Product controller
server/controllers/productController.js - Order controller
server/controllers/orderController.js - Payment controller
server/controllers/paymentController.js - JWT service
server/services/authService.js - Payment service
server/services/paymentService.js
Estimation
- Estimation controller
server/controllers/estimationController.js - Estimate service
server/services/estimationService.js - Gemini estimator
server/services/geminiService.js
Persistence
- MongoDB
server/config/db.js - User model
server/models/user.js - Cart model
server/models/cart.js - Product model
server/models/product.js - Order model
server/models/order.js - Payment model
server/models/payment.js - Estimation model
server/models/estimation.js
Other components
- User
Connections 45
- User → App routes: uses
- App routes → Auth context: provides auth
- App routes → Marketplace pages: routes to
- App routes → Cart page: routes to
- App routes → Checkout page: routes to
- App routes → Payment page: routes to
- App routes → Order pages: routes to
- App routes → Estimation pages: routes to
- Auth context → HTTP client: requests
- Marketplace pages → HTTP client: requests
- Cart page → HTTP client: requests
- Checkout page → HTTP client: requests
- Payment page → HTTP client: requests
- Order pages → HTTP client: requests
- Estimation pages → HTTP client: requests
- HTTP client → API router: HTTP calls
- API router → Auth routes: mounts
- API router → Cart routes: mounts
- API router → Product routes: mounts
- API router → Order routes: mounts
- API router → Payment routes: mounts
- API router → Estimation routes: mounts
- Auth routes → Auth controller: dispatches
- Cart routes → Cart controller: dispatches
- Product routes → Product controller: dispatches
- Order routes → Order controller: dispatches
- Payment routes → Payment controller: dispatches
- Estimation routes → Estimation controller: dispatches
- Auth controller → JWT service: generates tokens
- Auth controller → User model: reads and writes
- Cart controller → Cart model: reads and writes
- Product controller → Product model: manages products
- Order controller → Order model: creates and reads
- Order controller → Payment service: creates payment order
- Payment controller → Payment service: handles payment
- Payment controller → Payment model: persists payment
- Estimation controller → Estimate service: generates estimate
- Estimation controller → Estimation model: reads and writes
- Estimate service → Gemini estimator: requests estimate
- User model → MongoDB: stores in
- Cart model → MongoDB: stores in
- Product model → MongoDB: stores in
- Order model → MongoDB: stores in
- Payment model → MongoDB: stores in
- Estimation model → MongoDB: stores in