How sdev2451-team1/earthbnb works
EarthBnB is a property-rental application with a Django REST backend and React frontend. The intended guest workflow is to set search filters, request paginated property results, and view property cards; the backend provides property and booking APIs alongside host management and JWT-based user authentication. The frontend also includes authentication and API client modules. Several frontend views and backend booking/property implementations are unsampled or TODOs, so uncertain runtime links are omitted; README capabilities are retained as documented subsystems.
Main entry points: client.js API client · booking_app/views.py Django REST API · core/views.py User endpoints · SearchResults.jsx Search results
Components 23
Guest frontend
- App shell
booking_project_frontend/src/App.jsx - Search filters
booking_project_frontend/src/contexts/PropertySearchFiltersContext.jsx - Filters hook
booking_project_frontend/src/hooks/usePropertySearchFilters.js - Search results
booking_project_frontend/src/components/property/SearchResults.jsx - Results pagination
booking_project_frontend/src/components/property/SearchResultsPagination.jsx - Property card
booking_project_frontend/src/components/property/PropertyCard.jsx - API client
booking_project_frontend/src/api/client.js - Property API
booking_project_frontend/src/api/properties.js - Authentication API
booking_project_frontend/src/api/auth.js - Booking API
booking_project_frontend/src/api/bookings.js - Host API
booking_project_frontend/src/api/hosts.js
Backend API
- Django REST API
booking_project_backend/booking_app/views.py
Identity and access
- User endpoints
booking_project_backend/core/views.py - User profile
booking_project_backend/core/models.py - User serializers
booking_project_backend/core/serializers.py - Authentication routes
booking_project_backend/core/urls.py
Rental domain
- Property data
booking_project_backend/booking_app/models.py - Booking data
booking_project_backend/booking_app/models.py - Rental serializers
booking_project_backend/booking_app/serializers.py - Property filtering
booking_project_backend/booking_app/filters.py - Rental routes
booking_project_backend/booking_app/urls.py
Other components
- Guest
- HTTP API
Connections 20
- Guest → Search filters: sets filters
booking_project_frontend/src/contexts/PropertySearchFiltersContext.jsx - Filters hook → Search filters: reads context
booking_project_frontend/src/hooks/usePropertySearchFilters.js - Results pagination → Filters hook: reads page
booking_project_frontend/src/components/property/SearchResultsPagination.jsx - Search results → Property card: renders cards
booking_project_frontend/src/components/property/SearchResults.jsx - App shell → Guest: serves interface
- Search results → Property API: requests listings
- Property API → API client: sends requests
booking_project_frontend/src/api/properties.js - Authentication API → API client: sends requests
booking_project_frontend/src/api/auth.js - Host API → API client: sends requests
booking_project_frontend/src/api/hosts.js - Booking API → API client: sends requests
- HTTP API → API client: HTTP requests
- Rental routes → Django REST API: routes requests
- Django REST API → Property filtering: filters listings
- Django REST API → Rental serializers: serializes results
- Rental serializers → Property data: serializes data
- Booking API → Booking data: manages bookings
- Host API → Property data: manages listings
- Authentication routes → User endpoints: routes requests
booking_project_backend/core/urls.py - User endpoints → User profile: reads profile
booking_project_backend/core/views.py - User endpoints → User serializers: uses serializer