How shane-anne/h-a-cozy-pad-booking-system works
H&A Cozy Pad is a lodging-booking marketplace with guest discovery and reservations, host property management, and administrative tools. The main flow is routed through the React app: guests search listings, open a booking page, and check date availability; hosts manage listings and reservations, while users can view trips and profile information. PHP endpoints provide the visible login, availability, FAQ, and listing/booking operations, with database access in the shared PHP database module. The tree also includes a calendar server and calendar page; their connection is not established by the excerpts.
Main entry points: App.jsx App routes · AuthModal.jsx Sign-in · HomePage.jsx Home and search · Bookingconfirmation.jsx Booking and availability
Components 29
Application and identity
- App routes
src/App.jsx - Sign-in
src/components/AuthModal.jsx - Google sign-in button
src/components/GoogleAuthButton.jsx
Guest experience
- Home and search
src/pages/home_page/HomePage.jsx - Search section
src/pages/home_page/SearchSection.jsx - Property results
src/pages/home_page/PropertySection.jsx - Property details
src/pages/ListedProperty.jsx - Booking and availability
src/pages/booking_page/Bookingconfirmation.jsx - Trips
src/pages/Trips.jsx - Profile
src/pages/Profile.jsx - Help center
src/pages/faq_page/HelpCenter.jsx - Chatbot
src/components/Chatbot.jsx
Host operations
- Listing workflow
src/pages/listing_page - Listing draft state
src/lib/listingDraft.js - Host listings
src/pages/dashboard_page/DashboardListings.jsx - Reservation management
src/pages/dashboard_page/DashboardReservations.jsx - Host calendar
src/pages/dashboard_page/DashboardCalendar.jsx - User management
src/pages/dashboard_page/UserManagement.jsx - FAQ management
src/pages/faq_page/FaqManagement.jsx
API and persistence
- API base URL
src/lib/api.js - Login endpoint
api/login.php - Google login endpoint
api/google_login.php - Availability endpoint
api/check_availability.php - FAQ endpoint
api/faqs.php - Booking endpoint
api/create_booking.php - Listing endpoint
api/create_listing.php - PHP database access
api/db.php - Calendar service
server/google-calendar-server.mjs
Other components
- Guest or host
Connections 24
- Guest or host → App routes: opens app
src/App.jsx - App routes → Home and search: routes to
src/App.jsx - App routes → Booking and availability: routes to
src/App.jsx - App routes → Trips: routes to
src/App.jsx - App routes → Profile: routes to
src/App.jsx - App routes → Help center: routes to
src/App.jsx - App routes → Host listings: routes to
src/App.jsx - App routes → Reservation management: routes to
src/App.jsx - App routes → Host calendar: routes to
src/App.jsx - App routes → User management: routes to
src/App.jsx - App routes → FAQ management: routes to
src/App.jsx - Sign-in → Login endpoint: submits login
src/components/AuthModal.jsx - Sign-in → Google sign-in button: renders
src/components/AuthModal.jsx - Sign-in → Google login endpoint: submits credential
src/components/AuthModal.jsx - Home and search → Search section: renders
- Home and search → Property results: renders
- Booking and availability → Availability endpoint: checks dates
src/pages/booking_page/Bookingconfirmation.jsx - FAQ management → FAQ endpoint: saves FAQs
src/pages/faq_page/FaqManagement.jsx - Host listings → Listing draft state: uses draft
src/pages/dashboard_page/DashboardListings.jsx - Booking endpoint → PHP database access: uses database
api/create_booking.php - Listing endpoint → PHP database access: uses database
api/create_listing.php - Booking and availability → Booking endpoint: creates booking
- Host listings → Listing endpoint: manages listings
- Host calendar → Calendar service: calendar integration