Tennis League Story

2024-10-16

How I ended up running tennis league software for my tennis club.

Start

I started playing tennis about two years ago and was looking for a way to find players to hit with. That’s when I found Pacific Beach Tennis Club (PBTC). PBTC had this thing called a flex league, which was basically a shared email list managed by one guy. There were three separate lists.

I emailed the (awesome) guy running it, and after a couple of days, he added me to the league. I could tell he was doing everything manually.

Problem

I wanted to join the 4.0 league because the 3.5 league didn’t have many matches each season. The whole process of being added to the next league was slow, with everything being managed by just one person. Plus, I didn't really get many matches in that league.

Solutions

I decided to start a WhatsApp group to see who was actually active in the 3.5 league. This worked somewhat, but I was kind of doing it behind the manager’s back. Then, I thought, why not make this a web app that could handle everything? So, I built a small prototype with a leaderboard for the current league players.

I pitched the idea of using this app to the manager. He quickly saw the value in not having to do everything manually. I’m sure he was tired of it by then, after managing it all for seven years. He gave me a list of requirements like having a contact list, a way to email everyone, and the need for three separate leagues. Everyone had to have access to it. We used this method for a year, and then the manager asked if I wanted to take over the league entirely—I agreed.

Early Design Choices

Since I had experience building react web apps, I decided to use a framework called nextjs, which made it simple to host the app and get it running quickly. I hosted it on vercel.

For the database, I chose AWS DynamoDB because it was free, flexible, and something I was already familiar with. To handle user authentication, I integrated Auth0 to make sure that only authorized users could access the email list.

I built out the app’s features and tested it on a smaller group of players. We basically treated it like a playoff, with each league having its own page defined in the database. I still had to manually populate the leagues every season.

Initially, emailing everyone was a bit of a hassle because people had to copy a list of emails into their own email clients, which sometimes caused problems with old email software. To fix that, I integrated AWS Simple Email Service into the app to make emailing easier.

Problems that arose

Matchmaking

It was difficult to gauge people’s actual skill levels, so sometimes they’d get into a match and either crush their opponent or get crushed. To address this, I used a matchmaking algorithm from Microsoft called TrueSkill to better rank players based on their performance.

Emailing people

The manual process of copying emails into clients like Gmail was causing issues, especially with older email software. I introduced AWS Simple Email Service to streamline this, allowing users to email directly through the app.

Tournaments

This wasn’t a problem but more of a feature request. I added the ability to organize tournaments within the league. The logic was complex, but I eventually got it to work.

Current Problems

The app is far from its ideal state, which is why I’m working on a new version. Here are some of the current issues:

  1. People still have to email me to add or remove themselves from individual leagues.
  2. I set up access per league but not for the entire club, meaning users from one league can't view others. It’d be nice if everyone could see all leagues in the club.
  3. Creating a new league every season is a hassle. I’d like this process to be automatic so I can simply announce the new season.
  4. Booking court time is a pain. People have to reserve a court first, then find someone to play with. I don’t have much control over this aspect. :shrug:
  5. The ranking system might not be clear to everyone.
  6. There’s no way to selectively email people other than creating your own list. A filter or level-based system would be helpful.
  7. I want to spin off new leagues, but the current process is clunky. I need a better admin system to manage this.

Conclusion

The main problem I’m facing now is time. I want to make everything better, but as the software grows, it’s becoming harder to manage and add new features. And I'm crunched for time. Looks like I’ll need to do a part two of this. 🎾