How jeetjm/campusmart works
CampusMart is a campus marketplace for student accounts, buying and selling listings, rentals, exchanges, and related community features, with administrative tools. Students browse the marketplace, inspect a listing, and can proceed through cart, checkout, and order management; sellers manage listings and orders. The frontend routes users to feature pages and calls a Node/Express API backed by MongoDB models. The source excerpts substantiate the main routing and several controller/model relationships; unsampled capabilities are retained as subsystem nodes, but their internal links are omitted where evidence is unavailable.
Main entry points: App.jsx Page router · server.js Express API · reviewController.js Review service · api.js API client
Components 32
Web application
- Page router
frontend/src/App.jsx - API client
frontend/src/services/api.js - Marketplace browsing
frontend/src/pages/Marketplace.jsx - Product details
frontend/src/pages/ProductDetails.jsx - Product reviews
frontend/src/components/ProductReviews.jsx - Listing management
frontend/src/pages/SellProduct.jsx - Cart and checkout
frontend/src/pages/Checkout.jsx - Order management
frontend/src/pages/MyOrders.jsx - Account pages
frontend/src/pages/Login.jsx - Exchange offers
frontend/src/pages/ExchangeOffers.jsx - Rental workflows
frontend/src/pages/MyRentals.jsx - Messaging
frontend/src/pages/Chat.jsx - Notifications
frontend/src/pages/Notifications.jsx
Marketplace commerce
- Product listings
backend/controllers/productController.js - Product records
backend/models/Product.js - Order processing
backend/controllers/orderController.js - Order records
backend/models/Order.js - Cart records
backend/models/Cart.js - Exchange offers
backend/controllers/exchangeController.js - Exchange records
backend/models/ExchangeOffer.js - Rental requests
backend/controllers/rentalController.js - Rental records
backend/models/Rental.js - AI assistance
backend/services
Community features
- Review service
backend/controllers/reviewController.js - Review records
backend/models/Review.js
API and persistence
- Express API
backend/server.js - Authentication
backend/controllers/authController.js - User records
backend/models/User.js
Administration
- Admin console
frontend/src/pages/AdminDashboard.jsx - Admin operations
backend/controllers/adminController.js
Other components
- Student
- Administrator
Connections 39
- Student → Page router: opens
frontend/src/App.jsx - Administrator → Page router: opens
frontend/src/App.jsx - Page router → Marketplace browsing: routes to
frontend/src/App.jsx - Page router → Product details: routes to
frontend/src/App.jsx - Page router → Listing management: routes to
frontend/src/App.jsx - Page router → Order management: routes to
frontend/src/App.jsx - Page router → Account pages: routes to
frontend/src/App.jsx - Page router → Exchange offers: routes to
frontend/src/App.jsx - Page router → Rental workflows: routes to
frontend/src/App.jsx - Page router → Messaging: routes to
frontend/src/App.jsx - Page router → Notifications: routes to
frontend/src/App.jsx - Page router → Admin console: routes to
frontend/src/App.jsx - Product details → Product reviews: renders
frontend/src/pages/ProductDetails.jsx - Marketplace browsing → API client: uses API
frontend/src/pages/Marketplace.jsx - Product details → API client: uses API
frontend/src/pages/ProductDetails.jsx - Product reviews → API client: uses API
frontend/src/components/ProductReviews.jsx - API client → Express API: requests
- Express API → Authentication: routes requests
backend/server.js - Express API → Product listings: routes requests
backend/server.js - Express API → Order processing: routes requests
backend/server.js - Express API → Exchange offers: routes requests
backend/server.js - Express API → Rental requests: routes requests
backend/server.js - Express API → Review service: routes requests
backend/server.js - Express API → Admin operations: routes requests
backend/server.js - Product listings → Product records: queries
backend/controllers/productController.js - Order processing → Cart records: reads
backend/controllers/orderController.js - Order processing → Order records: creates and reads
backend/controllers/orderController.js - Order processing → Product records: reads
backend/controllers/orderController.js - Review service → Review records: queries
backend/controllers/reviewController.js - Review service → Product records: updates rating
backend/controllers/reviewController.js - Review service → Order records: checks purchase
backend/controllers/reviewController.js - Review service → Rental records: checks rental
backend/controllers/reviewController.js - Exchange offers → Exchange records: queries
backend/controllers/exchangeController.js - Exchange offers → Product records: queries
backend/controllers/exchangeController.js - Rental requests → Rental records: queries
backend/controllers/rentalController.js - Rental requests → Product records: queries
backend/controllers/rentalController.js - Authentication → User records: queries
backend/controllers/authController.js - Admin operations → User records: manages
backend/controllers/adminController.js - Admin console → API client: uses API