Here's the scenario: You are super on top of getting the perfect schedule; no conflicting start times, the classes are close together, etc. And you submitted your cart the first day it was available! You got all the classes you wanted, and you're going to have the perfect semester. Fast-forward a few weeks, and the semester is about to start. You check your schedule over the weekend, and discover that some of your classes were rescheduled, and they now conflict with each other. How could this happen? Why didn't someone tell you about the changes made to the course you were registered for? How could they do this to you?
This program allows users to track changes made to courses they are registered for, or any course in the BYU catalog! While there is a server running, it will email each of the students tracking a course, letting them know that the course details have been changed. (it tracks the room number, professor[s], start time, building, and days taught for each course you track)
To get the program running, there are a few things we will need:
Navigate to https://byulogin.awsapps.com/start#/ to get the AWS environment variables for the byu-org-trn account.
Click the box under "Option 1: ..." to copy the Credentials, then paste it into a command prompt before running the project.
You will need to generate a Bearer token from the training token generator at https://training-token-generator.byu.edu/#
You should be running a postgres database in docker. You should run 'docker-compose up -d' if this is the first time running the program.
This program has two runnable files:
First you will be prompted to enter a Bearer token:
Now that you're logged in, it will prompt you with the main menu
This is what the course add option looks like:
If the course is found, it will be added successfully to your list of tracked courses:
Now you are tracking some courses! Now you just need to run server.js (described below) to get email notifications about any changes made to your course!
2. server.js, a file that will stay running and scan for changes periodically (every 12 seconds by default)
When you run the server, it will prompt you to input a Bearer token as well. Once you have done that, it will prompt you to authenticate with the gmail account "coursechangenotifier@gmail.com", or you will have to enter it manually in the browser page that opens. This is the email that will send the notifications out.
Once you've done that, it will tell you that it is authenticated with OAuth2. Then it will simply wait for changes to occur. Anytime it detects a change, it will make a log entry like the one shown below (course: data_type 'old_value' --> 'new_value'). It will then send an email to any students tracking the course to inform them the course has been altered, and that they should review their schedule.
Also, feel free to add or remove courses from your tracking list while the server is running, it will not affect the servers' functionality. The newly added courses will be tracked without restarting the server.