Shport

June 6, 2022 · View on GitHub

Web app for gathering sports information to allow users to follow and keep up to date with their favorite sports teams or leagues.

Build

Frontend

https://shport.app/

Backend

https://shport-backend.herokuapp.com/

Setting up the Project

To gain access you must have a .env file in backend folder with variables:

  • MONGODB_URI with credentials from mongoDB access key.
  • NEWSAPI_KEY with a valid News API key.
  • TOKEN_SECRET with a secret token.
  • PORT a number so that it can tell the difference between Heroku or localhost

Steps

Create your directory then call

  1. git clone https://github.com/MuchQuak/308-309_Project
      This clones the project
  2. cd 308-309_Project/backend
  3. Create the .env file with the variables above
  4. npm install
      To install all dependencies required for the backend
  5. cd ../frontend
  6. npm install
      Installs the required dependencies for the frontend
  7. cd ..
  8. npm install
      Installs the required dependicies for the very root of the project

Starting the app locally (assuming you're at the root folder)

cd frontend
npm start

cd backend
node index.js

Starting tests

cd backend
npm run test

Cypress

npx cyrpess open

Figma Model

Project Spec

Sequence Diagram

Code Coverage Report

06/03/2022

File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files80.1567.7677.8880.58
models/caching80.855010080.85
cachingServices.js76.925010076.9212,33-34,49-50,60-61,75-76
games.js100100100100
standings.js100100100100
models/sport48.422057.1451.11
leagueService.js36.361053.8438.0920-68
sportInfoServices.js54.343062.558.139,27-28,37-38,51-74
sportSchema.js100100100100
models/user90.5586.669690.55
prefSchema.js100100100100
userSchema.js100100100100
userServices.js88.9986.6695.6588.9914,80-83,96-97,111-112,129-131,150-151
scraper84.76727584.46
scheduleScrape.js82.6456.8681.8182.0521-31,37,69,76,87,96-103,110,139-140,163,199,207,232-233
standingsScrape.js98.910092.398.8663
teamExpansionScrape.js77.8577.7764.2877.8551,113-122,149,188-263,296,342