A React app which displays data from a Firebase database. The app displays a list of restaurants. Each restaurant has a menu. A user can log in, add menu items from different restaurants to their cart, and place an order. Orders are stored in the database. A logged in user can create a new restaurant. When creating a new restaurant, the user is prompted to provide a name, description, address and photo. The address field uses Google Places Autocomplete to generate suggestions for valid addresses. If a restaurant is created with a valid address, its location is geocoded using the Google Maps API, and its location is placed on a map of restaurants.
Users can also upload additional photos for restaurants they have created. To view a restaurant's photos and upload a new photo, click on the profile image in the top left of a restaurant's menu page while logged in.
To login to the app use the following credentials: Email: admin@admin.com Password: password
-
Get a google API key at developers.google.com
-
Clone the repo
git clone https://github.com/seann1/food-order-react-app.git
-
Install NPM packages
npm install
-
Create .env.development and .env.production in root of repo
-
Add this env var to .env.development and .env.production
REACT_APP_API_KEY = YOUR_API_KEY;
-
run npm start in terminal:
npm start