A web-based class schedule and faculty loading system for the Computer Science Department of Pamantasan ng Lungsod ng Maynila, proposed by JAVAwokeez team.
- git
- mySQL
- node.js
- gmail app password
- github account
Git
- Check if you already have git, open the terminal/command prompt and enter
git version
- If it says git is not a command, then download a git installer that is compatible with your OS
- Windows: (https://gitforwindows.org/)
- MacOS: install and setup homebrew (https://brew.sh/) then enter this command in the terminal
brew install git
- Open the terminal/command prompt and enter
git version
to make sure the installation was successful
mySQL
-
Download a mySQL installer compatible with your OS in https://dev.mysql.com/downloads/mysql/
-
Run the mySQL installer
-
Proceed with the default options until the Installation part
-
Choose Use Strong Password Encryption then enter a strong password for the root user
-
Wait for the installation process to finish
-
Open your terminal and enter
mysql -u root -p
, this will prompt you to enter the password you entered earlier -
Now that mysql terminal is open, we need to create a new database and user of that database for the project, enter the following in the terminal:
- Create new project database
CREATE DATABASE class_sched_sys;
- Create new user of the project's database
CREATE USER 'class_sched_sys_user'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD'; GRANT ALL PRIVILEGES ON class_sched_sys.* TO 'class_sched_sys_user'@'localhost';
-
If no errors occur and the database is created, exit sql terminal by typing
\q
orexit
Node.js
- Choose the right installer for your OS in https://nodejs.org/en/download/
- Run the node installer and accept all default options and license agreement
- Wait for installation to finish then restart you computer
- Open your terminal and check if node was installed by typing
node -v
Gmail App password (this is for e-mail transfer)
- Go to https://myaccount.google.com/apppasswords
- Log in to your google account or create one as needed then log in
- Click the Select app dropdown menu and choose Other (Custom name)
- Enter "class_sched_sys" then click GENERATE
- Copy the password and SAVE IT for when setting up the project
Github (You need this to collaborate in the project)
- Go to https://github.com/ and sign up
- * follow what they say *
- But you probably already have a github account
- Log in to your github account
- Open your terminal, then "cd" to the folder you want the project to be in
- Clone the project by entering the following command:
git clone https://github.com/hijacque/class_timetable_web.git
- Open the project folder that you just cloned from the terminal
cd TO_ROOT_PROJECT_FOLDER
- Start mySQL server by typing
mysql.server start
- Check for
class_sched_sys.sql
file, then enter the command:Enter your pasword to initialize database schemamysql -u root -p class_sched_sys < class_sched_sys.sql
- Install node package dependencies by entering
npm install
in the terminal - Open your text editor and in the root project folder create a file and name it
.env
- Open the
.env
file and fill it with the following:DB_PORT="localhost" DB_USER="class_sched_sys_user" DB_PASSWORD="class_sched_sys_user's_PASSWORD" DB_NAME="class_sched_sys" API_PORT=3000 API_DOMAIN=localhost:$API_PORT API_KEY="RANDOM_32LENGTH_STRING1" SMTP_PORT=587 SMTP="smtp.gmail.com" SMTP_SENDER="YOUR_GMAIL_ADDRESS" SMTP_PASSWORD="GMAIL_APP_PASSWORD" COOKIE_KEY="RANDOM_32LENGTH_STRING2" HELP_KEY="RANDOM_32LENGTH_STRING3" DB_PORT="localhost"
- Your computer is now a local server for the project
- Open your terminal and enter
node index.js
or if you have nodemon usenodemon index.js
- Open your browser (Chrome, Edge, IE, etc.) then access http://localhost:3000/login or signup an account in http://localhost:3000/signup (use a different e-mail from the gmail used for the app password)