Skip to content

natewu/AdmissionPal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

Admission information for Albertans has never been easier 🎓

How do you use Admission Pal?

Upon opening the page, it will ask what universities you are interested in, where you can list as many as you like or select the entire catalog. After you type in the majors that you are interested in viewing, the result will display a grid of the university information database to you. You are able to organize the data in different orders, such as the costs of tuition, or the average grade for the major. The website also fetches the required courses needed in order to pursue the major.

unknown

Where is the Data From?

Some of our more detailed information was hand-selected, but much was also scraped from various websites. Web scraping allows our site to be up to date with other universities without the need of maintenance costs. The sites which were used in order to retrieve most of our data can be found:

MySQL Setup

To start the MySQL server, install MySQL 5 from https://dev.mysql.com/downloads/installer/ (click "Looking for previous GA versions" for MySQL 5). The server should start automatically after installation on Windows, but if it doesn't, you can follow the instructions at https://dev.mysql.com/doc/refman/8.0/en/windows-start-service.html to make it start.

Then, run the MySQL Command Line Client (should be searchable in start menu) and run the following commands after logging in with the password you chose during installation:

CREATE DATABASE admissionpal_db;
USE admissionpal_db;
SOURCE C:/path/to/admissionpal_db.sql;

The file admissionpal_db.sql is located in AdmissionPal/site/admissionpal_db.sql .

In AdmissionPal/server/backend/db.js, change the password on line 7

password: process.env.REACT_APP_SQL_PASS -> alternatively go to the node section to set up a .env file.

to the password you set when you installed MySQL.

Finally, open the file C:/Program Files/MySQL/MySQL Server 5.5/my.ini(or wherever you installed MySQL server) and change both lines of "port=3306" to "port=3300". Alternatively, if you dont feel like doing it, navigate over to the /server/backend/db.js file and replace port:"3300" with port:"3306". Here is where you will also find the login user root, if you are not using this user, feel free to change it.

For demonstration purposes, we are providing this SQL file hardcoded with values. 90% of these values were scraped and generated with code (you can see some of this code in the "Automated Database" folder), and in the future (when exporting a .sql file for judging convenience is not needed) we would like to automatically update a MySQL database every academic year with new info from the university websites.

Why SQL?

We considered using JSON instead of an SQL database to organize our data because it's easier to start with, but we decided against doing so for a few reasons.

  • SQL databases can organize our data much nicer (multiple tables, easily deletable categories)
  • SQL already has great commands for requesting/adding data (already filtered when we get the data from our database)
  • SQL makes it easier to edit large amounts of existing organized data

Overall, an SQL database is MUCH more scalable than JSON and would almost definitely be used in a final product of AdmissionPal

Node setup

Install node.js (LTS release) from https://nodejs.org/en/ with all packages and three command lines

  • One command line in AdmissionPal
  • One in AdmissionPal/server
  • One in AdmissionPal/site

In the /server and /site directories, run the command

npm i to install all dependencies

In any directory, run the command

npm i nodemon -g to install nodemon globally(allows hotreload for express)

Now, create a .env file in the root of /server, this will allow you to enter in your MYSQL server login details. Use the format:

REACT_APP_SQL_PASS = "YOUR PASSWORD"
PORT = "3001" //this specifies the port for the express server. Note: if you change this, you must also change it in the /site/package.json's proxy.

Finally, in the /server directory run the command

npm start to start the web app. Note: There is no need to run start in the /site directory as we are using concurrently to run both server and site at the same time.

VOILA! AdmissionPal should be running. We're sorry that you had to set this up yourself, however we did not have credit cards to give website hosts that work for free/cheap with node.js, react, and MySQL :)

Awards

Mayor's Youth Council 2021 Hackathon

  • 1st Place
  • Best Tech Award