Giter Club home page Giter Club logo

openpace's Introduction

Built with Spacemacs Build Status Coverage Status license

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:

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.

Dashboard

Documentation

Documentation is hosted using ex_doc. And you can view the documentation here.

Development

We provide several methods for running Openpace, pick the one that best fits your use case.

Docker

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

Direct installation with Elixir

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 [email protected] and the password password.

Import Strava Activities

Option 1 (detailed activities with trackpoints and laps)

  • Create an account with an email (or sign in with [email protected] and password psasword)
  • 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.

Option 2 (summary activities without 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.

Environment Variables

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.

Feedback

Please create a github issue with any ideas, feedback, or suggestions, etc. Pull requests are welcome.

Why is it named squeeze?

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.

Deployment on Fly

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"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.