How max-out-00/househive works
HouseHive is a rental marketplace: visitors browse properties, inspect details, and authenticated users can create listings or book stays; users can also view booking activity on a dashboard. The React client calls an Express API, whose route handlers use PostgreSQL for users, listings, images, and bookings. Image uploads are handled separately through Multer and stored under the uploads directory. The README documents overlap prevention and the reviews schema; review routes are not implemented. Edges reflect excerpts, SOURCE INDEX references, or README statements; unsampled internals are not inferred.
Main entry points: App.jsx React router · axiosInstance.js API client · pool.js Postgres pool · propertyRoutes.js Property routes
Components 26
Web client
- React router
src/App.jsx - Home browse
src/pages/Home.jsx - Property listings
src/pages/Listings.jsx - Property details
src/pages/PropertyDetails.jsx - Create listing
src/pages/CreateListing.jsx - Bookings dashboard
src/pages/Dashboard.jsx - Property card
src/components/PropertyCard.jsx - API client
src/api/axiosInstance.js
Identity and access
- Auth state
src/context/AuthContext.jsx - Login and signup
src/pages/Login.jsx - Protected routes
src/components/ProtectedRoute.jsx - User routes
backend/routes/userRoutes.js - User registration
backend/controllers/userController.js - Login and tokens
backend/controllers/authController.js - Password helper
backend/controllers/encrpt.js - JWT verification
backend/middleware/authMiddleware.js
Listings and bookings
- Property routes
backend/routes/propertyRoutes.js - Property operations
backend/controllers/propertyController.js - Image upload
backend/middleware/upload.js - Booking routes
backend/routes/bookingRoutes.js - Booking operations
backend/controllers/bookingController.js - Uploaded images
backend/uploads
API and persistence
- Express server
backend/server.js - Postgres pool
backend/db/pool.js - Rental data
backend/schema.sql
Other components
- Renter or host
Connections 35
- Renter or host → React router: uses
src/App.jsx - React router → Home browse: routes to
src/App.jsx - React router → Property listings: routes to
src/App.jsx - React router → Property details: routes to
src/App.jsx - React router → Create listing: guards and routes
src/App.jsx - React router → Bookings dashboard: guards and routes
src/App.jsx - Property listings → Property card: renders
src/pages/Listings.jsx - Home browse → Property listings: browses
- React router → Login and signup: routes to
src/App.jsx - React router → Protected routes: wraps
src/App.jsx - Protected routes → Auth state: checks
src/components/ProtectedRoute.jsx - Login and signup → Auth state: updates
src/pages/Login.jsx - Login and signup → API client: requests
src/pages/Login.jsx - Create listing → API client: requests
src/pages/CreateListing.jsx - Property listings → API client: requests
src/pages/Listings.jsx - Property details → API client: requests
src/pages/PropertyDetails.jsx - Bookings dashboard → API client: requests
src/pages/Dashboard.jsx - API client → Express server: calls API
README.md - Express server → User routes: mounts
backend/server.js - Express server → Property routes: mounts
backend/server.js - Express server → Booking routes: mounts
backend/server.js - User routes → User registration: dispatches
backend/routes/userRoutes.js - User routes → Login and tokens: dispatches
backend/routes/userRoutes.js - User registration → Password helper: imports helper
backend/controllers/userController.js - User registration → Postgres pool: queries
backend/controllers/userController.js - Login and tokens → Postgres pool: queries
backend/controllers/authController.js - Property routes → Property operations: dispatches
backend/routes/propertyRoutes.js - Property routes → JWT verification: protects
backend/routes/propertyRoutes.js - Property routes → Image upload: processes files
backend/routes/propertyRoutes.js - Property operations → Postgres pool: queries
backend/controllers/propertyController.js - Property operations → Uploaded images: records file paths
backend/controllers/propertyController.js - Booking routes → Booking operations: dispatches
backend/routes/bookingRoutes.js - Booking routes → JWT verification: protects
backend/routes/bookingRoutes.js - Booking operations → Postgres pool: checks and writes
backend/controllers/bookingController.js - Postgres pool → Rental data: connects to