Skip to content

An online task management system, written in a group of five students as an assignment for OSU's CS 361.

Notifications You must be signed in to change notification settings

george-thomas-hill/osu-cs361-task-management-system

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

osu-cs361-task-management-system

A screenshot of this program.

CS 361 was Oregon State University's Software Engineering I course.

A team of five OSU students worked together to build this task management system.

How to Install:

  • Clone this repository to your local machine: git clone REPO-URL NEW-PROJECTS-NAME

  • cd into the cloned repository

  • Make a fresh start of the git history for this project: rm -rf .git && git init

  • Install dependencies: npm install

  • Setup a MySql database for this project

  • Prepare environment file: cp example.env .env

  • Replace values in .env with your custom values

SQL Database Setup

  • Log in to your MySql database and run the SQL queries in EC3_DDL.sql file

  • Or, if you have installed MySql on your local machine, execute with command:

    $ mysql --host=HOST_NAME --user=USER_NAME --password=PASSWORD --reconnect DATABASE_NAME < MIGRATION_FILE
    
  • Sample data included in the SQL queries

Scripts

  • Start application: npm start

  • Start application for development: npm run dev

Deploying on Heroku

  • Prerequisites: Install Git and the Heroku CLI

  • Creating a Heroku remote: heroku create

  • Renaming remotes: git remote rename heroku heroku-staging

  • Deploying code: git push heroku master

  • References

Configuring MySQL on Heroku

  • Prerequisite: Deploy application to Heroku

  • Add ClearDB to the application:

    $ heroku addons:create cleardb:ignite
    
  • Use heroku config to get the CLEARDB_DATABASE_URL value

  • Copy the CLEARDB_DATABASE_URL value and assign it to the db connection variables in .env

  • Setup database with migration:

    $ mysql --host=HOST_NAME --user=USER_NAME --password=PASSWORD --reconnect DATABASE_NAME < MIGRATION_FILE
    
  • References

High-Level Software Architecture

Three-Tiered Software Architecture

Authentication

  • When successfully registered or logged in, creates an auth token (JWT) containing user id and stores it in session. (Session will preserve across multiple pages.)

  • For protected endpoints that require authentication, use middleware requireAuth that verifies the auth token in session.

    • If the auth token is verified, the user data (id, name, email) will be stored in req.user.

    • Otherwise redirects to homepage.

  • Example:

    const { requireAuth } = require('./middleware.js');
    
    app.get('/projects', requireAuth, function(req, res) {
      console.log(req.user);
      /* more code here */
    });
    

    Output:

    {
      id: 1,
      name: 'Test',
      email: '[email protected]'
    }
    

Documentation

  • Navigate to the jsdoc folder. mkdir jsdoc && cd $_ if it does not exist

  • Running the documentation generator on the command line ../node_modules/jsdoc/jsdoc.js ../index.js (path to jsdoc.js) (path to yourFile.js)

  • This command will create a directory named out/ in the current working directory

  • Within that directory, you will find the generated HTML pages (e.g. yourFile.html)

  • JSDOC Documentation

About

An online task management system, written in a group of five students as an assignment for OSU's CS 361.

Resources

Stars

Watchers

Forks

Languages

  • JavaScript 33.8%
  • Handlebars 32.5%
  • HTML 20.0%
  • CSS 13.5%
  • Shell 0.2%