Skip to content

AirIQ: A responsive React application to get the Air Quality index everywhere in the world. SMS and recommendations sending based on user profile. Final project created with Leslie and Justin.

sogbdn/AirIQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AIR IQ:

A REACT APPLICATION TO BE AWARE OF AIR QUALITY IN REAL TIME & LOCATION

"Screenshots of Front page" "Screenshots of Recommendations based on profiles" "Screenshots of Google map API and Twilio" "Screenshots of SMS"

INSTALL DEPENDENCIES

  1. cd into the /server folder.
  2. From the /server folder, run npm install (server dependencies).
  3. Open a second terminal and cd into the /client folder.
  4. From the /client folder, run npm install (React dependencies).
  5. Use npm run server from the /server terminal to start the server on http://localhost:3000/
  6. User npm start from the /client terminal to start the client on 3001

CREATING THE KNEX DATABASE

  1. From the /Final_Project folder, run psql.
  2. From the psql terminal, run CREATE DATABASE air_iq;.
  3. Use \q to leave the psql terminal.
  4. Run npx knex migrate:currentVersion to check if a table already exists.
  5. If a current version exists, run npx knex migrate:rollback then repeat from step 4 until it says none.
  • Most versions of knex will only need you to rollback once to clear all of them
  1. Run npx knex migrate:latest to create the empty migration tables.
  2. To populate the database with static data, run npx knex seed:run
  3. For more informations about PostgreSQL on Ubuntu: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04

ADD GOOGLE API KEYS

  1. You will need to generate and add your own Google maps API key, following the unfortunate change to a paid use/access to the API in 2018.

QUICK GUIDE

JAVASCRIPT API

API KEY

These keys will need to be added in order to look up locations beyont the default geolocation/Montreal view, and and to view the 'mapview' of the Air Quality currently being retreived on the front page.

NOTE: To use the Maps JavaScript API, you must get an API key and you must enable billing in your account. The links above will explain the necessary steps in further detail. You can enable billing when you get your API key (see the Quick guide) or as a separate process (see Usage and Billing).

  1. Add API Key to two files. First, in the client folder (/client/public/index.html), in the index.html file, at the line script src="https://maps.googleapis.com/maps/api/js?key=INSERTAPIKEYHERE&libraries=places" . Second, in the client folder, (/client/src/components/pages/MapView.js), in the MapView.js file, at line 287: apiKey: ('INSERTAPIKEYHERE')

About

AirIQ: A responsive React application to get the Air Quality index everywhere in the world. SMS and recommendations sending based on user profile. Final project created with Leslie and Justin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •