How komal251205/localconnect works
LocalConnect is a local-services marketplace. Customers browse and filter services, inspect provider and review details, then book; providers manage service listings and bookings, while admins have a separate dashboard. The frontend also supports accounts, profiles, recommendations, and review flows. The backend exposes corresponding API routes backed by MongoDB models, with JWT authentication and role checks. Source excerpts directly establish the service-detail and booking flow; other feature branches are included from the source index and file tree, with only evidenced connections shown.
Main entry points: App.jsx Application router · server.js API server · auth.js JWT and role checks · ServiceDetail.jsx Service detail and booking
Components 25
Marketplace frontend
- Application router
frontend/src/App.jsx - Theme state
frontend/src/context/ThemeContext.jsx - Service discovery
frontend/src/pages/Services.jsx - Home and recommendations
frontend/src/pages/Home.jsx - Service card
frontend/src/components/ServiceCard.jsx - Service detail and booking
frontend/src/pages/ServiceDetail.jsx - Customer bookings
frontend/src/pages/MyBookings.jsx
Identity and access
- Authentication state
frontend/src/context/AuthContext.jsx - Login and registration
frontend/src/pages/Register.jsx - Authentication routes
routes/auth.js - JWT and role checks
middleware/auth.js
Marketplace API
- Service catalog API
routes/services.js - Booking API
routes/bookings.js - Review API
routes/reviews.js - AI recommendations API
routes/ai.js - API server
server.js
Account operations
- User profile
frontend/src/pages/Profile.jsx - Provider dashboard
frontend/src/pages/ProviderDashboard.jsx - Admin dashboard
frontend/src/pages/AdminDashboard.jsx - User operations API
routes/users.js
MongoDB domain
- User records
models/User.js - Service records
models/Service.js - Booking records
models/Booking.js - Review records
models/Review.js
Other components
- Customer / provider
Connections 40
- Customer / provider → Application router: uses
frontend/src/App.jsx - Application router → Authentication state: provides auth
frontend/src/App.jsx - Application router → Theme state: provides theme
frontend/src/App.jsx - Application router → Home and recommendations: routes to
frontend/src/App.jsx - Application router → Service discovery: routes to
frontend/src/App.jsx - Application router → Service detail and booking: routes to
frontend/src/App.jsx - Application router → Login and registration: routes to
frontend/src/App.jsx - Application router → Customer bookings: routes to
frontend/src/App.jsx - Application router → User profile: routes to
frontend/src/App.jsx - Application router → Provider dashboard: routes to
frontend/src/App.jsx - Application router → Admin dashboard: routes to
frontend/src/App.jsx - Home and recommendations → Service card: renders
frontend/src/pages/Home.jsx - Service discovery → Service card: renders
frontend/src/pages/Services.jsx - Login and registration → Authentication state: uses auth
frontend/src/pages/Register.jsx - User profile → Authentication state: uses auth
frontend/src/pages/Profile.jsx - Provider dashboard → Authentication state: uses auth
frontend/src/pages/ProviderDashboard.jsx - Service detail and booking → Service catalog API: fetches service
frontend/src/pages/ServiceDetail.jsx - Service detail and booking → Review API: fetches reviews
frontend/src/pages/ServiceDetail.jsx - Service detail and booking → Booking API: submits booking
frontend/src/pages/ServiceDetail.jsx - API server → Authentication routes: mounts routes
server.js - API server → Service catalog API: mounts routes
server.js - API server → Booking API: mounts routes
server.js - API server → Review API: mounts routes
server.js - API server → User operations API: mounts routes
server.js - API server → AI recommendations API: mounts routes
server.js - Authentication routes → JWT and role checks: uses tokens
routes/auth.js - Service catalog API → JWT and role checks: protects writes
routes/services.js - Service catalog API → Service records: reads and writes
routes/services.js - Booking API → JWT and role checks: protects routes
routes/bookings.js - Booking API → Booking records: reads and writes
routes/bookings.js - Review API → JWT and role checks: protects writes
routes/reviews.js - Review API → Review records: reads and writes
routes/reviews.js - JWT and role checks → User records: loads user
middleware/auth.js - Authentication routes → User records: authenticates users
routes/auth.js - User operations API → User records: manages users
routes/users.js - User operations API → Service records: queries services
routes/users.js - User operations API → Booking records: queries bookings
routes/users.js - AI recommendations API → Service records: queries services
routes/ai.js - Review records → User records: updates ratings
models/Review.js - Review records → Service records: updates ratings
models/Review.js