OpenPace is an open-source, web application that helps runners run their fastest marathon built with Phoenix LiveView. It features tools to hit new personal bests, analyze your training program, and take a deep dive into your race performance.
From a developer standpoint, it features:
-
Sync's all fitness data from Strava including activities, GPS, heart rate, pace information.
-
Canvas charts provided by Chart.js using Phoenix LiveView hooks
-
Maps using Mapbox GL
-
Payment processing with Stripe using the Stripity Stripe
I'm actively working on Openpace and can use any help I can get. Feel free to create an issue or open a pull request.
Documentation is hosted using ex_doc. And you can view the documentation here.
We provide several methods for running Openpace, pick the one that best fits your use case.
Running Openpace using Docker is a great option for local usage in case you don't have Elixir installed.
git clone https://github.com/edance/openpace.git
cd openpace
# Copy the example env to your own file and edit it
cp .env.example .env
# Running with the default configuration
docker compose up -d
# Visit localhost:4000
open http://localhost:4000
You'll need to install Elixir v1.13 or later. I recommend installing using asdf with asdf install elixir
.
git clone https://github.com/edance/openpace.git
cd openpace
# Copy the example env to your own file and edit it
cp .env.example .env
# Use this command to export the variables into your system
export $(cat .env | grep -v ^# | xargs)
# Get dependencies, create and seed database, and install js deps
mix setup
# Start Phoenix Server
iex -S mix phx.server
# Visit localhost:4000
open http://localhost:4000
You will then be able to sign in with a@b.co
and the password password
.
- Create an account with an email (or sign in with
a@b.co
and passwordpassword
) - Visit
/dashboard/strava-bulk-upload
and follow the instructions on the page
You will be required to download your data from Strava and upload the zip file to this page. When completed, you'll have all of your activities as well as trackpoints and laps.
Add the environment variables below and sign in with Strava.
When fetching many activities from Strava, you will receive a list SummaryActivity
which does not contain trackpoints or laps.
To run locally, you'll need to set up a strava api account. And set the following environment variables.
-
STRAVA_CLIENT_ID
-
STRAVA_CLIENT_SECRET
-
STRAVA_WEBHOOK_TOKEN
There are additional environment variables in .env.example
.
Please create a github issue with any ideas, feedback, or suggestions, etc. Pull requests are welcome.
The project was originally under the domain squeeze.run with the goal of taking all your running data and "squeezing" it into summaries and graphs.
This project is run on fly.io. You can run your own with fly deploy
.
Fly deploy does not include mix
so one-off tasks have to be run using a command like:
fly ssh console -C "/app/bin/squeeze eval Squeeze.TaskModule.method"
See Squeeze.Release.migrate
for an example.
You can also open remote iex with:
fly ssh console -C "/app/bin/squeeze remote"