How m-ayaz-xyz/recycle_connect works
Recycle Connect is a portfolio web app for connecting users with nearby recycling vendors and arranging pickups. Its principal workflow is account access, vendor discovery, pickup scheduling, and order tracking; vendors also manage profiles and respond to orders. The graph separates the Next.js experience from Express routing, domain controllers, and MongoDB-backed models. README capabilities guide the frontend branches, but frontend source excerpts were not provided, so those internal links are left unverified rather than inferred from page names.
Main entry points: dashboardRoute.js Dashboard routes · locationController.js Location discovery · orderController.js Order management · server.js Express server
Components 25
Web experience
- Sign in/up
frontend/src/app/auth/login/page.jsx - User dashboard
frontend/src/app/dashboard/user/page.jsx - Vendor discovery
frontend/src/app/dashboard/user/[username]/page.jsx - Pickup scheduling
frontend/src/app/dashboard/user/[username]/schedule/page.jsx - Order tracking
frontend/src/app/dashboard/user/orders/page.jsx - Interactive maps
frontend/src/components/ui/MapView.jsx - Vendor map
frontend/src/components/ui/VendorMap.jsx
API and access
- Express server
backend/server.js - Auth routes
backend/routes/authRoutes.js - Dashboard routes
backend/routes/dashboardRoute.js - JWT authentication
backend/middleware/authMiddleware.js - Role authorization
backend/middleware/roleMiddleware.js
Domain services
- Account service
backend/controllers/authController.js - Vendor profiles
backend/controllers/vendorprofileController.js - Location discovery
backend/controllers/locationController.js - Distance calculation
backend/utils/haversine.js - Order management
backend/controllers/orderController.js
Persistence
- Database connection
backend/config/db.js - User records
backend/models/User.js - Vendor records
backend/models/Vendor.js - Order records
backend/models/Order.js
Other components
- User
- Vendor
- MongoDB
- OpenStreetMap
Connections 26
- User → Sign in/up: authenticates
- User → User dashboard: uses
- User dashboard → Vendor discovery: discovers vendors
- Vendor discovery → Pickup scheduling: schedules pickup
- Pickup scheduling → Order tracking: tracks orders
- Vendor → Vendor map: views map
- Express server → Database connection: connects
backend/server.js - Express server → Auth routes: mounts
backend/server.js - Express server → Dashboard routes: mounts
backend/server.js - Auth routes → Account service: dispatches
backend/routes/authRoutes.js - Auth routes → JWT authentication: guards profile
backend/routes/authRoutes.js - Dashboard routes → JWT authentication: guards routes
backend/routes/dashboardRoute.js - Dashboard routes → Role authorization: checks roles
backend/routes/dashboardRoute.js - Dashboard routes → Vendor profiles: dispatches
backend/routes/dashboardRoute.js - Dashboard routes → Location discovery: dispatches
backend/routes/dashboardRoute.js - Dashboard routes → Order management: dispatches
backend/routes/dashboardRoute.js - Account service → User records: reads/writes
backend/controllers/authController.js - Vendor profiles → Vendor records: reads/writes
backend/controllers/vendorprofileController.js - Location discovery → User records: reads/writes
backend/controllers/locationController.js - Location discovery → Vendor records: reads
backend/controllers/locationController.js - Location discovery → Distance calculation: calculates distance
backend/controllers/locationController.js - Order management → Order records: reads/writes
backend/controllers/orderController.js - Order management → User records: reads
backend/controllers/orderController.js - Order management → Vendor records: reads
backend/controllers/orderController.js - Database connection → MongoDB: connects
- Interactive maps → OpenStreetMap: uses map data