Skip to content

Commit 4b5620e

Browse files
authored
Merge pull request #31 from CourseFlo/develop
Merging all changes from the past sprints until now.
2 parents bc35f5a + 1cbee02 commit 4b5620e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+22375
-67
lines changed

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
**/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
**/coverage
10+
11+
# production
12+
**/build
13+
14+
# ide
15+
**/.idea
16+
**/.vscode
17+
18+
# dotenv
19+
**/.env.local
20+
**/.env.development.local
21+
**/.env.test.local
22+
**/.env.production.local
23+
**/.env
24+
25+
# misc
26+
**/.DS_Store
27+
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: npm run start

README.md

Lines changed: 147 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,148 @@
1-
CoursefFlo (subject to name change) is a webapp designed to help students see the required pre-req and co-req’s that they need before graduation in a visually pleasing manner, and allows users to explore their degree programs to better understand their options. It will store data in the form of user login, preferences, saved courses, and recent searches; we will be scraping and storing all the SSC course data, every time it is updated by UBC. Our additional functionalities that we could add or remove are: a complete API system to scrape and parse SSC data as a standalone repository, a visualizer that can display courses in 3d, and a recommender system that can give suggestions towards where we can take further courses in the future.
2-
3-
Team: [Sepand](https://github.com/DSep), [Sam](https://github.com/sam-ip), [Brandon](https://github.com/beetai), [Guanting](https://github.com/baconandchip).
4-
5-
* Project Description:
6-
* Who is it for? Students
7-
* What will it do? (What "human activity" will it support?) We have the following user stories:
8-
* As a user, I want to be able to create an account to store my info: (name, email, course schedule, recent searches);
9-
* As a user, I want to be able to browse and save my courses (based off course schedule); and
10-
* As a user, I want to be able to browse courses, choosing to visualize them in a tree, connected to their pre-reqs coreqs.
11-
* What type of data will it store?
12-
* User login, prefs, saved courses, recent searches
13-
* We scrape and store all the SSC course data, every time it is updated by UBC
14-
* The user can access this in a beautified format
15-
* What will users be able to do with this data?
16-
* See the required pre-req/co-req’s that they may need before graduation in a visually pleasing manner
17-
* Explore degree programs, for users such as prospective students, to understand their options and
18-
* What is some additional functionality you can add/remove based on time constraints?
19-
20-
21-
* Project task requirements:
22-
* 3-5 minimal requirements (will definitely complete)
23-
* Backend: just call [https://ubcexplorer.io/api](https://ubcexplorer.io/api)
24-
* As a minimal requirement, we will be using the ubc explorer api. May eventually aim to use our own scraper
25-
* FrontEnd/React:
26-
* We have Login/Signup Pages
27-
* We have a Visualizer page
28-
* Webpages can display text, images and/or tables to users
29-
* Database:
30-
* Can store simple data for authentication.
31-
* 3-7 "standard" requirements (will most likely complete)
32-
* Backend:
33-
* Modify [https://github.com/eyqs/req](https://github.com/eyqs/req)
34-
* We should use [http://www.calendar.ubc.ca/vancouver/courses.cfm?page=name&code=CPSC](http://www.calendar.ubc.ca/vancouver/courses.cfm?page=name&code=CPSC)
35-
* Backend retrieves and updates data as needed by frontend
36-
* Frontend:
37-
* Visualizer page displays the selected course of the user in a 2D way.
38-
* Basic course search
39-
* Personalization of courses to the user
40-
* Database:
41-
* Store user’s ‘starred’ courses, store their degree program, recent searches
42-
* 2-3 stretch requirements (plan to complete 1!)
43-
* Backend:
44-
* Make an API out of our adapted [https://github.com/eyqs/req](https://github.com/eyqs/req)
45-
* Frontend:
46-
* Visualizer can display the course relationships in 3D
47-
* Mix (far stretch):
48-
* Backend: System can retrieve degree programs, allowing users to view listings of full degree programs
49-
* Frontend: System can visualize the full course listing of the degree, allowing you to explore each course node as needed to see further req details
50-
* Backend: Recommend courses to add to their degree program, based on need and what you’ve taken
51-
* Backend: Recommend courses to add based on what courses you’ve taken (exploratory)
52-
* Breakdown of 2 minimum requirements into ~2-5 smaller tasks:
1+
<p align="center">
2+
<a href="https://github.com/CourseFlo/Flo/">
3+
<img src="/frontend/public/course-flo-original-icon-size.png" alt="Logo" width="80" height="80">
4+
</a>
5+
6+
<h2 align="center">CourseFlo</h3>
7+
8+
<p align="center">
9+
A better course viewing experience
10+
<br />
11+
<br />
12+
<a href="https://course-flo.herokuapp.com">Our App</a>
13+
·
14+
<a href="https://github.com/CourseFlo/Flo/issues">Report Bug</a>
15+
·
16+
<a href="https://github.com/CourseFlo/Flo/issues">Request Feature</a>
17+
</p>
18+
</p>
19+
20+
![Heroku](https://heroku-badge.herokuapp.com/?app=course-flo&style=flat&svg=1)
21+
22+
23+
[CourseFlo](https://course-flo.herokuapp.com) is designed to help students see the course relationships in an easy to use, compact manner. With this tool, students can explore courses across all departments without the need for back-and-forths and time wasted going down a rabbit hole of related courses.
24+
25+
Team: [Sepand](https://github.com/DSep), [Sam](https://github.com/sam-ip), [Brandon](https://github.com/beetai), [Guanting](https://github.com/baconandchips).
26+
27+
## Table of Contents
28+
29+
* [Project Requirements](#project-requirements)
30+
* [Tech Overview](#tech-overview)
31+
* [Tech Stack](#tech-stack)
32+
* [Above and Beyond](#description-of-"above-and-beyond"-functionality)
33+
* [Discussion of Next Steps](#discussion-of-next-steps)
34+
* [Development](#list-of-contributions)
35+
* [Contributing](#contributing)
36+
37+
38+
## Project requirements:
39+
* 3-5 minimal requirements (will definitely complete)
40+
* Backend: Build an MVP with [https://ubcexplorer.io/api](https://ubcexplorer.io/api)
41+
* FrontEnd/React:
42+
* We have Login/Signup Pages ✅
43+
* We have a Visualizer page ✅
44+
* Webpages can display text, images and/or tables to users ✅
45+
* Database:
46+
* Can store simple course data for frontend. ✅
47+
* 3-7 "standard" requirements (will most likely complete)
5348
* Backend:
54-
* Complete an analysis and hacky test of the current ubcexplorer.io API, to figure out the data structure
55-
* Parse and organize the data in a way that allows fast access
56-
* Create an algorithm that, given a course, can find all the courses that it requires (recursively)
57-
* Display that list in a simple text format
58-
* FrontEnd:
59-
* Choose UI library for components in React
60-
* Individual pages with navigation between them
61-
* Actions (login, signup, add/delete courses, **visualize courses**, db querying/storing for each of the pages)
62-
* This will help you divide up work among your teammates
63-
64-
Here are some basic wireframes/prototype sketches:
65-
66-
<img src="FigmaSketch1.png" alt="Sketch1" width="1000"/>
67-
<img src="FigmaSketch2.png" alt="Sketch2" width="1000"/>
68-
<img src="FigmaSketch3.png" alt="Sketch3" width="1000"/>
49+
* Backend retrieves and updates user data as needed ✅
50+
* Backend retrieves course data as queried or selected on frontend ✅
51+
* User data endpoint, with additional personalization. ✅
52+
* User login and signup, using custom auth + jwt tokens stored in store. ✅
53+
* Frontend:
54+
* Visualizer page displays the selected course of the user in a 2D way. ✅
55+
* Basic course search ✅
56+
* User profile page ✅
57+
* Personalization of courses to the user ✅
58+
* User-friendly flow between pages
59+
* Database:
60+
* Store user’s ‘starred’ courses, store their degree program ✅
61+
* Store user login info + passwords (hashed, of course) ✅
62+
* Can store simple course data for frontend. ✅
63+
* Deployed app to Heroku.
64+
* Setup continuous deployment on Github actions. ✅
65+
* 2-3 stretch requirements
66+
* Backend:
67+
* Modify [existing scraper](https://github.com/eyqs/req) to scrape data from UBC directly (We should use [the calendar](http://www.calendar.ubc.ca/vancouver/courses.cfm?page=name&code=CPSC) )
68+
* Make an API out of our adapted scraper or DB data.
69+
* Frontend:
70+
* Visualizer can display the course relationships in 3D 🌕
71+
* Visualizer can show multiple layers of depth in course relationships ✅
72+
* Focus/view course details vs Overview of courses, prereqs, and dependents ✅
73+
* Mix of vague ideas/stretch features:
74+
* Backend: Recommend courses to add based on what courses you’ve taken (exploratory) 🌕
75+
* Backend: System can retrieve degree programs, allowing users to view listings of full degree programs ✅
76+
* Frontend: System can visualize the full course listing of the degree, allowing you to explore each course node as needed to see further req details
77+
* Backend: Recommend courses to add to their degree program, based on need and what you’ve completed.
78+
79+
## Tech overview:
80+
* Unit 1:
81+
* Rough prototypes were made for our app, which formed the basis of our development. HTML elements are mostly represented through JSX, which were blended in with Material-UI components. CSS (styling) is applied using the Material-UI module useStyles(). Finally, JavaScript established how the logic of our application will function and we could set the groundwork for when we move forward with React and Redux.
82+
* Unit 2:
83+
* React and Redux were used to create the frontend of our app. Using React, we could create components to represent the various objects and elements as well as define functions and variables within each componenets to dictate their logic. Examples of components we created include the modal windows, the navbar, and the search course form. Redux allows centralizing of the data within our app inside a store, which can be managed through actions and reducers. Components can access this store to take data it needs to function. Prevalent applications of the Redux store include authentication, course visualization, and modal management.
84+
* Unit 3:
85+
* We used MongoDB as our database, in which we defined one collection for courses and one for users. The information stored here is used as long term data storage, when data is not already stored in the backend or frontend.
86+
* Unit 4:
87+
* Our backend (API) is constructed using ExpressJS, which we can use to define routes and models to serve the frontend the information it needs. In conjunction with REST, we could make frontend actions meaningful within the scope of the application. This is done by linking actions to their corresponding routes so that they may interact with the database properly. Model schema definitions were created using Mongoose while API calls and subsequent data management in the frontend were performed using Axios with Redux Thunk.
88+
* Unit 5:
89+
* Our project is deployed on Heroku. We have continuous deployment set up with our Github repository, automatically deploying changes to our main branches to Heroku. It also goes through isolated beta and production stages, as well as having a separate dev environment.
90+
91+
## Tech Stack:
92+
TypeScript\
93+
ReactJS (HTML)\
94+
Redux\
95+
Node.js\
96+
Express\
97+
MongoDB (NoSQL)\
98+
Mongoose\
99+
Material UI (CSS)\
100+
Heroku
101+
102+
## Description of "Above and Beyond" Functionality
103+
* Our visualizer was developed with the capability to dive deeper than just a layer of related courses, allowing for a high level view of all related courses for a selected course. And it does so while remaining nimble in course switching and rendering.
104+
* Our app was built to be fully responsive, usable on mobile, tablet and laptop screens. Introducing media queries based on dimensions of screen, and utilizing Material-UI's built-in responsive components helped achieve this.
105+
* We built a caching system for our high-traffic, high-quantity data (courses) to allow for a faster experience, in particular while navigating the visualizer.
106+
* Custom authentication system is built from scratch using JWT tokens and we store session information in a browser's storage so that the login status can persist
107+
* The search feature made use of the filtering UI and NoSQL query building in our backend, to quickly query the courses searched for in the DB.
108+
* We decided to push to use TypeScript and the Airbnb style (w/ ESLint), to force a rapidly evolving 4 person project to adhere to consistent coding standards.
109+
110+
## Discussion of Next Steps
111+
* Future implementations we have in mind include 3d visualization in a network-like fashion. This includes the ability to zoom in on a course and look at the direct dependents of the course at each layer. One would also be able to move up the network of pre-requisite courses in a visually pleasing manner to navigate through the progression of a course.
112+
* Another future implementation includes a course recommendation system. Given a students starred courses they have taken, recommend them courses based on similar (pre-requisite, degree requirements, similar concepts) courses offered. An addition to this implementation includes recommending based on most starred courses, and other parameters like the requirements left to a user’s degree.
113+
* Being able to visualize course data from other schools is another feature we'd like to add. We would need to format the data appropriately, and only then can a similar visualization can take place. Challenges we can see when implementing include having to handle multiple types of identifiers for courses, or having to parse multiple times for correct information.
114+
115+
### List of Contributions
116+
* [Sepand](https://github.com/DSep)
117+
* Created the Search page frontend, with the search filtering.
118+
* Visualization, backend + frontend
119+
* Multilayered visualization
120+
* Course data caching
121+
* Course data acquisition and database population
122+
* Backend work for course search
123+
* Heroku deployment
124+
* [Sam](https://github.com/sam-ip)
125+
* User info search+persistance to db (Starred Courses, username/email/password), backend API creation + frontend fetching/persisting
126+
* Global UI theme applied to our application
127+
* Styling/Responsiveness/Accessibility of profile page
128+
* [Brandon](https://github.com/beetai)
129+
* Robust authentication system with authorization-required backend routes
130+
* Design and implemented modal windows
131+
* Frontend work for login and signup
132+
* Backend work for course search
133+
* Full stack work for user information handling (CRUD + Redux)
134+
* Course data acquisition and database population
135+
* [Guanting](https://github.com/baconandchips)
136+
* Dark Mode
137+
* Improved UI/responsiveness on Homepage, Login, and Profile pages
138+
* Extended searching abilities to Homepage and Navigation Bar
139+
140+
141+
## Contributing:
142+
We love feedback and improvements! If you feel like making some changes, just:
143+
- Clone CourseFlo/Flo repo on your local environment: `git clone https://github.com/CourseFlo/Flo.git` in your local terminal.
144+
- Create a `.env` file with variables `MONGO_URI` with your MongoDB and `JWT_SECRET` and your desired `PORT` defined.
145+
- Install dependencies: run `npm install` inside both the `frontend` and `server`.
146+
- Run the app, by running:
147+
- `npm start` in the `frontend`
148+
- `npm run devstart` in the `server`

frontend/.eslintrc.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es6: true,
5+
},
6+
extends: [
7+
'plugin:react/recommended',
8+
'airbnb',
9+
],
10+
globals: {
11+
Atomics: 'readonly',
12+
SharedArrayBuffer: 'readonly',
13+
},
14+
parser: '@typescript-eslint/parser',
15+
parserOptions: {
16+
ecmaFeatures: {
17+
jsx: true,
18+
},
19+
ecmaVersion: 2018,
20+
sourceType: 'module',
21+
project: './tsconfig.json',
22+
},
23+
plugins: [
24+
'react',
25+
'@typescript-eslint',
26+
],
27+
rules: {
28+
"react/jsx-filename-extension": [1, { "extensions": [".jsx", ".js", ".tsx"] }],
29+
// enforces putting a file extension. Sadly, .ts and .tsx files are not allowed and also Airbnb conflicts
30+
// with this https://github.com/airbnb/javascript#modules--import-extensions, so left as a warning.
31+
"import/extensions": [
32+
"warn",
33+
{ "pattern": { [/.tsx/]: "never" }, "ignorePackages": true },
34+
],
35+
'import/no-unresolved': ["off"], // makes import assume literal path, essential doing the same as 'import/extensions' rule
36+
'arrow-body-style': ['error', 'as-needed'],
37+
"no-unused-vars": "off",
38+
"@typescript-eslint/no-unused-vars-experimental": "error",
39+
"object-curly-newline": ["off", {
40+
"ObjectExpression": { "minProperties": 2 },
41+
"ObjectPattern": { "multiline": true },
42+
"ImportDeclaration": "never",
43+
"ExportDeclaration": { "multiline": true, "minProperties": 3 }
44+
}],
45+
"react/jsx-fragments": "off",
46+
"react/require-default-props": ["error", { forbidDefaultForRequired: false, ignoreFunctionalComponents: false}],
47+
"no-case-declarations": "off",
48+
"import/prefer-default-export": "off"
49+
},
50+
settings: {
51+
}
52+
};

0 commit comments

Comments
 (0)