updates docs
This commit is contained in:
@@ -32,6 +32,7 @@ services:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
<<: *cenv
|
||||
POCKETBASE_ENCRYPTION_KEY:
|
||||
ports:
|
||||
- "8090:8090"
|
||||
networks:
|
||||
|
||||
@@ -74,7 +74,12 @@ export default defineConfig({
|
||||
{
|
||||
label: 'Import/Export',
|
||||
link: '/guides/import-export/'
|
||||
}, {
|
||||
},
|
||||
{
|
||||
label: 'Integrations',
|
||||
link: '/guides/integrations/'
|
||||
},
|
||||
{
|
||||
label: 'API',
|
||||
link: '/guides/api/'
|
||||
}]
|
||||
|
||||
BIN
docs/src/assets/guides/strava_api_app.png
Normal file
BIN
docs/src/assets/guides/strava_api_app.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
BIN
docs/src/assets/guides/wanderer_integration_strava.png
Normal file
BIN
docs/src/assets/guides/wanderer_integration_strava.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
@@ -20,17 +20,22 @@ Since we use an unmodified installation of meilisearch you can use all variables
|
||||
| -------------------- | ----------------------------- | ------- |
|
||||
| MEILI_NO_ANALYTICS | Disable meilisearch telemetry | true |
|
||||
|
||||
## Pocketbase
|
||||
| Environment Variable | Description | Default |
|
||||
| ----------------------------- | ----------------------------------------------------------------------------------- | --------- |
|
||||
| POCKETBASE_ENCRYPTION_KEY | Valid 32 character AES key. Used to encrypt secrets | |
|
||||
| POCKETBASE_CRON_SYNC_SCHEDULE | Valid cron expression. Sets how often trails are synced from 3rd party integrations | 0 2 * * * |
|
||||
|
||||
## Frontend
|
||||
|
||||
| Environment Variable | Description | Default |
|
||||
| --------------------- | -------------------------------------------------------------------- | ---------------------------------- |
|
||||
| --------------------- | -------------------------------------------------------------------- | ----------------------------------- |
|
||||
| ORIGIN | Public IP or hostname (including the port) of your wanderer instance | http://localhost:3000 |
|
||||
| BODY_SIZE_LIMIT | Maximum allowed upload size | Infinity |
|
||||
| PUBLIC_POCKETBASE_URL | IP or hostname (including the port) of your wanderer instance | http://db:8090 |
|
||||
| PUBLIC_DISABLE_SIGNUP | Disables signup option for new users | false |
|
||||
| PUBLIC_VALHALLA_URL | Public IP or hostname (including the port) of a valhalla instance | https://valhalla1.openstreetmap.de |
|
||||
| PUBLIC_NOMINATIM_URL | Public IP or hostname (including the port) of a nominatim instance | https://nominatim.openstreetmap.org|
|
||||
| PUBLIC_NOMINATIM_URL | Public IP or hostname (including the port) of a nominatim instance | https://nominatim.openstreetmap.org |
|
||||
| UPLOAD_FOLDER | Folder from which wanderer auto-uploads trails | /app/uploads |
|
||||
| UPLOAD_USER | Username for the account with which wanderer auto-uploads trails | |
|
||||
| UPLOAD_PASSWORD | Password for the account with which wanderer auto-uploads trails | |
|
||||
|
||||
65
docs/src/content/docs/guides/integrations.md
Normal file
65
docs/src/content/docs/guides/integrations.md
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
title: Integrations
|
||||
description: How to set up third-party integrations with wanderer.
|
||||
---
|
||||
|
||||
You can automatically sync trails to wanderer at regular intervals using the third-party integration feature. Currently, we support two providers: **strava** and **komoot**.
|
||||
|
||||
It is important to note that synchronization only works from the provider to wanderer and not the other way around. Additionally, if a trail has already been synced to wanderer, subsequent changes made in the provider will not be transferred unless the trail is deleted in wanderer.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
wanderer encrypts the credentials required to log in to either provider. To enable this encryption, you must create an encryption key and provide it via the `POCKETBASE_ENCRYPTION_KEY` [environment variable](/getting-started/configuration#pocketbase) to the `wanderer-db` container. To generate a new encryption key, run the following command:
|
||||
|
||||
```bash
|
||||
openssl rand -hex 16
|
||||
# Example output: ce7f0ddb97100c42e6409a8537c11e23
|
||||
```
|
||||
|
||||
:::caution
|
||||
Do not share this key with anyone!
|
||||
:::
|
||||
|
||||
Once you have set the encryption key, restart the `wanderer-db` container and navigate to `/settings/integrations`.
|
||||
|
||||
## strava Integration
|
||||
|
||||
### Creating an App in strava
|
||||
|
||||
Before integrating strava with wanderer, you need to create an API application in strava. Visit [strava's API settings](https://www.strava.com/settings/api) and follow the steps to create a new API application. Your setup should resemble the following:
|
||||
|
||||

|
||||
|
||||
### Setting Up the Integration
|
||||
|
||||
1. Copy the **Client ID** and **Client Secret**.
|
||||
2. Go to the integrations page in wanderer's settings.
|
||||
3. Click the settings button for the strava integration.
|
||||
4. Enter your **Client ID** and **Client Secret**.
|
||||
5. Choose whether you want to sync routes, activities, or both.
|
||||
|
||||

|
||||
|
||||
6. Save the settings and toggle the integration on.
|
||||
7. You will be redirected to strava's authorization page. Keep all checkboxes selected and click **Authorize**.
|
||||
8. You will then be redirected back to wanderer. The strava integration is now active.
|
||||
|
||||
## komoot Integration
|
||||
|
||||
The komoot integration requires only your komoot username and password:
|
||||
|
||||
1. Open the komoot settings from the integrations menu.
|
||||
2. Enter your komoot credentials.
|
||||
3. Save the settings.
|
||||
4. Toggle the integration on. It will become active immediately.
|
||||
|
||||
Your planned and completed trails will now sync with wanderer.
|
||||
|
||||
## Sync Interval
|
||||
|
||||
By default, trails are synced every night at **02:00 AM**. You can modify this schedule using the `POCKETBASE_CRON_SYNC_SCHEDULE` [environment variable](/getting-started/configuration#pocketbase).
|
||||
|
||||
:::note
|
||||
Please set a reasonable sync interval. Both strava and komoot impose usage limits on their APIs. Exceeding these limits may result in rejected requests or account suspension.
|
||||
:::
|
||||
|
||||
@@ -2,7 +2,7 @@ import { z, ZodType } from "zod";
|
||||
import type { Integration } from "../integration";
|
||||
|
||||
const StravaSchema = z.object({
|
||||
clientId: z.number({ coerce: true }).int().positive(),
|
||||
clientId: z.number({ coerce: true }).int().nonnegative(),
|
||||
clientSecret: z.string().length(40).optional().or(z.literal('')),
|
||||
routes: z.boolean(),
|
||||
activities: z.boolean(),
|
||||
|
||||
Reference in New Issue
Block a user