How opaidaisuke69/bagolocalmarket works
Bago Market is a role-based marketplace: buyers discover products, manage a cart, and place and track orders; sellers manage listings and fulfillment; administrators oversee users, sellers, and product approvals. The React app routes into these workflows, with shared auth/cart state and an API service layer connecting to PHP endpoints. The README is only the default Vite template, so product capabilities are inferred from the repository tree and sampled source. Unsampled backend internals are represented by their existing directories; their database relationships are not asserted.
Main entry points: services.js API services · App.jsx Route application · CartContext.jsx Cart state · ProductCard.jsx Product card
Components 27
Marketplace experience
- Browse products
src/pages/buyer/Marketplace.jsx - Product details
src/pages/buyer/ProductDetail.jsx - Product card
src/components/marketplace/ProductCard.jsx - Buyer cart
src/pages/buyer/Cart.jsx - Checkout
src/pages/buyer/Checkout.jsx - Buyer orders
src/pages/buyer/Orders.jsx - Order detail
src/pages/buyer/OrderDetail.jsx - Recommendations
src/pages/buyer/Recommendations.jsx - Wishlist
src/pages/buyer/Wishlist.jsx
Marketplace operations
- Seller workspace
src/pages/seller - Shipping requests
src/pages/seller/Shipping.jsx - Admin workspace
src/pages/admin - Product approvals
src/pages/admin/ProductApprovals.jsx
Client foundation
- Route application
src/App.jsx - Authentication state
src/context/AuthContext.jsx - Cart state
src/context/CartContext.jsx - API services
src/api/services.js
PHP API
- Auth endpoints
server/api/auth - Product endpoints
server/api/products - Cart endpoints
server/api/cart - Order endpoints
server/api/orders - Recommendation endpoints
server/api/recommendations - Search endpoints
server/api/search - Seller endpoints
server/api/seller - Admin endpoints
server/api/admin - MySQL database
server/api/config/database.php
Other components
- Buyer
Connections 25
- Buyer → Route application: uses
src/App.jsx - Route application → Browse products: routes to
src/App.jsx - Route application → Product details: routes to
src/App.jsx - Route application → Seller workspace: routes to
src/App.jsx - Route application → Admin workspace: routes to
src/App.jsx - Browse products → Product card: renders
src/pages/buyer/Marketplace.jsx - Product details → Product card: renders
src/pages/buyer/ProductDetail.jsx - Product card → Cart state: adds items
src/components/marketplace/ProductCard.jsx - Buyer cart → Cart state: uses
src/pages/buyer/Cart.jsx - Checkout → Cart state: uses
src/pages/buyer/Checkout.jsx - Seller workspace → Shipping requests: includes
- Admin workspace → Product approvals: includes
src/App.jsx - Route application → Authentication state: provides
src/App.jsx - Authentication state → API services: calls
src/context/AuthContext.jsx - Cart state → API services: calls
src/context/CartContext.jsx - API services → Auth endpoints: requests
src/api/services.js - API services → Product endpoints: requests
src/api/services.js - API services → Cart endpoints: requests
src/api/services.js - API services → Order endpoints: requests
src/api/services.js - API services → Recommendation endpoints: requests
src/api/services.js - API services → Search endpoints: requests
src/api/services.js - API services → Seller endpoints: requests
src/api/services.js - API services → Admin endpoints: requests
src/api/services.js - API services → Wishlist: supports
- API services → Recommendations: supports