Strength Journal

Mon Dec 12 2022

Tonight, I am super excited to announce the launch of my personal web application project, Strength Journal. The first commits on this project were planted on October 22, and I’ve been working hard since then to build this site out into something that not only fulfilled my own needs, but was high enough quality to release to the public.

In this post, I’ll document what prompted the project, some of my design choices, and my future plans for Strength Journal.

The Problem

Anyone who has successfully trained for strength has applied the principles of progressive overload in one form or another -- making the workload just a little bit harder than last time so that you force the body to adapt. In the first few months of training, this could be as simple as adding five pounds to the bar from one workout to the next. However, more advanced trainees need a more elaborate progression scheme that could span a training cycle of several months.

Whether you’re a beginner or advanced lifter, a history of your workouts is needed to plan progression. Many lifters, such as myself up until recently, carry around a pen and notebook to physically write down the exercise, bar weight and sets. Then, we can flip through the pages to see our workout history, and make an informed selection for the weight on the bar. Of course, this physical tracking is kind of kludgy in the age of smartphones, mobile applications and cloud data.

I’m definitely not the first person to try to create a digital replacement for the workout journal. However, I’ve found that existing products don’t quite meet my needs. They tend to focus too much on workout planning, and make it hard to veer from your template when different training decisions are made on the fly. I also found it surprisingly difficult to access exercise history while editing a workout -- the most important data point I need to choose the weight on the bar. So, I set out to do better, and build something myself.

The Design

The Strength Journal project is at its core about data. The goal is to digitize what I previously recorded through pen and paper. And that digitization is what enables all the improvements in experience that web-based applications provide. The choice to represent this information in a relational database was obvious. So, the first major design element I had to consider is what I wanted the schema to look like. Below is a real sample from my workout journal that I used to guide the analysis:

The first entity to model seemed obvious to me by the data headings -- the Workout entity, which I eventually named WorkoutLogEntry. A WorkoutLogEntry is uniquely identified by the start date time, can have an optional title, and perhaps additional metadata like bodyweight at the time of the workout (bodyweight it a very important data point for lifters, since most are stronger at a heavier body weight -- the same bar load at a lower body weight is effectively a personal record). The line items underneath the workout were a bit less obvious. To retain the same structure as my paper journal, each row in the system would track the exercise, the weight, and a comma-delimited list of the reps in each set. The comma-delimited list didn’t sit well with me as the RDMS would be fighting against me instead of working for me. So, I decided to break this down a little further, where each set would be a line item. So, if I did five sets on an exercise with the same weight, that would still be five rows in the database.

I scratched together a rough schema for a multi-user system as shown in the diagram below:

Things have shifted a bit as I started actually implementing the code but I still ended up using this high level structure.

The Technology

I knew from the start this project that I wanted this to be a web application so that I could log workouts from any device. I made specific technology choices mainly based on my own experience, due this being a fairly ambitious one-man project. This wasn’t the time to take on learning something brand new.

Data Access

I chose SQL Server for my RDMS. Probably any other relational database would have worked just as well, but SQL Server is what I’m most comfortable working with, and I have the goal of DBA certification next year.

I used Entity Framework to define the schema and implement my data access logic. I used a code-first approach so that I could iterate quickly without manually building the database migrations.

Back End

As my ORM choice probably already gives away, the server code was written in C#, within the ASP.NET MVC framework. I’m actually using very little of MVC itself, with most endpoints being implemented as WebApi controllers. MVC is just the framework I use to inject the Angular code that powers the application front end, and razor strictly powers the home page and login/signup forms.

For Identify and Access management I chose Auth0, using the custom forms flow for sign up and authentication.

Front End

The application itself (after you’ve authenticated) is a single page application built in Angular. I chose Angular because it’s the SPA framework I’m most experienced in, and since I don’t hate myself, I wanted to stick to a statically typed language.

Styling and CSS have never been a strong point for me, so I purchased the App Stack template for Bootstrap. This provided me with a good starting point for components and styling.

Infrastructure / Cloud

The database was created as an Azure SQL database. The application is running as an Azure Application Service, which keeps the infrastructure hands off for me. Using the deployment slots feature, I also get zero downtime deployments without having to implement any complicated tech.

Final Thoughts

This project has been a lot of hard work, and I’m super excited to share it with the world. There’s definitely some areas that are rough around the edges, but I’ll be refining and polishing them in the coming months.

I’m not sure how much adoption this will have besides myself and a few people close to me, but whatever comes of it, it was an excellent learning opportunity and I’m proud of what I have achieved.