What The Truck is inspired by Yelp, an app that allows users to explore businesses and leave ratings and reviews for others to see. What The Truck allows users to explore food trucks, add new food trucks as owners, and rate/review food trucks they visit. The purpose is to share crowdsourced information about food trucks local to a user.
-
Sign up as a new user, log in as a returning user, or log in as a demo user
-
Food Trucks
- Create a food truck
- Read all food trucks in the app
- Read all food trucks the current user owns
- Edit a food truck the current user owns
- Delete a food truck the current user owns
-
Reviews/Ratings
- Create a review and rating for a food truck
- Read all reviews and ratings, as well as average rating for a food truck
- Edit a review and rating the current user created
- Delete a review and rating the current user created
-
Search
- Users can search for food trucks by name, cuisine, or city
-
Google Maps API Integration
- Geocoding enables user to pinpoint food trucks they own on a map by inputting the food truck address
- Front End:
- React
- Redux
- Back End:
- Python
- PostgreSQL
- Flask
- SQLAlchemy
- Deployment:
- Docker
The splash page gives both logged out and logged in users a teaser of the site, but logged out users are not able to access any of the site's core features until they sign up or log in.
Upon logging in, a user can explore all food trucks or go to their food trucks page. The My Food Trucks page lists all food trucks a user owns with overview information about the truck, from here they can click on a specific food truck card to see that truck's details and reviews.
From the My Food Trucks page a user can click the "+ Add a new food truck" button to open a modal and create a new food truck for customers to enjoy.
The All Food Trucks page renders food truck overview cards for each food truck, regardless of owner. From here, the user can click a food truck card to go to that food truck's detail page.
Each food truck has a detail page that renders all information about the food truck, as well as its overall average rating, and all associated reviews and their ratings. If a user does not own the food truck, they have the option to submit a review or edit a review via a modal form, as well as delete a previously written review. Users can only submit one review per food truck.
To run What The Truck locally follow the instructions below.
-
Clone this repo with the following terminal command:
git clone git@github.com:Joan-Buck/capstone-project.git
-
In the front end directory
capstone/react-app
, install the dependencies from the package.json with the following terminal command:npm install
-
In the root directory
capstone/
, install the dependencies from the Pipfile with the following terminal command:pipenv install
-
Create a user in PostgreSQL with the following command in psql:
CREATE USER foodtruck_user WITH PASSWORD <password> CREATEDB;
-
Create the database in PostgreSQL with the following command in psql:
CREATE DATABASE foodtruck_app WITH OWNER foodtruck_user;
-
In the root directory, create a .env file using the .env.example file.
-
Run the terminal command
pipenv shell
and then upgrade your database with the following terminal command:flask db upgrade
-
Run the following terminal command to seed your database:
flask seed all
-
Start the back end server in the root directory with the following terminal command:
flask run
-
In the front end directory,
capstone/react-app
, run the following terminal command to start the front end server:npm start
-
Go to
localhost:3000
in your browser.