Skip to content

Maxscores/fantasy_football_forever

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

View the app here: https://fantasy-football-forever.herokuapp.com/

Personal Project for Turing BE Module 2, markdown for assignment: http://backend.turing.io/module2/projects/mini-project Goal was to build an app based around fantasy football that a user can create a profile and favorite players. It utilizes a Postgres Database with one-to-many and many-to-many relationships. The data for the site was seeded from an API. The player season data was generated to fit a normal distribution that was built using a method similar to the method I wrote about here: https://hackernoon.com/weve-all-been-there-adedc9e82b42

Testing

The app is tested using RSpec. To run the tests you will need to perform some basic setup:

git clone https://github.com/Maxscores/fantasy_tracker.git
cd fantasy_tracker
bundle
rails db:create db:migrate
bundle exec rspec

User Stories:

Player

  • player index page shows all players
  • players can be added by Admin
  • players can be deleted by Admin
  • players can be edited by Admin
  • Players can be favorited/unfavorited by Logged in Users
  • Player show page shows their player bio
    • Player show page shows their current stats via API
      • didn't find free api with this info, data is loaded during seeding
    • Player show page gives their current social media opinion
      • uses dummy twitter handles
  • Player show page shows which FF team they're on
  • Players belong to one FF team
  • Players have many FF users that have favorited them
  • Visitors can see players sorted by team

FF Teams

  • Admin creates/deletes teams
  • Admin assigns players to teams
  • Visitors/Logged in Users can view teams
  • Team show lists all players on that team
  • Team index shows all teams

Favorites

  • Logged in users can favorite/unfavorite players
  • Logged in users can view a list of their favorited players - "My Favorites"
  • Logged in users can see favorites sorted by team

Authentication and Authorization

  • Users need to login to see their favorites
  • Users can only see their favorites
  • Users cannot create favs for other users
  • Users cannot create new teams
  • Users cannot create new players
  • Visitors can create user accounts

Other Features to Add

  • Adding favorites stays on same paginated page
  • Add filter-by-team (drop down)
  • Add filter-by-position (drop down)
  • Add sort-by name (drop down)
  • Can use all filters and they carry over when favoriting
  • Add team to favorites(adds all players from team)
  • Calculate fantasy score from stats
  • Add player season score to index - makes things slow