/nfl-wins-losses

A site to track an NFL league with family and friends.

Primary LanguageTypeScript

NFL Wins / Losses League

A site to track an NFL league with family and friends. Players draft teams to earn points for each win or loss over the course of the NFL season.

The backend pulls data from ESPN APIs (with caching to limit requests) then processes it into endpoints for a React frontend.

I hacked together a version of this site a year ago when I was just learning JavaScript. Compare this repository to the source code from last year's app to see how far I've come in 10 months.

Snapshot of site in Week 1

Technologies

The backend is build with Express and TypeScript which make calls to ESPN APIs and process the data into endpoints for a React frontend. The site is hosted with Heroku which makes maintenance efficient -- pushes to master automatically create and deploy new builds.

Feature Roadmap

  • D3 Bump Chart tracking each player's ranking from week-to-week
  • Add possession, down and distance, and yardline to active games
  • Sort active games in some logical way (user toggled owner's games on top, then active games...)
  • Rebrand of Who Are You Rooting Against?

How the league works

Before the season, everyone drafts teams for either their wins or their losses. For example, you might draft:

  • Giants wins (someone can also draft Giants losses but no one else can draft Giant wins)
  • Cowboys losses
  • Eagles losses
  • Washington losses

As the season progresses, you get a point for each matching result. So, if the Giants go 10 - 6, they'd be worth 10 points at the end of the year. The person who drafted Giants losses would get 6 points.

Both sides (wins and losses) of the same team can be drafted. This means you are often rooting against someone else each week.

APIs

To Run Locally

  1. Clone repo
  2. Run npm install to install dependencies
  3. Start backend with node run spin
  4. Start frontend with npm start
  5. Open app in browser (use local host port shown when you start the frontend)
  6. Have fun!