top of page

Maraplan - Marathon planner

An app that makes a marathon plan based on your running data and preferences.

  • Java - Spring boot

  • React - TypeScript - Vite

  • PostgreSQL

  • Strava OAuth2 integration

  • 100+ backend tests - CI/CD

maraplan icon.png

What it is

Maraplan is a training plan app for runners. You log in with Strava, it looks at what you have actually been running, and it builds you a week by week plan toward a race. I built it while training for my own marathon, mostly because every free plan generator I tried either ignored my actual fitness or just grew the distance by some fixed percent every week with no real logic behind it.

The engine

This is the part of the project I care about the most. A lot of training calculators just take your weekly distance and grow it by a fixed percent, and call your long run some fraction of that. It sounds fine until you actually run the numbers. If your long run is a quarter of your weekly volume and your weekly volume peaks at 24km, your longest training run before a half marathon ends up being 6km. That does not get you ready for 21km at all.

So the engine works the other way around. First it looks at your last month of running and evaluates your level, based on your weekly volume and your longest run. That level decides how close your long run gets to the actual race distance and how big a piece of your week it is allowed to take up. Then it works backward from that long run to figure out how much weekly volume you actually need, instead of the other way around.

From there your weekly distance climbs toward that peak, but never faster than two limits allow at the same time. One is a simple percent per week cap that you control with a slider. The other is something called an acute to chronic workload ratio, basically your training load this week can not be more than 1.3 times your average over the last four weeks. That number is not something I made up, it comes from actual injury research in sports science. On top of that, every fourth week the plan backs off on purpose so your body gets time to catch up instead of always climbing.

Closer to the race the plan tapers, and how long that taper is depends on the distance, a marathon gets a longer taper than a 10k would.

Strava login

You sign in through your real Strava account, there is no separate password to create. It uses OAuth2, so the app never sees your Strava password, only a token that lets it read your activities, and that token is encrypted before it gets saved.

Backend

Java and Spring Boot on top of a PostgreSQL database. The database changes are tracked through migrations, and there is a CI pipeline on GitHub Actions that runs over 100 tests, on every push.

Frontend

The frontend is React with TypeScript. It covers the whole flow, logging in, syncing your Strava runs, generating and editing your plan, and showing your progress week by week. There is also a settings menu where you can turn on dark mode, change date format, or switch between kilometers and miles.

Why it is not live

I use this myself for my own training, and I never put it online for other people to log into. Part of it is that the moment someone else logs in with their real Strava account, I am responsible for their tokens and their training data, which is a different kind of responsibility. The other part is that I am not a health professional, I just built something based on real training principles I researched, and I do not want random people out there following a plan from my app and getting hurt because of it. So instead of hosting it publicly I recorded a demo of it running instead.

Demo recording

Linus Ekberg

bottom of page