Giter VIP home page Giter VIP logo

football-stats-dashboard's Introduction

football-stats-dashboard

A dashboard to visualise various aspects of a football team's performance in a season

football-stats-dashboard's People

Contributors

spider101 avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

football-stats-dashboard's Issues

Home Page View

Use the Player Card component(s) to build the home page view.

Hide Squadhub and HomePage views when no club is created.

When no club has been created,

  • Hide all the panels in the HomePageView widget on the HomePage
  • Hide SquadHub MenuItem in the Sidebar
  • Redirect to HomePage if navigating to any other page that may require Club entity to have been created. For instance, the /squadHub route.
  • Add Unit Tests.

Top-level NavBar

It should contain the following components -

  • Branding (title and optionally logo, left-aligned)
  • Search bar to quickly switch to a player's screen (enhance it to search teams too later on)

User Profile section (right-aligned) this can be added as an enhancement later on

Modify Club entity to store Funds instead of Income and Expenditure

Tasks

  • Make income and expenditure properties nullable so that they are read-only
  • Add a funds property to track a club's total financial wealth at any time. NOTE: this can only be set during club creation. Thereafter, it can transitively be updated when income and expenditure properties are updated via player transfers, shirt sales, etc.
  • transferBudget and wageBudget stay as is. But will be derived on the basis of the funds property on the client.

Add Resource for Match Performance entity

This relates a player entity with their performance in a competition. Competitions are to be represented as constant entities (enum). The data will be distinct across seasons. Seasons can be a property on the match performance entity. We need to implement the following:

  • Entity model for the match performance entity
  • Endpoint resource (with RAML documentation) to perform basic CRUD operations on it
  • Custom endpoint to fetch match performance data when given a player ID and a competition identifier with the following logic:
    • playerId is a path param so unique for a given REST call
    • competition will be a query param to filter through the various match performance entities. If there is no competition query param provided, match performance data is aggregated across all competitions for the given player. Can consider using views to perform the aggregation (enhancement).
    • ENHANCEMENT: season can be a query param as well. If not provided, data will be aggregated across seasons.

Reconfigure Home Page to show clubs created by user instead of Club Dashboard

  • Move HomePageView out of HomePage and into its own view file.
  • Design View for display all clubs created by the user (via the Add Club button)
  • Once the first club is created, move the button from the center of the page to either the top or the bottom.
  • Add a new Route to navigate to a given Club's dashboard view and a new Page to accommodate that view.
  • Link each club in the new widget to the Club's dashboard view.
  • Update hiding logic for club-related menu items to show only when a given club is loaded in.

Sidebar Navigation

It should contain the following components -

  • List group consisting of -
    • List Item with Icons
    • Sub-Lists nested under a top-level list item
  • Settings Section (bottom aligned)

Behavior -

  • Each list group is a collection of similar data and views.
  • Each list item navigates to a new view on the dashboard when the user clicks on it.
  • The side-bar is can be collapsed to a view with just icons representing each list item visible.
  • The user should be taken to the settings view when clicking on the settings button.

Add service layer for club

Tasks

  • Create a service class for club resource and move business logic inside it
  • Create a data provider for club related tests
  • Update tests for resource class and add tests for service class by leveraging the test data provider
  • Update player creation logic to use the club service instead of the club DAO

Manage User Authentication flows on UI

  • Add SignIn and SignUp form components.
  • Mock server behavior for auth flow via DashboardClient methods and json-server
  • Handle auth flows like creating a new account, authenticating a user when logging in, and logging out the user
  • Hide main application if there is no authenticated user. Show auth forms instead.

Squad View

  • Table Container with the following columns (to start with):

    • Name
    • Nationality
    • Role/Position
    • Wages
    • Form Histogram (last 5 matches)
    • Morale Indicator
    • OVR
  • Dropdown menu to filter rows (for instance, filter to show only Midfielders)

  • Dropdown menu to pick a subset of columns to display

Trim down All Clubs View

Tasks

  • Create a separate model for data to be returned from this endpoint with a subset of the data to be found on a Club entity. Just need the club name and created_date properties. (and club crest URL when that is implemented)
  • Update client UI to display the created date on the tiles for each club.

Update SquadHub view to show club squad and add new players to club

  • Update the squadhub client endpoint to use the current club id instead of the hard-coded one
  • Inject Add Player widget into the squad hub view by composing the PageAction and DialogForm widgets. Use a skeleton form with basic player detail fields as placeholder for the dialog form.
  • Add Unit tests.

Incorporate react-redux into the application

  • Install and set up react-redux package
  • Wrap the application in a Provider component and use the Redux Hooks from here to create the application state.
  • Pull in the SquadHub view into its container component (page) using the hooks

Update club creation form to match server changes

Tasks

  • Remove the Transfer Budget and Wage Budget fields in the form and in tests (if any)
  • Add a Manager Funds field in the form.
  • Add a slider element in the form to determine transfer and wage budget break up. Set their values on the basis of the percentage break up before posting the data to the server.

Player Comparison - Polar Plot

This will consist of a container with two polar plots overlaid on each other, with the attribute groups as the legend.

Add resource for club entity

  • Add api documentation for resource involving club entity
  • Add models for club entity
  • Add DAO methods for working with the club data
  • Add resource for doing CRUD operations on the club entity
  • Add /players endpoint to get player data for all players in a club (to be displayed on squad hub page)
  • Add UTs

Diverging Bar Chart List Item

This can be its own component but will be displayed similar to a list item (looped over). It will consist of the following

  • label for the attribute being charted
  • styling to allow it to be highlighted
  • flag to indicate if it should be highlighted

Player Comparison - Diverging Bar Chart List

This will consist of the following -

  • a list of Diverging Bar Charts (one for each in-game attribute)
  • pass a flag down toe the Diverging Bar Chart items for the selected attributes which need to be highlighted

Add player resource

Add a new resource for managing player data on the backend with the following endpoints:

  • Create player data
  • Update player data
  • Remove player data
  • Fetch player data

Player Attributes Table

  • A dropdown to a select a role to focus on
  • Divided into columns for each attribute group
  • Each cell has the attribute name, attribute value and an indicator for attribute progress (incr/decr/same)
  • A flag to highlight specific attributes in each for a specific role

Player Comparison View

This will consist of the Polar Plot and the composite with the Diverging Bar Charts. Along with that, it will also include -

  • a toggle to switch between the Diverging Bar Chart and Polar Plot
  • two Filters: one to select the player to compare against and one to select attributes to highlight

Scaffold the foundations of the app

  • Use the Sidebar and MenuItems widgets to setup the layout of the app.
  • Inject react-router into the app and link to a couple of the created views (Home and Match Performance)
  • (Optional) Add MUI theming to the app as well.

Update HomePageView to not use hard-coded dummy data

  • Rename to something more appropriate like ClubView.
  • Remove fake data generators and usages wherever possible.
  • Add client for fetching club data.
  • Populate panels with club data. If any panel requires more, plug the Add <Entity> widget (built in #) into that panel.
  • Add Unit Tests (maybe snapshot tests).

Match Performance View

  • Match performance table composite
  • Line chart/histogram to capture overall match rating in the season

Incorporate the form for adding a new Club entity into the application

  • Design Add Club button inside a widget (re-use it when doing the same for Home Page dashboard panels)
  • Update HomePageView to show the aforementioned widget when no club has been created and tie the Add Club form to it.
  • Add client for hitting server endpoint for creating Club.
  • Investigate if useQuery can be used for managing this flow.
  • Add Unit Tests.

NOTE: Remember to remove the hard-coded team name title in the AppBarMenu component. Use the club name returned in the club GET call.

Design multi-step form to add all details about player

The form should have one step for:

  • player metadata
  • player attributes
    • attribute categories
    • attribute groups

Integrate this form with the Add Player widget and verify player creation works. Add Unit tests wherever possible.

Note: If there are any compatibility issues with the server, create a ticket for the server if changes are needed on that end.

Player Attribute/Progress View

  • Line Chart to show player attributes
  • Line Chart to show player progress
  • Player attributes table
  • A toggle to switch between player attributes and player progress (OVR) section
  • Dropdown to select role which filters the attributes being highlighted in the table and which data points are displayed in the chart

Card with Chart

Inject a chart (FusionCharts or chart.js) into a material-ui card. Consider the following

  • Define Proptypes to be extendable for different chart types

Enhance MatchPerformance view to work with non-existent data on player creation

When creating a player, the match performance data will not be entered by the user. Instead, they can move to the MatchPerformance view which will show a "No data..." heading with an Add button. Also, a form for adding the match performance data for the given player. The user is allowed to submit the form without making any entries (zero for all values). Thereafter, the flow will work out of the box. Add UTs.

Match Performance Table

  • Table to display match stats for the player
  • A dropdown with the column names as checkboxes to filter the table view

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.