Web Information Technology (INFO30005) group project repository. Inhalert is a Victorian air quality alert app, providing air quality summaries and allowing users to register to receive notifications when the air quality in their area is poor.
⚠️ ** EPA's public API Spec was altered and this app no longer functions as expected. **
Visit https://inhalert.herokuapp.com/
Each of the core functionalities will be grouped together and explained below, as per submission guidelines.
A sample user account has been made for use throughout the marking process, however we strongly encourage signing up with your own email account to test the notification functionality.
Email: test@test.test
Password: password
-
This functionalities allows users to create accounts, login, and subscribe to Site locations in Victoria for which they want to recieve notifications. It also includes an email change functionality, and a delete account functionality.
URL Endpoints
Registration:/users/register
Login:/users/login
Preferences:users/preferences
Account:users/account
Logout:users/logoutThe route for this functionality is
routes/users.The controllers for this functionality are
controllers/users,controllers/preferencesandcontrollers/account.The models for this functionality are
models/userandmodels/siteSub.The views for this functionality are
views/register,views/login,views/preferences, andviews/account. Other views also change depending on whether a user is logged in, but are not part of the feature itself.A front-end javascript file is used
public/static/preferences. -
This functionality is responsible for updating internal site information, and sending out alerts to users when necessary.
URL Endpoints
None: This feature is a backend feature that is constantly running.The routes for this feature are
routes/sitesandroutes/emails.The controllers for this functionality are
controllers/sitesandcontrollers/emails.The models for this functionality are
models/siteandmodels/siteSub.views/emailis used to embed Site summaries into email bodies. Arguablyviews/preferencesis associated with this feature. -
This functionality is responsible for displaying Air quality information about each site on our website, with or without an account
URL Endpoints
Dashboard:/dashboard
Summary:/dashboard/siteSummary:siteId
About:/aboutThe routes for this feature are
routes/dashboardandroutes/index.The controller for this functionality is
controllers/dashboardThere are no models for this functionality. Front end objects are used from
public/static/sitesandpublic/static/coloursThe views for this functionality are
views/index,views/aboutandviews/summary.Some front-end javascript files are used, which are
public/static/site_summaryandpublic/static/convert_postcode.
Testing has been implemented for the User Management functionality. However, only integration style testing has been completed. Unit testing for controller functions proved very difficult, so much so that we could not complete it.
To run tests, simply type npm test in a terminal at the top level directory.
NOTE: Old README below
- Visit https://inhalert.herokuapp.com/
- Register, first trying erroneous values to test validation of input. When you do register, make sure the email you are using is one you can check.
- From here you will be re-directed to a preferences page. Choose any Site and status, keeping a note of what you have chosen.
- From here you should be re-directed to the dashboard. The dashboard gets a live update on the summary of all major site locations in Victoria and displays them on the page.
- Inject a bad weather status into a site you subscribed to using Postman or similar. Try this a few times, as you may have injected a status right before the app is updating its database. You want to inject the bad status right before triggering alerts. These loops are offset by 1 minute.
- From the dashboard you may also:
- See full site summaries by entering your postcode or suburb, or clicking on a table name.
- Update preferences by clicking on "Preferences"
- logout and log back in again, testing that functionality
- Update your email or delete your account at "Account"
- Check out the About page
- Set up the interceptor for Postman. It saves session cookies and will be needed to test certain endpoints. It is the satellite looking button in the top right corner of the desktop app. You will need to install a chrome extension. Clicking it will show you how to set it up.
- Make sure you add the domain http://inhalert.herokuapp.com/ to the list of domains.
- Make a post request to https://inhalert.herokuapp.com/users/register using url-encoded option containing name, email, password and password2 key-value pairs.
- Make a post request to https://inhalert.herokuapp.com/users/login with url-encoded email and password key-value pairs.
- You should now have a session cookie stored and can make authenticated requests.