How aryallaxman99/communalstay works
CommunalStay is a React-and-Express marketplace for finding and listing stays, managing accounts, and making reservations. The main journey is browsing or searching stays, viewing a listing, booking it, and later reviewing or cancelling reservations; hosts can also manage listings and see booking requests. Separate account flows cover registration, login, profile updates, and OTP-based password recovery. README capabilities also include map-based location, nearby and flexible-place discovery, profile photos, and scrolling. The graph follows documented routes and sampled calls; several client features are documented but their implementation links are not shown.
Main entry points: Requests.js API requests · Layout.js Navigation and routes · index.js Express API · reserveController.js Reservation services
Components 31
Client experience
- React app
client/src/App.js - Navigation and routes
client/src/Containers/Layout/Layout.js - Stay discovery
client/src/Containers/Places/Places.jsx - Stay search
client/src/Containers/Places/SearchResultPage.jsx - Stay details
client/src/Containers/Places/PlacePage.jsx - Host listing form
client/src/Containers/Places/PlacesForm.jsx - Booking UI
client/src/Containers/Places/BookingPage.jsx - Map discovery
client/src/Components/maps/PlaceAddressPlot.js - Host dashboard
client/src/Containers/Admin/Dashboard.jsx - Reservation management
client/src/Containers/Pages/ReservedPlaces.jsx - Profile and photos
client/src/Containers/User/Profile.jsx - API requests
client/src/Requests.js
API workflows
- Express API
server/index.js - Stay routes
server/routes/places.js - Stay services
server/controllers/placesController.js - Reservation routes
server/routes/reserve.js - Reservation services
server/controllers/reserveController.js - Photo upload routes
server/routes/uploadPhoto.js - Photo upload handler
server/controllers/uploadPhotoController.js
Persistence
- User records
server/models/UserModel.js - Stay records
server/models/PlaceModel.js - Reservation records
server/models/ReserveModel.js - OTP records
server/models/OtpModel.js
Identity and recovery
- Auth routes
server/routes/auth.js - Account services
server/controllers/authController.js - OTP recovery
server/controllers/otpController.js - SMS delivery
server/services/sendOTP.js - Token handling
server/helpers/jwtHelper.js
Other components
- Visitor
- Aakash SMS
- Google Maps
Connections 36
- Visitor → React app: opens
client/src/App.js - React app → Navigation and routes: renders
client/src/App.js - Navigation and routes → Stay discovery: routes to
client/src/Containers/Layout/Layout.js - Navigation and routes → Stay search: routes to
client/src/Containers/Layout/Layout.js - Navigation and routes → Stay details: routes to
client/src/Containers/Layout/Layout.js - Navigation and routes → Host listing form: routes to
client/src/Containers/Layout/Layout.js - Navigation and routes → Booking UI: routes to
client/src/Containers/Layout/Layout.js - Stay discovery → API requests: requests data
- Stay search → API requests: requests search
- Stay details → API requests: requests details
- Booking UI → API requests: submits booking
- Host listing form → API requests: submits listing
- Map discovery → API requests: requests stays
client/src/Components/maps/PlaceAddressPlot.js - Map discovery → Google Maps: plots locations
- API requests → Express API: calls API
client/src/Requests.js - Express API → Auth routes: mounts /auth
server/index.js - Express API → Stay routes: mounts /places
server/index.js - Express API → Reservation routes: mounts /reservation
server/index.js - Express API → Photo upload routes: mounts /uploads
server/index.js - Auth routes → Account services: dispatches
server/routes/auth.js - Account services → User records: reads and writes
server/controllers/authController.js - Account services → Token handling: signs tokens
server/controllers/authController.js - OTP recovery → SMS delivery: sends codes
server/controllers/otpController.js - OTP recovery → User records: updates accounts
server/controllers/otpController.js - SMS delivery → OTP records: stores codes
server/services/sendOTP.js - SMS delivery → Aakash SMS: sends SMS
server/services/sendOTP.js - Stay routes → Stay services: dispatches
server/routes/places.js - Stay services → Stay records: reads and writes
server/controllers/placesController.js - Reservation routes → Reservation services: dispatches
server/routes/reserve.js - Reservation services → Reservation records: reads and writes
server/controllers/reserveController.js - Reservation services → Stay records: checks capacity
server/controllers/reserveController.js - Reservation services → User records: loads guest
server/controllers/reserveController.js - Photo upload routes → Photo upload handler: dispatches
server/routes/uploadPhoto.js - Host dashboard → API requests: manages stays
- Reservation management → API requests: manages bookings
- Profile and photos → API requests: updates profile
client/src/Containers/User/Profile.jsx