How johnseltan032-web/h-a-cozy-pad works
H&A Cozy Pad is a vacation-rental marketplace with guest booking and trip management, host listing and reservation tools, and administrative features. The principal flow routes visitors through property discovery, listing details and booking confirmation; hosts manage listings, reservations and calendar availability. PHP endpoints provide backend capabilities and a shared database connection. The README is empty, and many endpoint and page implementations were not sampled, so unsourced runtime links are omitted rather than inferred.
Main entry points: App.jsx Route and auth state · AuthModal.jsx Sign-in · login.php Authentication endpoints · db.php MySQL connection
Components 24
Application
- Route and auth state
src/App.jsx - Sign-in
src/components/AuthModal.jsx - Google sign-in button
src/components/GoogleAuthButton.jsx - Google auth config
src/lib/googleAuth.js
Guest Experience
- Home and search
src/pages/home_page/HomePage.jsx - Property details
src/pages/ListedProperty.jsx - Booking confirmation
src/pages/booking_page/Bookingconfirmation.jsx - Booking submission
src/pages/booking_page/Bookingconfirmation_2.jsx - Guest trips
src/pages/Trips.jsx - Account profile
src/pages/Profile.jsx - Help and FAQs
src/pages/faq_page/HelpCenter.jsx
Host Management
- Listing creation flow
src/pages/listing_page - Listing draft state
src/lib/listingDraft.js - Host listings
src/pages/dashboard_page/DashboardListings.jsx - Reservations
src/pages/dashboard_page/DashboardReservations.jsx - Calendar and blocks
src/pages/dashboard_page/DashboardCalendar.jsx - Host dashboard
src/pages/dashboard_page/dashboardOverview.jsx - Host inbox
src/pages/dashboard_page/Inbox.jsx
Backend Services
- API configuration
src/lib/api.js - Booking endpoints
api/create_booking.php - Authentication endpoints
api/login.php - Availability endpoints
api/blocked_dates.php - MySQL connection
api/db.php
Other components
- Visitor / user
Connections 24
- Visitor / user → Route and auth state: opens app
- Route and auth state → Sign-in: renders
src/App.jsx - Route and auth state → Home and search: routes to
src/App.jsx - Route and auth state → Guest trips: routes to
src/App.jsx - Route and auth state → Account profile: routes to
src/App.jsx - Route and auth state → Help and FAQs: routes to
src/App.jsx - Route and auth state → Host listings: routes to
src/App.jsx - Route and auth state → Reservations: routes to
src/App.jsx - Route and auth state → Calendar and blocks: routes to
src/App.jsx - Route and auth state → Host dashboard: routes to
src/App.jsx - Route and auth state → Host inbox: routes to
src/App.jsx - Route and auth state → Booking confirmation: routes to
src/App.jsx - Route and auth state → Authentication endpoints: checks session
src/App.jsx - Sign-in → Authentication endpoints: posts login
src/components/AuthModal.jsx - Sign-in → Google sign-in button: renders
src/components/AuthModal.jsx - Google sign-in button → Google auth config: reads config
src/components/GoogleAuthButton.jsx - Sign-in → Google auth config: reads config
src/components/AuthModal.jsx - Booking submission → Booking endpoints: posts booking
src/pages/booking_page/Bookingconfirmation_2.jsx - Calendar and blocks → Availability endpoints: posts date blocks
src/pages/dashboard_page/DashboardCalendar.jsx - Listing creation flow → Listing draft state: updates draft
src/pages/listing_page/PlaceLocation.jsx - Listing creation flow → Listing draft state: updates draft
src/pages/listing_page/PlaceRate.jsx - Authentication endpoints → MySQL connection: uses connection
- Booking endpoints → MySQL connection: uses connection
- Availability endpoints → MySQL connection: uses connection