Inspiration

I've always loved sports, and I've also had a chance to do stats for some football games. I was highly disappointed with the software use for it. I've always wanted to take the time to make something to replace it, but recently got enough motivation to do so.

What it does

Right now, the software is able to create a roster of players with their names and numbers, and those rosters can be used in a Game. While the complete functionality for keeping game stats isn't implemented, it is able to take the roster of players, and create a few specific plays/stats for those players and save it to a file. It also has a proof-of-concept live-statistics system, where each play is sent to the internet to be distributed real-time.

How we built it

The tech stack of the client includes Electron and React. Electron provides an environment to develop web apps as native desktop applications. Other apps such as Visual Studio Code, and Discord are built on electron. React is used to create the views, just as one would use it for an actual website.

There's also a temporary server deployed in Google Cloud, which reflects the WebSocket traffic from the statistics client. For the time being, a simple webpage receives those reflections, and prints the raw data to a browser. The reflector server is built on Node.js and shipped as a Docker container.

Challenges we ran into

One of the pitfalls of Electron is its security barriers, which is a good thing, but can hamper the speed of development for an event like this. It took quite a bit of time trying to debug issues with accessing the filesystem from the rendering process. There's also an issue with electron where the application will run perfectly fine in a development environment, but breaks when building a production release.

Also, the game of football itself is a challenge. Although it's the sport I understand most, the sport can be insanely complicated from a statistics point of view. One play might only have one person running and another tackling, or could be as complicated as having multiple turnovers, laterals, or penalties. This makes it quite difficult to design a program flexible enough for all possibilities, while still trying to take care of most things automatically.

Accomplishments that we're proud of

The roster system so far works extremely well for being built so quickly. I'm also proud of getting a server deployed quickly enough in Google cloud to simply show some basic connectivity external to the client. This is some of my most efficient work creating a real application, and it's something I now want to dedicate time to after this hackathon.

What we learned

I've always toyed with the idea of electron applications, but the complex manner of communicating from the render to the background processes made me wary. During the creation of this app, and having issues with the inter-process communication, it forced me to figure it out.

Also, I did have some typescript experience before, but during this project, some of the typing rules and warnings finally clicked, and I'm definitely a more proficient typescript user after this process.

What's next for Modernized Sports Stats Platform

  • A name
  • Finish implementation of all statistics needed for Football
  • Build out a true online environment to surround the stats program.
  • Expand to other sports

I'd really love this to become a useful tool, especially with the interconnected nature of the entire system I'd like to eventually flesh out.

Share this project:

Updates