albho / NeighbourEats

web app that allows neighbours to find, buy and sell food from each other

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NeighbourEats

A RESTful web API that allows users to buy and sell home-cooked food items with their local neighbours. Core features are built around the Google Maps API and includes an interactive map browsing interface, dynamic search, sorting, filtering.

Lighthouse Labs

Final project for Lighthouse Labs.
Created by Albert Ho, Ben Catton, and Christian Girling.
Check out our planning documents in the wiki tab!

Stack

Getting Started

Clone the project from githup using either HTTPS or SSH

  • HTTPS - git clone https://github.com/bkcatton/NeighbourEats.git
  • SSH - git clone git@github.com:bkcatton/NeighbourEats.git

API Keys Are Required to Run this App

  1. You will need your own google maps api key. Sign up for a free one here

    You must enable the following options from the google maps api dashboard:

    i. Distance Matrix API

    ii. Geocoding API

    iii. Maps JavaScript API

  2. You will need your own Stripe API key. Sign up for one here

  3. Assign both of the API keys to your own .env file in the /client directory. See the .env.example file for reference

  4. You may need to download an extension to allow CORS on your browser. We used this extension from the chrome web store.

Install PostgreSQL

  • Ensure you have PostgreSQL installed on your local machine.
  • Create a database on your local machine and put the appropriate keys to the .env file in the /server directory. See the .env.example file for reference.

Install Dependencies

To install server dependencies:

  1. Navigate to /server with cd server
  2. Install dependencies with npm install

To install client dependencies:

  1. Navigate to /client with cd client
  2. Install dependencies with npm install

Starting The App

  1. Open two different terminal windows, one for the server and one for the client
  2. Navigate to /server with cd server
  3. Seed database with the following command: npm run db:reset
  4. Start the server with nodemon index.js, or node index.js
  5. In your other terminal window, navigate to /client with cd client
  6. Start the client side with the following command: npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may see some lint errors in the console.

Using the App

You can filter options by walking time

Search by distance

Hover over a dish to see where it is on the map

Flag Hover

Search by dish name or by country

Search by Country of Origin

Search by multiple filters at the same time

Search by Multiple Filters

Main Page - browse for a dish

Browse

Cart - see all dishes in your cart

Cart

Current Orders - see what has been ordered from your available dishes

Current Orders

Previous Orders - see what you have ordered in the past

Previous Orders

Add a New Dish

Add a new dish

About

web app that allows neighbours to find, buy and sell food from each other


Languages

Language:JavaScript 96.2%Language:HTML 2.3%Language:CSS 1.1%Language:Shell 0.4%