Colota - Android GPS Location tracker
feat: add GeoPulse integration template and documentation
Max Dietrichb07488052619
diff --git a/README.md b/README.mdindex 5609b434..623d0204 100644--- a/README.md+++ b/README.md@@ -14,7 +14,7 @@ Colota sends your location to your own server over HTTP(S). It works offline, su## Features-- **Self-Hosted** - Send location data to your own server. Works with Dawarich, OwnTracks, PhoneTrack, Reitti, Traccar, Home Assistant, or any custom backend.+- **Self-Hosted** - Send location data to your own server. Works with GeoPulse, Dawarich, OwnTracks, PhoneTrack, Reitti, Traccar, Home Assistant, or any custom backend.- **Privacy First** - No analytics, no telemetry, no third-party SDKs. Open source (AGPL-3.0).- **Works Offline** - Fully functional without a server. Export as CSV, GeoJSON, GPX, or KML.- **Location History** - View daily summaries, trip segmentation, calendar with activity dots, and per-trip export.@@ -71,7 +71,7 @@ For full setup, server configuration, and integration guides, see the [documenta## Documentation-Full docs at **[colota.app](https://colota.app)** covers configuration, server integration (Dawarich, OwnTracks, PhoneTrack, Reitti, Traccar, Home Assistant, and custom backends), geofencing, data export, API reference, battery optimization, troubleshooting, and development setup.+Full docs at **[colota.app](https://colota.app)** covers configuration, server integration (GeoPulse, Dawarich, OwnTracks, PhoneTrack, Reitti, Traccar, Home Assistant, and custom backends), geofencing, data export, API reference, battery optimization, troubleshooting, and development setup.## Build from Sourcediff --git a/apps/docs/docs/integrations/api-templates.md b/apps/docs/docs/integrations/api-templates.mdindex a5d24d3d..6e3c057c 100644--- a/apps/docs/docs/integrations/api-templates.md+++ b/apps/docs/docs/integrations/api-templates.md@@ -10,6 +10,7 @@ Colota includes built-in templates for popular backends. Select a template in **| -------------- | ----------- | ------------- | -------------------------------- | --------------------------------- || **Dawarich** | POST | `cog` | `_type: "location"` | OwnTracks-compatible format || **OwnTracks** | POST | `cog` | `_type: "location"`, `tid: "AA"` | Standard OwnTracks HTTP format |+| **GeoPulse** | POST | `bear` | _(none)_ | Native Colota format || **PhoneTrack** | POST | `bearing` | `useragent: "Colota"` | Nextcloud PhoneTrack format || **Reitti** | POST | `bear` | `_type: "location"` | Standard field names || **Traccar** | GET | `bearing` | `id: "colota"` | OsmAnd protocol with query params |diff --git a/apps/docs/docs/integrations/geopulse.md b/apps/docs/docs/integrations/geopulse.mdnew file mode 100644index 00000000..90fe6cec--- /dev/null+++ b/apps/docs/docs/integrations/geopulse.md@@ -0,0 +1,56 @@+---+sidebar_position: 2+---++# GeoPulse++[GeoPulse](https://github.com/tess1o/geopulse) is a self-hosted location tracking and visualization platform.++## Setup++1. **Install GeoPulse** - follow the [GeoPulse documentation](https://github.com/tess1o/geopulse)+2. **Add a Colota location source** in GeoPulse under **Location Sources**+3. **Set a username and password** for the Colota source+4. **Configure Colota**:+ - Go to **Settings > API Settings**+ - Select the **GeoPulse** template+ - Set your endpoint:+ ```+ https://geopulse.yourdomain.com/api/colota+ ```+ - Go to **Settings > Authentication**+ - Enable **Basic Auth** and enter the username and password from step 3++## Payload Format++The GeoPulse template uses Colota's default field names with no custom fields:++```json+{+ "lat": 51.495065,+ "lon": -0.043945,+ "acc": 12,+ "alt": 519,+ "vel": 0,+ "batt": 85,+ "bs": 2,+ "tst": 1704067200,+ "bear": 180.5+}+```++## Field Mapping++| Colota Field | GeoPulse Field | Description |+| ------------ | -------------- | --------------------- |+| `lat` | `lat` | Latitude |+| `lon` | `lon` | Longitude |+| `acc` | `acc` | GPS accuracy (meters) |+| `alt` | `alt` | Altitude (meters) |+| `vel` | `vel` | Speed (m/s) |+| `batt` | `batt` | Battery level (0-100) |+| `bs` | `bs` | Battery status |+| `tst` | `tst` | Unix timestamp |+| `bear` | `bear` | Bearing (degrees) |++Note: GeoPulse also supports OwnTracks as a location source. If you prefer, you can use the OwnTracks template with the endpoint `https://geopulse.yourdomain.com/api/owntracks` instead.diff --git a/apps/docs/sidebars.ts b/apps/docs/sidebars.tsindex 50f62db9..eb3d62c3 100644--- a/apps/docs/sidebars.ts+++ b/apps/docs/sidebars.ts@@ -31,6 +31,7 @@ const sidebars: SidebarsConfig = {"integrations/dawarich","integrations/home-assistant","integrations/owntracks",+ "integrations/geopulse","integrations/reitti","integrations/phonetrack","integrations/traccar",diff --git a/apps/mobile/src/types/global.ts b/apps/mobile/src/types/global.tsindex 22a19ae4..741d4ded 100644--- a/apps/mobile/src/types/global.ts+++ b/apps/mobile/src/types/global.ts@@ -96,7 +96,7 @@ export interface CustomField {export type HttpMethod = "POST" | "GET"-export type ApiTemplateName = "custom" | "dawarich" | "owntracks" | "phonetrack" | "reitti" | "traccar"+export type ApiTemplateName = "custom" | "dawarich" | "geopulse" | "owntracks" | "phonetrack" | "reitti" | "traccar"export interface ApiTemplate {name: ApiTemplateName@@ -108,6 +108,23 @@ export interface ApiTemplate {}export const API_TEMPLATES: Record<Exclude<ApiTemplateName, "custom">, ApiTemplate> = {+ geopulse: {+ name: "geopulse",+ label: "GeoPulse",+ description: "Native Colota format for GeoPulse",+ fieldMap: {+ lat: "lat",+ lon: "lon",+ acc: "acc",+ alt: "alt",+ vel: "vel",+ batt: "batt",+ bs: "bs",+ tst: "tst",+ bear: "bear"+ },+ customFields: []+ },dawarich: {name: "dawarich",label: "Dawarich",