Skip to content

alexandramilliron/Take-a-Walk

Repository files navigation

Welcome to Take a Walk!

This app allows the user to generate nearby restaurants and trails for an outing and leave reviews on how COVID-safe they were.

Backend:

  • Flask
  • PostgreSQL
  • SQLAlchemy

Frontend:

  • React

Styling:

  • React Bootstrap

APIs:

  • Hiking Project API (deprecated)
  • Open Weather Map API
  • Yelp Fusion API

Running Project Locally

NOTE: The Hiking Project Data API has been deprecated, but those with existing API keys still have access to the API endpoints. For other users, the functionality of the app will be impacted. The instructions are included below for those with access to an API key.

The project assumes the user has Python3 and PostgreSQL installed. Using the Python virtualenv tool is recommended.

Steps

  1. Clone the repository

  2. Install the requirements pip3 install -r requirements.txt

  3. Seed the database python3 seed_database.py - this will drop and create the takeawalk database that the project relies on

  4. The project requires API keys. These can be obtained at the following links:

  1. Set the following environment variables:
  • YELP_KEY="YOUR_KEY"
  • HIKING_PROJECT_KEY="YOUR_KEY2"
  • OPEN_WEATHER_KEY="YOUR_KEY3"
  1. Run the application python3 server.py

Users can register / login to existing accounts.

To start a new walk, the user clicks the button on the homepage or in the navigation bar. The New Walk component prompts the user for the zipcode where they'd like to walk and the date they'd like to go.

Restaurants and trails are generated via fetch requests to the Hiking Project and Yelp Fusion APIs, respectively. When the user submits their choices, the app routes to the Saved Walks component, which sends a fetch request to the server to display all of the walks for the user sorted by date.

The app also generates the weather for each walk based on the date and location via a fetch request to the Open Weather Map API.

On the Saved Walks component, the user can rate the restaurants and trails. The Restaurant Rating and Trail Rating components prompt the user for information related to COVID safety.

Both components route to the User Ratings component upon submission, which displays all ratings for the logged-in user.

The user can access more information about a particular restaurant or trail by clicking on the rating. This loads additional information retrieved via fetch requests to the Hiking Project and Yelp Fusion APIs.

The user has access to all of the restaurants and trails stored in the database sorted by state. These pages display the aggregated ratings from all users if available; otherwise, they show that no reviews have been added.

Finally, both of these pages also link to the detail pages for particular restaurants and trails, respectively.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published