Benji Riethmeier
Icon

Courtside Devlog 2: Team Work

1/23/2023 | 4 min read

Hello! My name is Benji Riethmeier, and I am a full stack engineer for Courtside. This is the devlog for the week of January 23, 2023.

What is Courtside

Courtside is a mobile app that allows users to fully customize their sports experience by following the exact information they want to see. Users can follow their favorite sports, teams, players, and even individual stats.

The app is built with React Native (using the Expo platform) and Typescript on the frontend. On the backend, the Flask framework serves as our API and MongoDB is used for our database.

What is Courtside (Currently)

Users can follow their favorite sports Basketball, teams, players, and even individual stats.

This Week

Tasks

I had a few different goals this week (ranked by priority):

  1. Allow users to follow teams
  2. Help integrate new members onto the frontend stack
  3. Write documentation for my backend routes

Adding Teams

The first part of this process was creating new backend routes to get team data from the database. I created two new routes: /teams which returns all teams in the database, and /teams/<code> which returns the data for a specific team.

Then I created a new screen which displays all team options and lets users select the option they want.

The Team Selection screen

The Team Selection screen

On this screen, when the user hits the Update button, the results are saved to user’s preferences on in device storage and in the database. The next step will be displaying the user’s teams on the Teams Dashboard page.

Adding Team Members

A few of our members have switched onto the frontend stack for this semester since most of our backend is fleshed out and handled by Rylee, Jake, and me.

To help with this transition, I added a few pages to our GitHub wiki about resources that can be used to learn JavaScript and React Native. This includes documentation websites, videos, and reference sites. My hope is that soon all teams members will be fully integrated on the frontend and will be able to create useful and productive code.

Documenting the Backend

On the backend, I wrote the handlers for our authentication system and this week I went back to fully document them. Instead of using JavaDoc like I did for the frontend JavaScript code, I followed Google’s Python Style Docs instead.

@app.route('/team/<code>', methods=['GET'])
def get_team(code):
    """Returns the data for the team with the specified code
    Args:
        code: the team's three letter code as a string
    Returns:
        A Response object with the team's data including its id, name, and team code
    """

For methods, this format has you writing a quick description of a function with its arguments(Args), return value (Returns), and any errors that the function raises (Raises).

For modules, this format has a one line summary of the module, followed by a more in depth explanation of exported classes and functions, and an example of usage.

Problems

A challenge that happened this week was that we had a major change in how the backend works due to use using a new data source for our sports data. After this change, a lot of my work had to stop because I had to go back and edit previous code to work with the new API.

This required me to go back and edit all the components related to user stats. This was easier than it could have been due to my work done on refactoring last week .

Despite this setback and error in communication, I was still able to complete my other work for this week.

The Future

Goals

In the upcoming weeks, I want to further flesh out the user authentication system by adding these new features.

  1. The ability to change one’s email and password.
  2. An option to recover your password if you forgot it
  3. Confirm the user’s email when they are creating an account
  4. A tour that guides users through some of the app’s features when they first create an account

Conclusion

That’s all for this week. See you next week for another update!