How hhari1234/househunt works
HouseHunt is a real-estate marketplace. Users browse and filter published homes, inspect listings, then sign in to save favorites, request bookings, manage listings and their account; administrators manage marketplace users, properties and bookings. The frontend routes those experiences to a versioned REST API, whose controllers delegate business operations to services and persistent MongoDB models. The README documents uploads and image storage as another capability. Some frontend page-to-API and route-to-controller wiring is not shown in the excerpts, so those links are omitted or marked unverified.
Main entry points: AppRoutes.jsx Page routing · index.v1.js Versioned routes · admin.controller.js Admin handlers · property.service.js Property search and lifecycle
Components 31
Marketplace frontend
- React application
frontend/src/App.js - Page routing
frontend/src/routes/AppRoutes.jsx - Home and explore
frontend/src/pages/ExplorePage.jsx - Listing details
frontend/src/pages/ListingDetails.jsx - Sign-in and registration
frontend/src/hooks/useAuth.js - Create listing
frontend/src/pages/CreateListing.jsx - Saved homes
frontend/src/pages/FavoritesPage.jsx - Bookings
frontend/src/pages/BookingsPage.jsx - Account
frontend/src/pages/AccountPage.jsx - Admin dashboard
frontend/src/pages/AdminDashboard.jsx - API client
frontend/src/services/api.js
REST API
- API server
backend/server.js - Versioned routes
backend/routes/api.v1/index.v1.js - Authentication handlers
backend/controllers/auth.controller.js - Admin handlers
backend/controllers/admin.controller.js - Property handlers
backend/controllers/property.controller.js - Booking handlers
backend/controllers/booking.controller.js - Favorites handlers
backend/controllers/favorites.controller.js - User handlers
backend/controllers/user.controller.js
Marketplace services
- Auth and profile
backend/services/auth.service.js - Property search and lifecycle
backend/services/property.service.js - Booking operations
backend/services/booking.service.js - Favorite operations
backend/services/favorites.service.js - User administration
backend/services/user.service.js
Persistence and media
- MongoDB
backend/config/database.js - Property records
backend/models/Property.js - Booking records
backend/models/Booking.js - Favorite records
backend/models/Favorite.js - User records
backend/models/User.js - Uploaded listing photos
backend/services/image.store.js
Other components
- Visitor or member
Connections 37
- Visitor or member → React application: uses
README.md - React application → Page routing: renders
frontend/src/App.js - Page routing → Home and explore: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → Listing details: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → Sign-in and registration: uses auth
frontend/src/routes/AppRoutes.jsx - Page routing → Create listing: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → Saved homes: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → Bookings: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → Account: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → Admin dashboard: routes to
frontend/src/routes/AppRoutes.jsx - Sign-in and registration → API client: calls
frontend/src/hooks/useAuth.js - API server → MongoDB: connects
backend/server.js - API server → Versioned routes: mounts
backend/server.js - API server → Uploaded listing photos: reads images
backend/server.js - Versioned routes → Authentication handlers: dispatches
- Versioned routes → Property handlers: dispatches
- Versioned routes → Booking handlers: dispatches
- Versioned routes → Favorites handlers: dispatches
- Versioned routes → Admin handlers: dispatches
- Versioned routes → User handlers: dispatches
- Authentication handlers → Auth and profile: delegates
backend/controllers/auth.controller.js - Admin handlers → Property search and lifecycle: queries
backend/controllers/admin.controller.js - Admin handlers → Booking operations: queries
backend/controllers/admin.controller.js - Admin handlers → User administration: queries
backend/controllers/admin.controller.js - Property handlers → Property search and lifecycle: delegates
backend/controllers/property.controller.js - Booking handlers → Booking operations: delegates
backend/controllers/booking.controller.js - Favorites handlers → Favorite operations: delegates
backend/controllers/favorites.controller.js - Auth and profile → User records: reads and writes
backend/services/auth.service.js - Property search and lifecycle → Property records: queries
backend/services/property.service.js - Property search and lifecycle → Booking records: cleans bookings
backend/services/property.service.js - Booking operations → Booking records: reads and writes
backend/services/booking.service.js - Booking operations → Property records: checks listing
backend/services/booking.service.js - Favorite operations → Property records: reads listings
backend/services/favorites.service.js - Favorite operations → Favorite records: reads and writes
backend/services/favorites.service.js - User administration → User records: manages users
- Admin handlers → Property records: updates status
backend/controllers/admin.controller.js - Admin handlers → User records: updates status
backend/controllers/admin.controller.js