Skip to content

An internal dashboard that digitizes NSEVP's Food Hub production and tracks progress of farmers in the Group GAP program

License

Notifications You must be signed in to change notification settings

calblueprint/ks-web

Repository files navigation

Kamehameha Schools x NSEVP x Blueprint

Last updated: Dec 5, 2020 (by Nick Wong)

The web client for NSEVP's Food Hub Platform

1. Quickstart

SECTION 1️⃣: CLONE THIS PROJECT

  1. Click on 'Clone or Download' (green button near the top right) and copy the URL.
  2. Then in you desired directory, do git clone {COPIED URL HERE}

SECTION 2️⃣: SET UP ENVIRONMENT

The project uses a number of secrets that are passed via a .env file (for security reasons). We need to set this .env file now.

  1. In your top level directory (/ks-web, the same directory containing the src folder, package.json and a couple of other files), create a file called .env.

❗️NOTE: Any code in the that is enclosed in { } is meant to be replaced. Hence, if your API Key is "abcd", REACT_APP_AIRTABLE_API_KEY={YOUR API KEY HERE} yarn start is supposed to become REACT_APP_AIRTABLE_API_KEY=abcd yarn start. Note that the { } is replaced as well

== OUTDATED APP SECRETS ==

Talk to a dev on the team to get the updated project secrets. 2. Copy and paste the following into .env:

REACT_APP_AIRTABLE_ENDPOINT_URL=https://peoplepower-node.herokuapp.com
REACT_APP_SERVER_URL=https://peoplepower-node.herokuapp.com

REACT_APP_PAYPAL_CLIENT_ID={YOUR PAYPAL CLIENT ID}

REACT_APP_GOOGLE_API_KEY={YOUR GOOGLE API KEY}
REACT_APP_AIRTABLE_BASE_ID={AIRTABLE BASE ID}

REACT_APP_BUG_REPORT_URL={YOUR BUG REPORTURL}

Equivalently, duplicate the .env.example file and rename it to .env. Then fill out the credentials appropriately

  • PAYPAL CLIENT ID: Get it from the People Power Notion ('Credentials Reference') if you are from Blueprint
  • GOOGLE API KEY: Get it from the People Power Notion ('Credentials Reference') if you are from Blueprint
  1. Run yarn install. This might take a little bit of time.
  2. Run yarn start. This starts the development server, and should open a tab with the url localhost:3000 where you can find the People Power web app. If the tab doesn't open up normally, you can type localhost:3000 in your browser manually to open it.
  3. If you did not do step two correctly, you will see an error message on the screen saying:
Required configuration variable ${param} is ${SOME WRONG  VALUE}. Do you have a .env file and is it setup correctly?

Verify that you used a .env file with all the correct values from step two.

Congrats! You now have a working version of the People Power web app on your local machine ✨

2. Airtable Schema Generation

Whenever you update the airtable schema, you'll need to run the script yarn generate-schema in order to re-generate some helper files!

(More info about the schema generator found here)

This project was bootstrapped with Create React App.

About

An internal dashboard that digitizes NSEVP's Food Hub production and tracks progress of farmers in the Group GAP program

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages