How dryofficer21/airbnb_clone_v4 works
This repository is an AirBnB-clone project spanning an object-management console, a REST API, and Flask-based web examples. The principal data workflow is a client request entering the API, reaching a resource handler, and reading or mutating domain objects through storage; the console provides a separate object-management entry point. The domain includes users, locations, places, amenities, and reviews, backed by file or database storage. The README documents the console capabilities; web and API links reflect the tree and available source references, with unsampled details omitted.
Main entry points: __init__.py Route registration · places_reviews.py Review routes · state.py States and cities · place.py Place entity
Components 22
User interfaces
- Object console
console.py - Web examples
web_flask - Dynamic web
web_dynamic
REST API
- API application
api/v1/app.py - Route registration
api/v1/views/__init__.py - Location routes
api/v1/views/states.py - City routes
api/v1/views/cities.py - User routes
api/v1/views/users.py - Amenity routes
api/v1/views/amenities.py - Place routes
api/v1/views/places.py - Place amenities
api/v1/views/places_amenities.py - Review routes
api/v1/views/places_reviews.py
Domain model
- Base entity
models/base_model.py - States and cities
models/state.py - User entity
models/user.py - Place entity
models/place.py - Amenity entity
models/amenity.py - Review entity
models/review.py
Persistence
- File storage
models/engine/file_storage.py - Database storage
models/engine/db_storage.py
Other components
- API client
- MySQL database
Connections 27
- API client → API application: sends requests
api/v1/app.py - API application → Route registration: registers routes
api/v1/app.py - Route registration → Location routes: registers
api/v1/views/__init__.py - Route registration → City routes: registers
api/v1/views/__init__.py - Route registration → User routes: registers
api/v1/views/__init__.py - Route registration → Amenity routes: registers
api/v1/views/__init__.py - Route registration → Place routes: registers
api/v1/views/__init__.py - Route registration → Place amenities: registers
api/v1/views/__init__.py - Route registration → Review routes: registers
api/v1/views/__init__.py - Object console → Base entity: manages objects
README.md - Object console → File storage: persists objects
README.md - Location routes → States and cities: reads and writes
- City routes → States and cities: reads and writes
api/v1/views/cities.py - User routes → User entity: reads and writes
api/v1/views/users.py - Amenity routes → Amenity entity: reads and writes
api/v1/views/amenities.py - Place routes → Place entity: reads and writes
api/v1/views/places.py - Place amenities → Place entity: updates associations
api/v1/views/places_amenities.py - Place amenities → Amenity entity: reads associations
api/v1/views/places_amenities.py - Review routes → Review entity: creates and updates
api/v1/views/places_reviews.py - Review routes → Place entity: reads place
api/v1/views/places_reviews.py - Review routes → User entity: validates user
api/v1/views/places_reviews.py - Base entity → File storage: saves and deletes
models/base_model.py - File storage → Base entity: rehydrates objects
models/engine/file_storage.py - Database storage → MySQL database: queries and commits
models/engine/db_storage.py - Dynamic web → States and cities: loads domain data
web_dynamic/0-hbnb.py - Dynamic web → Place entity: loads domain data
web_dynamic/0-hbnb.py - Web examples → States and cities: loads domain data
web_flask/8-cities_by_states.py