How hardikluhar/staymate-roommate-apartment-finding-web-application-public works
StayMate is a rental marketplace for seekers and property owners, with an admin surface. The principal journey is: a user registers or logs in, completes role-specific setup, a seeker discovers listings and expresses interest, an owner manages listings and requests, and a seeker reserves a listing and signs an agreement. The graph shows the documented client routes and server API capabilities; source excerpts do not expose most client API calls, so those links are marked unverified rather than asserted as observed calls.
Main entry points: App.jsx Route application · index.js HTTP route registry · SeekerDashboard.jsx Seeker discovery · db.js MySQL connection
Components 30
Web client
- Route application
client/src/App.jsx - Auth state
client/src/context/AuthContext.jsx - Route guards
client/src/components/ProtectedRoute.jsx - Setup guard
client/src/components/SetupRoute.jsx - Login and signup
client/src/pages/Login.jsx - Marketplace landing
client/src/pages/Landing.jsx - Owner listings
client/src/pages/owner/OwnerOverview.jsx - Owner requests
client/src/pages/owner/OwnerRequests.jsx - Owner settings
client/src/pages/owner/OwnerSettings.jsx - Seeker discovery
client/src/pages/seeker/SeekerDashboard.jsx - Seeker profile
client/src/pages/seeker/SeekerProfile.jsx - Owner setup
client/src/pages/setup/OwnerSetup.jsx - Seeker setup
client/src/pages/setup/SeekerSetup.jsx - Admin console
client/src/pages/admin/AdminListings.jsx - Agreement interface
client/src/components/AgreementModal.jsx
API and domain services
- HTTP route registry
server/index.js - Authentication API
server/routes/auth.js - Listings API
server/routes/listings.js - Interest workflow
server/routes/interests.js - Reservations
server/routes/reservations.js - Agreement API
server/routes/agreements.js - Agreement generator
server/utils/agreementGenerator.js - Profile API
server/routes/profile.js - Notifications API
server/routes/notifications.js - Occupants API
server/routes/occupants.js - Admin API
server/routes/admin.js - Token verification
server/middleware/auth.js
Persistence
- MySQL connection
server/config/db.js - Marketplace tables
server/init_db.js
Other components
- Marketplace user
Connections 45
- Marketplace user → Route application: opens
client/src/App.jsx - Route application → Auth state: provides auth
client/src/App.jsx - Route application → Marketplace landing: routes to
client/src/App.jsx - Route application → Login and signup: routes to
client/src/App.jsx - Route application → Route guards: guards role routes
client/src/App.jsx - Route application → Setup guard: guards setup
client/src/App.jsx - Route application → Owner listings: routes to
client/src/App.jsx - Route application → Owner requests: routes to
client/src/App.jsx - Route application → Owner settings: routes to
client/src/App.jsx - Route application → Seeker discovery: routes to
client/src/App.jsx - Route application → Seeker profile: routes to
client/src/App.jsx - Route application → Owner setup: routes to
client/src/App.jsx - Route application → Seeker setup: routes to
client/src/App.jsx - Route application → Admin console: routes to
client/src/App.jsx - Owner requests → Agreement interface: renders
client/src/pages/owner/OwnerRequests.jsx - Seeker discovery → Agreement interface: renders
client/src/pages/seeker/SeekerDashboard.jsx - Login and signup → Auth state: uses
client/src/pages/Login.jsx - Owner listings → Listings API: requests listings
- Seeker discovery → Listings API: loads listings
- Owner requests → Interest workflow: manages interests
- Seeker discovery → Interest workflow: submits interest
- Seeker discovery → Reservations: creates reservations
- Agreement interface → Agreement API: signs agreement
- Owner settings → Profile API: updates profile
- Seeker discovery → Notifications API: loads notices
- Owner listings → Occupants API: manages occupants
- Admin console → Admin API: admin actions
- HTTP route registry → Authentication API: mounts
server/index.js - HTTP route registry → Listings API: mounts
server/index.js - HTTP route registry → Interest workflow: mounts
server/index.js - HTTP route registry → Reservations: mounts
server/index.js - HTTP route registry → Agreement API: mounts
server/index.js - HTTP route registry → Profile API: mounts
server/index.js - HTTP route registry → Notifications API: mounts
server/index.js - HTTP route registry → Occupants API: mounts
server/index.js - HTTP route registry → Admin API: mounts
server/index.js - Authentication API → MySQL connection: queries
server/routes/auth.js - Listings API → MySQL connection: queries
server/routes/listings.js - Interest workflow → MySQL connection: queries
server/routes/interests.js - Reservations → MySQL connection: queries
server/routes/reservations.js - Agreement API → MySQL connection: queries
server/routes/agreements.js - Agreement API → Agreement generator: generates HTML
server/routes/agreements.js - Agreement API → Token verification: verifies token
server/routes/agreements.js - Reservations → Token verification: verifies token
server/routes/reservations.js - MySQL connection → Marketplace tables: initializes schema
server/init_db.js