# owntracks/frontend architecture

> Architecture diagram of the GitHub repository owntracks/frontend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/owntracks/frontend
- Repository: https://github.com/owntracks/frontend

## Overview

OwnTracks Frontend is a Vue single-page interface for viewing OwnTracks Recorder location data. The principal flow starts when the app initializes, reads URL state, and loads users, devices, current locations, history, and recorder version; users then filter by person, device, and time range, and the map displays the selected data and travel statistics. The README also documents live updates and configurable map layers. Relationships below are limited to the excerpts and README; unsampled subsystem links are omitted.

Main entry points: [`src/store/actions.js`](https://github.com/owntracks/frontend/blob/main/src/store/actions.js) (Data actions), [`src/store/index.js`](https://github.com/owntracks/frontend/blob/main/src/store/index.js) (Vuex state), [`src/views/Map.vue`](https://github.com/owntracks/frontend/blob/main/src/views/Map.vue) (Location map), [`src/App.vue`](https://github.com/owntracks/frontend/blob/main/src/App.vue) (App shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app_entry["Vue entry<br/>[main.js]"]
  node_app_shell["App shell<br/>[App.vue]"]
  node_router["Map router<br/>[router.js]"]
end

subgraph group_data["Recorder data"]
  node_store_actions["Data actions<br/>[actions.js]"]
  node_api["Recorder API<br/>[api.js]"]
end

subgraph group_state["State and settings"]
  node_store[("Vuex state<br/>[index.js]")]
  node_getters["History selectors<br/>[getters.js]"]
  node_mutations["State mutations<br/>[mutations.js]"]
  node_mutation_types["Mutation names<br/>[mutation-types.js]"]
  node_config["Runtime config<br/>[config.js]"]
end

subgraph group_view["Map and controls"]
  node_header["Header controls<br/>[AppHeader.vue]"]
  node_dropdown["Dropdown button<br/>[DropdownButton.vue]"]
  node_map_view["Location map<br/>[Map.vue]"]
  node_location_popup["Location details"]
  node_heatmap["Heatmap layer<br/>[LHeatmap.vue]"]
  node_marker["Custom marker<br/>[LCustomMarker.js]"]
end

subgraph group_support["Localization and feedback"]
  node_i18n["Translations<br/>[i18n.js]"]
  node_information["Information modal"]
  node_loading["Loading modal<br/>[LoadingModal.vue]"]
  node_logging["Console logging<br/>[logging.js]"]
end

node_user(("Frontend user"))
node_recorder["OwnTracks Recorder"]

node_user -->|"uses"| node_app_shell
node_app_entry -->|"mounts"| node_app_shell
node_app_entry -->|"configures"| node_router
node_app_entry -->|"configures"| node_store
node_app_entry -->|"configures"| node_i18n
node_app_shell -->|"loads data"| node_store_actions
node_app_shell -->|"renders"| node_header
node_app_shell -->|"shows route"| node_router
node_app_shell -->|"renders"| node_information
node_app_shell -->|"renders"| node_loading
node_router -->|"routes to"| node_map_view
node_header -->|"renders"| node_dropdown
node_header -->|"dispatches filters"| node_store_actions
node_header -->|"reads state"| node_store
node_store_actions -->|"requests data"| node_api
node_api -->|"calls API"| node_recorder
node_store_actions -->|"commits results"| node_store
node_store_actions -->|"reloads on updates"| node_store_actions
node_store_actions -->|"commits mutations"| node_store
node_store -->|"registers actions"| node_store_actions
node_store -->|"registers getters"| node_getters
node_store -->|"registers mutations"| node_mutations
node_mutations -->|"uses names"| node_mutation_types
node_store_actions -->|"uses names"| node_mutation_types
node_map_view -->|"reads map state"| node_store
node_map_view -->|"selects history"| node_getters
node_map_view -->|"renders details"| node_location_popup
node_map_view -->|"renders layer"| node_heatmap
node_map_view -->|"uses icon"| node_marker
node_map_view -->|"updates map state"| node_store
node_store_actions -->|"calculates travel stats"| node_getters
node_header -->|"shows travel stats"| node_store
node_api -->|"uses settings"| node_config
node_map_view -->|"reads map settings"| node_config
node_store_actions -->|"reads behavior settings"| node_config
node_i18n -->|"reads locale"| node_config
node_app_entry -->|"installs settings"| node_config
node_app_shell -->|"logs state"| node_logging
node_app_entry -->|"logs config"| node_logging

click node_app_entry "https://github.com/owntracks/frontend/blob/main/src/main.js"
click node_app_shell "https://github.com/owntracks/frontend/blob/main/src/App.vue"
click node_router "https://github.com/owntracks/frontend/blob/main/src/router.js"
click node_header "https://github.com/owntracks/frontend/blob/main/src/components/AppHeader.vue"
click node_dropdown "https://github.com/owntracks/frontend/blob/main/src/components/DropdownButton.vue"
click node_store_actions "https://github.com/owntracks/frontend/blob/main/src/store/actions.js"
click node_api "https://github.com/owntracks/frontend/blob/main/src/api.js"
click node_store "https://github.com/owntracks/frontend/blob/main/src/store/index.js"
click node_getters "https://github.com/owntracks/frontend/blob/main/src/store/getters.js"
click node_mutations "https://github.com/owntracks/frontend/blob/main/src/store/mutations.js"
click node_mutation_types "https://github.com/owntracks/frontend/blob/main/src/store/mutation-types.js"
click node_config "https://github.com/owntracks/frontend/blob/main/src/config.js"
click node_map_view "https://github.com/owntracks/frontend/blob/main/src/views/Map.vue"
click node_location_popup "https://github.com/owntracks/frontend/blob/main/src/components/LDeviceLocationPopup.vue"
click node_heatmap "https://github.com/owntracks/frontend/blob/main/src/components/LHeatmap.vue"
click node_marker "https://github.com/owntracks/frontend/blob/main/src/components/LCustomMarker.js"
click node_i18n "https://github.com/owntracks/frontend/blob/main/src/i18n.js"
click node_information "https://github.com/owntracks/frontend/blob/main/src/components/modals/InformationModal.vue"
click node_loading "https://github.com/owntracks/frontend/blob/main/src/components/modals/LoadingModal.vue"
click node_logging "https://github.com/owntracks/frontend/blob/main/src/logging.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app_entry,node_app_shell,node_router,node_user toneBlue
class node_store_actions,node_api toneAmber
class node_store,node_getters,node_mutations,node_mutation_types,node_config toneMint
class node_header,node_dropdown,node_map_view,node_location_popup,node_heatmap,node_marker toneRose
class node_i18n,node_information,node_loading,node_logging,node_recorder toneIndigo
```

## Components

### Application shell

- [Vue entry](https://github.com/owntracks/frontend/blob/main/src/main.js): `src/main.js`
- [App shell](https://github.com/owntracks/frontend/blob/main/src/App.vue): `src/App.vue`
- [Map router](https://github.com/owntracks/frontend/blob/main/src/router.js): `src/router.js`

### Recorder data

- [Data actions](https://github.com/owntracks/frontend/blob/main/src/store/actions.js): `src/store/actions.js`
- [Recorder API](https://github.com/owntracks/frontend/blob/main/src/api.js): `src/api.js`

### State and settings

- [Vuex state](https://github.com/owntracks/frontend/blob/main/src/store/index.js): `src/store/index.js`
- [History selectors](https://github.com/owntracks/frontend/blob/main/src/store/getters.js): `src/store/getters.js`
- [State mutations](https://github.com/owntracks/frontend/blob/main/src/store/mutations.js): `src/store/mutations.js`
- [Mutation names](https://github.com/owntracks/frontend/blob/main/src/store/mutation-types.js): `src/store/mutation-types.js`
- [Runtime config](https://github.com/owntracks/frontend/blob/main/src/config.js): `src/config.js`

### Map and controls

- [Header controls](https://github.com/owntracks/frontend/blob/main/src/components/AppHeader.vue): `src/components/AppHeader.vue`
- [Dropdown button](https://github.com/owntracks/frontend/blob/main/src/components/DropdownButton.vue): `src/components/DropdownButton.vue`
- [Location map](https://github.com/owntracks/frontend/blob/main/src/views/Map.vue): `src/views/Map.vue`
- [Location details](https://github.com/owntracks/frontend/blob/main/src/components/LDeviceLocationPopup.vue): `src/components/LDeviceLocationPopup.vue`
- [Heatmap layer](https://github.com/owntracks/frontend/blob/main/src/components/LHeatmap.vue): `src/components/LHeatmap.vue`
- [Custom marker](https://github.com/owntracks/frontend/blob/main/src/components/LCustomMarker.js): `src/components/LCustomMarker.js`

### Localization and feedback

- [Translations](https://github.com/owntracks/frontend/blob/main/src/i18n.js): `src/i18n.js`
- [Information modal](https://github.com/owntracks/frontend/blob/main/src/components/modals/InformationModal.vue): `src/components/modals/InformationModal.vue`
- [Loading modal](https://github.com/owntracks/frontend/blob/main/src/components/modals/LoadingModal.vue): `src/components/modals/LoadingModal.vue`
- [Console logging](https://github.com/owntracks/frontend/blob/main/src/logging.js): `src/logging.js`

### Other components

- **Frontend user**
- **OwnTracks Recorder**

## Connections

- Frontend user → App shell: uses (evidence: `README.md`)
- Vue entry → App shell: mounts (evidence: `src/main.js`)
- Vue entry → Map router: configures (evidence: `src/main.js`)
- Vue entry → Vuex state: configures (evidence: `src/main.js`)
- Vue entry → Translations: configures (evidence: `src/main.js`)
- App shell → Data actions: loads data (evidence: `src/App.vue`)
- App shell → Header controls: renders (evidence: `src/App.vue`)
- App shell → Map router: shows route (evidence: `src/App.vue`)
- App shell → Information modal: renders (evidence: `src/App.vue`)
- App shell → Loading modal: renders (evidence: `src/App.vue`)
- Map router → Location map: routes to (evidence: `src/router.js`)
- Header controls → Dropdown button: renders (evidence: `src/components/AppHeader.vue`)
- Header controls → Data actions: dispatches filters (evidence: `src/components/AppHeader.vue`)
- Header controls → Vuex state: reads state (evidence: `src/components/AppHeader.vue`)
- Data actions → Recorder API: requests data (evidence: `src/store/actions.js`)
- Recorder API → OwnTracks Recorder: calls API (evidence: `README.md`)
- Data actions → Vuex state: commits results (evidence: `src/store/actions.js`)
- Data actions → Data actions: reloads on updates (evidence: `src/store/actions.js`)
- Data actions → Vuex state: commits mutations (evidence: `src/store/actions.js`)
- Vuex state → Data actions: registers actions (evidence: `src/store/index.js`)
- Vuex state → History selectors: registers getters (evidence: `src/store/index.js`)
- Vuex state → State mutations: registers mutations (evidence: `src/store/index.js`)
- State mutations → Mutation names: uses names (evidence: `src/store/mutations.js`)
- Data actions → Mutation names: uses names (evidence: `src/store/actions.js`)
- Location map → Vuex state: reads map state (evidence: `src/views/Map.vue`)
- Location map → History selectors: selects history (evidence: `src/views/Map.vue`)
- Location map → Location details: renders details (evidence: `src/views/Map.vue`)
- Location map → Heatmap layer: renders layer (evidence: `src/views/Map.vue`)
- Location map → Custom marker: uses icon (evidence: `src/views/Map.vue`)
- Location map → Vuex state: updates map state (evidence: `src/views/Map.vue`)
- Data actions → History selectors: calculates travel stats (evidence: `src/store/actions.js`)
- Header controls → Vuex state: shows travel stats (evidence: `src/components/AppHeader.vue`)
- Recorder API → Runtime config: uses settings (evidence: `src/api.js`)
- Location map → Runtime config: reads map settings (evidence: `src/views/Map.vue`)
- Data actions → Runtime config: reads behavior settings (evidence: `src/store/actions.js`)
- Translations → Runtime config: reads locale (evidence: `src/i18n.js`)
- Vue entry → Runtime config: installs settings (evidence: `src/main.js`)
- App shell → Console logging: logs state (evidence: `src/App.vue`)
- Vue entry → Console logging: logs config (evidence: `src/main.js`)
