StayFinder: Your Ultimate Hotel Search Companion
StayFinder, a cutting-edge hotel search engine, redefines your booking experience. Leveraging Elasticsearch, this Python project enables seamless hotel discovery based on age, stars, name, city, and availability. With Builder and Filter Design Patterns, StayFinder provides a flexible, extensible structure for a personalized and efficient search.
- Smart Search: Effortlessly discover nearby hotels using age, stars, name, city, and availability criteria.
- Geo-Location Enabled: Precise location-based results with city center coordinates (latitude and longitude).
- Flexible Structure: Builder Design Pattern ensures fine control over complex hotel object creation.
- Filtering Options: Filter Design Pattern allows users to refine search results for a tailored experience.
- Python: Core language for development.
- Elasticsearch: Backend powerhouse for efficient result searching.
- Nginx and Flask: Dynamic duo for web server configuration and microservices API development.
-
Modify Elasticsearch connection in parameters.yml.
-
Run Docker Compose for the environment:
docker-compose up -d
-
Access the site at http://localhost:56733/test.
- Fill Elasticsearch with test data using:
docker exec -it python_app python src/command/fill_elasticsearch.py
-
Stop and remove containers:
docker-compose stop
-
Check logs:
docker logs python_app -f tail -f /var/log/uwsgi.log (inside container)
-
Refresh code:
docker exec -it python_app touch uwsgi.ini
-
Check coding standards:
docker exec -it python_app flake8
-
Run tests:
docker exec -it python_app pytest -s
- Using Swagger UI: http://localhost:56733/swagger-ui/
- Manually through direct URL: http://localhost:56733/hotels/search?size=10&n=star&lat=52.21&page=1&lng=21.01&age=5&c=warsaw&fpn=true
For more details on coding standards (Flake8), testing (Pytest), and documentation (Mock), refer to the following:
Usage:
- Explore the intuitive web interface to search for hotels based on your preferences.
- Customize your search using the provided filters for a tailored experience.
Enhance your hotel search journey with StayFinder - where efficiency meets elegance! ๐