|
| 1 | +# Strong APP Workout Fetch |
| 2 | + |
| 3 | +This is a Rust-based service to fetch workouts from the [Strong App](https://www.strong.app/) (available for [Apple](https://apps.apple.com/us/app/strong-workout-tracker-gym-log/id464254577) and [Android](https://play.google.com/store/apps/details?id=io.strongapp.strong)) and store them in a ClickHouse database. |
| 4 | + |
| 5 | + |
| 6 | +The URL to the API backend is not provided here, for now, because it's not entirely public and because of possible legal implications. |
| 7 | + |
| 8 | +If using docker-compose, the service will run 18:00, 18:30, 19:00, 19:30, 20:00 and 20:30, but you can change this in the `Dockerfile`. |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +## Why? |
| 13 | + |
| 14 | +So you can do fun stuff with your workout data, like doing silly grafana dashboards. |
| 15 | +For example, you can use the [Grafana Clickhouse plugin](https://grafana.com/grafana/plugins/grafana-clickhouse-datasource/) to visualize your workout data. |
| 16 | + |
| 17 | +You can make heatmaps, like the one you have on github, or you can make a dashboard that shows your progress over time, or you can make a dashboard that shows your workout history. |
| 18 | + |
| 19 | + |
| 20 | +You can find the Grafana JSON for the [heatmap](./examples/grafana/heatmap.json) and for the [excercises per week](./examples/grafana/excercises-per-week.json) in the [examples](./examples/grafana) folder. |
| 21 | + |
| 22 | + |
| 23 | +## How to use |
| 24 | + |
| 25 | +0. Have your ClickHouse database ready and running |
| 26 | +1. Clone this repo |
| 27 | +2. Create `.env` file in the root directory with the following content: |
| 28 | + ```ini |
| 29 | + STRONG_BACKEND=https://strong_backend_url.com |
| 30 | + |
| 31 | + STRONG_USER=your_strong_user |
| 32 | + STRONG_PASS=your_strong_pass |
| 33 | + |
| 34 | + CLICKHOUSE_URL=http://clickhouse-server:8123 |
| 35 | + CLICKHOUSE_USER=default |
| 36 | + CLICKHOUSE_PASS= |
| 37 | + CLICKHOUSE_DATABASE=workouts |
| 38 | + CLICKHOUSE_TABLE=workout_sets |
| 39 | + ``` |
| 40 | +3. Run with `cargo run` |
| 41 | + |
| 42 | +### Alternatively: Use Docker Compose to run the service: |
| 43 | + |
| 44 | +1. Make sure you have Docker and Docker Compose installed |
| 45 | +2. Create a `.env` file in the root directory with the same content as above |
| 46 | +3. Start the service with `docker compose up -d` |
0 commit comments