Go to file
2020-11-08 23:22:21 -06:00
app Fix bad service import 2020-11-08 20:10:41 -06:00
config Comment all the things! 2020-11-08 12:34:50 -06:00
documentation Add other system documentation 2020-11-08 22:57:24 -06:00
frontend Finish writing tests for front-end 2020-11-08 15:58:36 -06:00
locale Comment all the things! 2020-11-08 12:34:50 -06:00
Project_Demonstration Add project demo video 2020-11-08 23:22:21 -06:00
test updated the tests, uncertain about their effectiveness ATM 2020-11-08 21:09:44 -06:00
.gitignore Initial commit of framework 2020-11-01 12:50:03 -06:00
DEV-SETUP.md Add dev setup instructions 2020-11-04 19:24:01 -06:00
example.env Flesh out Player model and write patch to populate players from sporting API 2020-11-04 22:57:22 -06:00
flaps.json Initial commit of framework 2020-11-01 12:50:03 -06:00
flitter Initial commit of framework 2020-11-01 12:50:03 -06:00
index.js Initial commit of framework 2020-11-01 12:50:03 -06:00
LICENSE Initial commit of framework 2020-11-01 12:50:03 -06:00
package.json Add yarn run test command 2020-11-08 16:16:44 -06:00
README.md Add yarn run test command 2020-11-08 16:16:44 -06:00
setup.js Comment all the things! 2020-11-08 12:34:50 -06:00
Units.flitter.js Add logic for serving front-end from /app 2020-11-04 20:47:58 -06:00
yarn.lock Start front end test example 2020-11-08 11:18:42 -06:00

Fantasy Football

EECS 448 - Project 4

Structure Info

Front-end

This project has been wired up to use Vue.js to help organize components of the game.

These components are defined in files that end in the .component.js extension, and are located in the src/components/ directory.

The entry point for the project is the index.html. This file contains the basic logic for loading Vue, and adding the game board to the page.

Obviously, we'll flesh out the look-and-feel as we go along. This is just a basic starter for now.

Backend

This project uses the Flitter web framework for its API. The API is split into routes, controllers, and models.

The models interface with the database and represent different object-oriented structures in the game (players, teams, users, matchups, &c.)

The routes define which controller methods get called on which endpoints.

The controllers contain the logic for receiving requests and sending responses and will query the models for data.

There are also some .patch.js classes that contain logic for one-time data patches.

How to Run

First, install the dependencies:

  • Node.js 14.x or higher
  • The Yarn package manager
  • MongoDB
git clone https://github.com/EECS-448-Battleship/fantasy-fooball-backend app
cd app
yarn install

Set up the environment config by copying the template .env file and editing it to match the environment:

cp example.env .env
vim .env

Now, run the one time data patches like so:

node flitter shell
(flitter) ➤ await require('./setup')(_di)

This will pull in the latest NFL players and their stats and seed the database to get the game ready to play.

Now, start the server:

node index.js

Re-generating the documentation

To regenerate the docs, you need Node.js and the Yarn package manager installed. Then, just:

cd documentation
./generate.sh

Running Tests

The tests are located in the test directory and are split into frontend and backend tests.

All tests are written expressively using the Mocha testing library.

After installing the Node dependencies, you can run the frontend and backend tests like so:

yarn run test

Works Cited

Front-end

The files in the frontend/lib directory are external libraries used in this project.

Back-end

The backend API uses the following technologies and external libraries:

  • Flitter
  • SportsData.io
    • This is a free API which we use to pull in player stats and information from the NFL in the one-time data patches.
    • A free-trial account was used to populate the data for this app.
    • https://sportsdata.io
  • SkySilk
  • Other libraries
    • There are many other open-source libraries relied upon as sub-dependencies of the framework we used
    • These libraries and their licensure information can be found in the package.json file

Contributors

  • Lucas Brakenridge
  • Javier Barea Lara
  • Garrett Mills
  • Evan Powell
  • Alec Horlick-Mills