How sajid019129/eco-cart works
Eco-Cart is a reuse-focused marketplace for buyers, sellers, and delivery personnel. Buyers browse and filter listings, add items to a cart, check out, and track orders; sellers manage listings and orders, while donated items have a separate marketplace and claim flow. The React application coordinates these experiences with an Express API backed by MongoDB. The README documents the major workflows; the sampled excerpts show selected frontend calls, route registration, and model use, but not every page-to-API interaction.
Main entry points: App.jsx App Router · index.js Express Server · orders.js Order Routes · products.js Product Routes
Components 30
Marketplace UI
- App Router
client/src/App.jsx - Navigation
client/src/components/Navbar.jsx - Product Marketplace
client/src/App.jsx - Search Filters
client/src/components/ProductSearch.jsx - Listing Editor
client/src/components/AddProduct.jsx - Cart
client/src/components/Cart.jsx - Checkout
client/src/components/CheckoutModal.jsx - Donation Submission
client/src/components/DonateProduct.jsx - Donation Marketplace
client/src/components/DonationMarketplace.jsx - Authentication Pages
client/src/pages/Register.jsx - Seller Dashboard
client/src/pages/SellerDashboard.jsx - Logistics Dashboard
client/src/pages/LogisticsDashboard.jsx - Order Tracking
client/src/pages/TrackOrder.jsx - Invoice View
client/src/components/InvoiceModal.jsx
API Services
- Express Server
server/index.js - Auth Routes
server/routes/auth.js - Product Routes
server/routes/products.js - Cart Routes
server/routes/cart.js - Order Routes
server/routes/orders.js - Notification Routes
server/routes/notifications.js
Marketplace Data
- User Records
server/models/User.js - Product Records
server/models/Product.js - Cart Records
server/models/Cart.js - Order Records
server/models/Order.js - Notification Records
server/models/Notification.js - Category Records
server/models/Category.js
Other components
- Buyer
- Seller
- Delivery Staff
- MongoDB
Connections 40
- Buyer → App Router: uses
README.md - Seller → App Router: uses
README.md - Delivery Staff → App Router: uses
README.md - App Router → Navigation: renders
client/src/App.jsx - App Router → Product Marketplace: routes
client/src/App.jsx - Product Marketplace → Search Filters: filters with
client/src/App.jsx - App Router → Listing Editor: renders
client/src/App.jsx - App Router → Cart: renders
client/src/App.jsx - Cart → Checkout: opens
client/src/components/Cart.jsx - App Router → Donation Submission: routes
client/src/App.jsx - App Router → Donation Marketplace: routes
client/src/App.jsx - App Router → Authentication Pages: routes
client/src/App.jsx - App Router → Seller Dashboard: routes
client/src/App.jsx - App Router → Logistics Dashboard: routes
client/src/App.jsx - App Router → Order Tracking: routes
client/src/App.jsx - Cart → Invoice View: opens
client/src/components/Cart.jsx - Express Server → Auth Routes: mounts
server/index.js - Express Server → Product Routes: mounts
server/index.js - Express Server → Cart Routes: mounts
server/index.js - Express Server → Order Routes: mounts
server/index.js - Express Server → Notification Routes: mounts
server/index.js - App Router → Product Routes: fetches listings
client/src/App.jsx - Navigation → Auth Routes: updates profiles
client/src/components/Navbar.jsx - Navigation → Notification Routes: fetches notices
client/src/components/Navbar.jsx - Auth Routes → User Records: reads and writes
server/routes/auth.js - Auth Routes → Product Records: uses
server/routes/auth.js - Auth Routes → Cart Records: uses
server/routes/auth.js - Product Routes → Product Records: reads and writes
server/routes/products.js - Product Routes → Category Records: looks up
server/routes/products.js - Product Routes → User Records: uses
server/routes/products.js - Product Routes → Cart Records: cleans up
server/routes/products.js - Cart Routes → Cart Records: reads and writes
server/routes/cart.js - Cart Routes → Product Records: uses
server/routes/cart.js - Order Routes → Order Records: reads and writes
server/routes/orders.js - Order Routes → Product Records: uses
server/routes/orders.js - Order Routes → User Records: uses
server/routes/orders.js - Order Routes → Cart Records: uses
server/routes/orders.js - Order Routes → Notification Records: creates
server/routes/orders.js - Notification Routes → Notification Records: reads and updates
server/routes/notifications.js - Express Server → MongoDB: connects
server/index.js