How pujyank2006/hyperlocal-marketplace works
This is a hyperlocal marketplace with a React client and Express/MongoDB backend. The main user journey is account access, browsing the marketplace, managing a profile, and creating or viewing listings. The graph preserves those product areas and the backend’s auth, profile, and listing stages. Some frontend pages and listing-form implementation were not sampled, so uncertain client-to-endpoint wiring is omitted.
Main entry points: server.js HTTP server · App.js Route shell · profile.js Profile management · authRouter.js Auth routes
Components 20
Marketplace client
- Route shell
frontend/src/App.js - Marketplace home
frontend/src/pages/homePage.js - Login and signup
frontend/src/pages/loginPage.js - Dashboard
frontend/src/pages/dashboard.js - Profile management
frontend/src/pages/profile.js - Listing form
frontend/src/Components/createListing.js
Backend API
- HTTP server
Backend/server.js - Auth routes
Backend/routes/authRouter.js - Auth validation
Backend/middlewares/authMiddleware.js - Authentication
Backend/controllers/authController.js - Profile routes
Backend/routes/userDetailsRouter.js - Profile operations
Backend/controllers/userDetailsController.js - Listing routes
Backend/routes/listingsRouter.js - Listing operations
Backend/controllers/listingsController.js - Image upload storage
Backend/server.js
Persistence
- Database connection
Backend/connectDb.js - User records
Backend/models/user.js - Listing records
Backend/models/listings.js
Other components
- Marketplace user
- MongoDB
Connections 23
- Marketplace user → Route shell: uses
- Route shell → Marketplace home: routes
- Route shell → Login and signup: routes
- Route shell → Dashboard: routes
- Route shell → Profile management: routes
- Profile management → Listing form: renders
- Profile management → HTTP server: fetches profile
- HTTP server → Auth routes: mounts
- HTTP server → Profile routes: mounts
- HTTP server → Listing routes: mounts
- HTTP server → Image upload storage: stores images
- Auth routes → Auth validation: validates
- Auth routes → Authentication: dispatches
- Profile routes → Profile operations: dispatches
- Listing routes → Listing operations: dispatches
- Authentication → User records: reads and writes
- Profile operations → User records: reads and updates
- Listing operations → Listing records: reads and writes
- Listing operations → Image upload storage: records image paths
- HTTP server → Database connection: connects
- Database connection → MongoDB: opens connection
- User records → MongoDB: persists records
- Listing records → MongoDB: persists records