Code Monkey home page Code Monkey logo

cpsc436's Introduction

Basketball Statistics Database

996.icu

Privacy Policy
We will only store your Email, hashed password, and name/profile image URL if you are logging in via Facebook. This information will not be shared with, or viewed by anyone not on the GGPanda team or the user themselves.

High level succinct description

Our website is a display of NBA Stats in conjunction with News articles and Match information as an information hub for users. Our primary goal is to allow the user to personalize their own NBA viewing experience.

Description

Our website will be a Basketball statistics database, with options for the user to select a favorite set of teams to focus on. It will contain live match data, past match statistics, and player statistics as needed by the user, who is most likely an avid follower of the NBA. With the data stored (player data, team data, user data), it will generate all kinds of analytics (such as shooting%, head-to-head results), all of which are tailored based on the user's needs. If time is allowed, there may be additional functionalities created involving the user, such as heatmaps for the user's favorite players, and a player fantasy game/system revolving past seasons' results.

Task Requirements

Minimal Requirements
  • Create Website: Main Page, Stats Page, Login Page as per prototype
    Breakdown
    • Main page: user's favorite teams, upcoming matches, other cool information
    • Stats page: player and team stats (e.g. win-loss record, shooting percentage, points)
    • Login page: allow user to create username + password, which allows them to log in with the stored information
    • Design and write CSS for all required pages (no JS for now)

  • Write Website JavaScript
    Breakdown
    • Landing/main page: API calls to retrieve basic information
    • Stats page: more API calls, find ways to efficiently store/retrieve information to prevent unnecessary API calls
    • Login page: write JavaScript that stores the user's credentials (with hashed password) into MongoDB (to come next)
    • Create animations as needed, and more fluid switching between tabs

  • Create Website MongoDB
    Breakdown
    • Create a MongoDB Atlas account (or another platform), and set up collections (e.g. matches, players, teams)
    • Store static information from API calls for past seasons (to prevent extra calls)
    • Store user credentials, and their favorite team
    • Apply MongoDB connection strings to JavaScript

  • Create Necessary Assets for Website (images and etc)

  • Allow users to view all teams and players, providing visualization for very basic statistics (points, shooting percentage)
Standard Requirements
  • Graphing requested data, performing percentage calculations and other types of analysis
  • Provide live match scores to live games.
  • Allow the user to log in without Username/Password, such as using Facebook OAuth (will look further into it)
  • Allow a message board on previous and live games, on which users may interact and chat about the games.
  • On future match pages, provide statistics such as player's past stats over the past few games, and the win streaks of each team.
  • Statistic comparisons between players and teams, for users looking to see how two teams match up.
  • Creating a data filter for stats (e.g. order by points per game, order by games played)
Stretch Requirements
  • Tailor homepage to user's favorite team (e.g. player twitter, logo, customized background)
  • Implement useful iframes such as ticket sales
  • Draw heatmaps for players based on player performance and court activity.
  • Implement a fantasy draft system for users to play around with statistics from previous seasons.

Documentation

Basic Technology Requirements:
  • HTML/Styling
    • We styled our app using Bulma.io. With Bulma we all the css were written for us already and we can simply change the class name according to their documentation to have the desired visual effect. An example is we used a bulma template to style our login page, the code can be found here
  • Redux
    • We store primarily the user state in the Redux store, which powers most of our website (twitter feed, discussion board etc...) We also use redux thunk to make calls to our back-end API, the information from which is stored in our Redux store (such as team stats, player stats, etc)
  • API
  • MongoDB
    • We have 4 collection in our mongoDB: user, team, player, and discussion. All self explanatory: the first saves user email, hashed password, JWT token, base64 profile picture, and other information, the second saves all team stats, the third saves all player stats, and the fourth saves all discussion board material.
  • Deployment
    • We deployed our app on Heroku with the Papertrail add-on to aid debugging. Same applies to our API project found here: cpsc436basketballapi.herokuapp.com. Our main app is found here: cpsc436basketball.herokuapp.com

Basic Contribution Requirements

Tony

I took charge of building an API for our project found here: https://github.com/Tonychen0227/CPSC436api The primary technologies I took charge in were Meteor (most of the setup and adding required middleware) and MongoDB, where I built most of our database operations such as user login/logout as well as discussion.

Yuting

Implemented Stats/Plays, Stats/Teams and Stats/Analysis using Recharts and BizCharts for data visualization Used axio to make call to our backend to retrieve teams and players data Implemented several data filter for users to select and filter data under Stats page

Peter

Styled the app using Bulma.io. Implemented the Navbar and dropdown list for stats page. Implemented the news carousel component and integrated NBA twitter App and team twitter App into our website. Implemented backend calls to retrieve players and teams statistics from our database.

Functionality

This project solves the problem of the lack of a overall hub for NBA fans that includes news, discussion, and stat analysis not found on the official stats nba website. To solve this problem, we added the following integrations all into one web application: Stats analysis and comparisons (which is actually not possible on the official NBA stats page), Discussion board which is user customizable, The ability to select a favorite team and have the UX be affected based on what team is selected, official twitter accounts, and news.

Challenges

  • User Login was faced with several challenges. Facebook SDK is hard to work with, and there were some weird requirements there such as the need for a privacy policy. Halfway through implementation we kind of got screwed over due to Facebook SDK deprecating http support, so we had to migrate. Also a lot of user testing was required with that aspect, and there were some challenges faced there. I think our user login reached a good spot and none of the problems were impossible to deal with, given enough effort was spent to resolve them.
  • Styling was one of our challenges. We were focusing to much on implementing the functionality of our app; when we have made the skeleton of our web it was too hard for us to write the css file due to the complexity and the number of components in our app. We tried writing css with Sketch and Zeplin using drawn structure but different components wouldn't work well with each others. We have to adapt another method to do the styling. We found Bulma.io. It took us around 2 days to read through and understand the documentation and it was fairly easy to use. This tool has greatly decreased our development time. In order to solve styling conflict and difference in opinion. We decided to have one developer styling the entire app

Above and beyond?

  • Built the discussion board from scratch, using JWT token for login persistance, requiring email authentication, and allowing a user to log in via Facebook I think were all aspects that go above and beyond the basic requirements of a typical user login system. Additionally added profile picture support, which I think very few other teams were able to implement.
  • We added media integration in our app. Our initial blueprint for the app is to be a statistic focused app where the sole purpose is for NBA stats enthusiasts to find and play with the data they want. Then we decided we want to make our app as an information hub for NBA fans. We have found API that provided news from ESPN and successfully retrieved the data using HTTP request and stored the news articles in redux state. We also integrated twitter into our app. We decided to map each twitter integration to each user given their favorite team. These features really took the advantage of redux state and made our app more tailored to user's preferences
  • On the stats page, we implemented team and player comparisons: something that is unavailable on the official NBA stats website. This is one of our main standout features of our application.

Prototypes

Home Page
Home Page
Stats Page
Stats Page
Account Page
Account Page
Team Members: Peter Han, Yuting Wen, Tony Chen

cpsc436's People

Contributors

tonychen0227 avatar peterhan7 avatar tonychenmojio avatar blackalkane avatar

Watchers

James Cloos avatar

Forkers

peterhan7

cpsc436's Issues

Scrum Report: July 6

Tony:

Past two weeks:
Implement all of user login, with the following features: email/password login, sha256 hashing, email validation before login, password reset through email, facebook OAuth login, and JWT token caching that signs users back in if they did not log out. Load profile image base64s into database so profile pics may be displayed without access to a server. Retrieve profile images from Facebook GRAPH API.

Next two weeks:
Potentially refactor API into a set of services, allow base64 saving of profile images from facebook to database, allow user to edit their favorite team and display information regarding that, allow a user to upload their own profile image, and bugfixes regarding login feature. The goal is to finish all of user login next sprint.

Roadblocks:
Facebook Graph API being hard to use sometimes, saving base64 profile images from facebook (didn't end up figuring this out), was bottlenecked by sendinblue since it took 3 days to get my API set up.

Image functionality

  • Profile loading from facebook IMPORTANT
  • Loading favorite team picture based on user choice
  • Allow users to EDIT their favorite team as well as profile picture

Scrum report: July 20

What I did over the past two weeks: Integrate facebook profile image into user profile, allow user to edit display name and profile picture, bugfixes regarding password reset and JWT token caching
Next two weeks: Adding additional features to home page, adding a discussion board, and seeing other small things to help out with
Roadblocks: Dealing with 314 errors with profile image upload, translating from JIFF to Base64, storing in db

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.