Skip to content

like-a-freedom/trackly

Repository files navigation

πŸ—ΊοΈ Trackly

Dead simple track storage and visualization

Store, search, filter, view and share your GPS tracks without the bloat

License Docker Image Built with Rust Built with Vue

View screenshots Β· Report Bug Β· Request Feature


πŸ“‹ Table of Contents


πŸ’‘ About

Trackly solves a simple but frustrating problem: where do you store hundreds of GPS tracks from hikes, bike rides, and runs in a way that's actually convenient?

The Problem

Originally, I had tracks scattered across Google Drive β€” impossible to search, preview, or organize. Every time I wanted to view one, I'd have to download it and open it in yet another app. After that, I tried a dozen online services, but none focused on the core need of easy storage and viewing with advanced filtration without unnecessary complexity or bloat.

What I Tried

I tested every GPS track service I could find:

  • ttrails.ru β€” poor UX
  • Wikiloc β€” overcomplicated for simple storage
  • GPSLib β€” outdated interface from the 90s
  • MapMagic β€” overpriced for what it offers
  • BRouter β€” great for planning, not storage
  • Velocat β€” clunky UX despite large database
  • Nakarte β€” excellent but stores in browser (unreliable)
  • GPX Studio β€” good viewer, not a storage solution

The Solution

Trackly is laser-focused on doing one thing well: storing, viewing and advanced filtration over hundreds of tracks with zero friction. Why? I'm an outdoor enthusiast that love to hike, trek and trailrunning, and I constantly facing the very specific problem: which tracks are perfectly suited for my next adventure in terms of distance, elevation and slope? None of the existing solutions addressed this core need without unnecessary bloat, so I built Trackly.

  • 🎯 Dead simple β€” Upload GPX, view on map, search, filter, done
  • 🚫 No bloat β€” Not trying to be Strava, Komoot, or a social network
  • πŸ”’ Your data β€” Self-hosted, full control
  • ⚑ Fast β€” Adaptive simplification keeps huge tracks smooth

✨ Key Features

  • πŸ”Ž Dynamic sitemap: backend exposes /sitemap.xml which lists public tracks for search engine indexing (auto-generated from public tracks).

Core Functionality

  • πŸ“€ Supporting GPX format only β€” Focused on the most widely used GPS track format for now
  • πŸ—ΊοΈ Interactive maps β€” View tracks on OpenStreetMap (Leaflet)
  • πŸ” Smart filtering β€” Filter by category, length, elevation, slope
  • πŸ”— Easy sharing β€” Export to GPX or share map links
  • πŸ” Session-based ownership β€” Edit and delete your own tracks

Technical Excellence

  • ⚑ Adaptive simplification β€” Huge tracks load instantly without losing much detail
  • 🎯 Deduplication β€” Geometry-based hash prevents duplicates
  • πŸ“Š Rich metadata β€” Elevation, heart rate, temperature, cadence, speed, pace
  • 🌍 Geospatial storage β€” PostGIS for proper spatial queries
  • πŸš€ On-the-fly optimization β€” Dynamic simplification based on zoom level
  • πŸ“ POI support β€” Points of interest with deduplication

πŸ“Έ Screenshots

Note: Add screenshots of your deployed instance here showing:

  • Main map view with multiple tracks
  • Track detail view with elevation profile
  • Upload interface
  • Filter/search functionality

πŸ› οΈ Tech Stack

Frontend

Vue.js Vite Leaflet

Backend

Rust Axum

Database

PostgreSQL PostGIS

Infrastructure

Docker Caddy

πŸ“¦ Component Details
Component Technology Purpose
Frontend Vue 3 + Vite Reactive UI with fast HMR
Map Rendering Leaflet Interactive OpenStreetMap visualization
API Framework Axum (Rust) Fast, type-safe REST API
Database PostgreSQL 17+ Reliable data storage
Spatial Extension PostGIS Geospatial queries and operations
Reverse Proxy Caddy Auto HTTPS and routing
Containerization Docker Compose Easy deployment and scaling
File Parsing gpx (Rust) GPX/KML/FIT parsing
Database Client SQLx Compile-time checked queries


πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have installed:

  • Docker (20.10+) and Docker Compose (2.0+)
  • Git for cloning the repository

That's it! Docker handles everything else.

Installation

  1. Clone the repository

    git clone https://github.com/like-a-freedom/trackly.git
    cd trackly
  2. Set up environment variables (optional)

    cp .env.example .env
    # Edit .env with your preferred settings

Development

Start the development environment with hot-reload:

docker-compose -f docker-compose.dev.yaml up --build

Access the application:

Quick SEO checks: See frontend/SEO.md for a short guide to verify base meta tags, robots.txt, sitemap.xml, and how to run a local Lighthouse smoke test.

Environment variables

The frontend uses Vite environment variables for configuration. If you want to customize environment variables, create a .env file in the frontend folder (copy .env.example).

Production

Choose the appropriate compose file for your architecture:

For ARM64 (Apple Silicon, ARM servers):

docker-compose -f docker-compose.aarch64.prod.yaml up -d

For AMD64 (Intel/AMD x86_64):

docker-compose -f docker-compose.amd64.prod.yaml up -d

Using pre-built images:

Images are automatically published to GitHub Container Registry:

# Pull images
docker pull ghcr.io/like-a-freedom/trackly-backend:latest
docker pull ghcr.io/like-a-freedom/trackly-frontend:latest

Quick Test

After starting, test the installation:

# Health check
curl http://localhost:8080/health

# Expected response: {"status":"ok"}

πŸ—οΈ Architecture

Monorepo Structure

trackly/
β”œβ”€β”€ backend/          # Rust (Axum) REST API
β”œβ”€β”€ frontend/         # Vue 3 + Vite SPA
β”œβ”€β”€ db_data/          # PostgreSQL data volume
β”œβ”€β”€ docs/             # Technical specifications
β”œβ”€β”€ migrations/       # Database schema migrations
└── docker-compose.*  # Deployment configurations

Backend (Rust + Axum)

Core Responsibilities:

  • RESTful API for track CRUD operations
  • Parse GPX/KML/FIT files and extract geometry + metadata
  • Store only parsed data (no file storage)
  • Geometry-based deduplication using spatial hashing
  • Export tracks to GPX format
  • Adaptive on-the-fly simplification for large datasets
  • Session-based ownership enforcement

Key Technologies:

  • axum β€” Web framework
  • sqlx β€” Type-safe SQL with compile-time verification
  • gpx β€” GPX/KML/FIT parsing
  • geo β€” Geospatial operations
  • tokio β€” Async runtime

Frontend (Vue 3 + Leaflet)

Core Responsibilities:

  • Interactive map with track visualization
  • Filter UI (category, length, elevation, slope)
  • Upload, edit, delete, export workflows
  • Session management for ownership
  • Responsive design

Key Technologies:

  • Vue 3 β€” Reactive framework (Composition API)
  • Vite β€” Build tool with HMR
  • Leaflet β€” Map rendering
  • Axios β€” HTTP client

Database (PostgreSQL + PostGIS)

Schema Highlights:

  • tracks β€” Main track metadata and geometry
  • track_points β€” Individual GPS points with elevation/HR/temp/cadence
  • pois β€” Points of interest with deduplication
  • Spatial indexes for fast queries
  • Geometry hash column for deduplication

Migrations: All schema changes are versioned with SQLx migrations in backend/migrations/.


⚑ Adaptive Simplification

Trackly uses intelligent simplification to keep the UI responsive even with tracks containing 50,000+ points.

How It Works

Only responses are simplified β€” original data remains intact in the database.

Two-tier approach:

  1. Geometry simplification β€” Douglas-Peucker algorithm with zoom-aware tolerance
  2. Profile downsampling β€” Elevation/HR/temperature/time arrays match simplified geometry

Simplification Buckets

Points Range Tolerance Scale* Behavior
0 – 1,000 None βœ… Return original (no simplification)
1,001 – 5,000 0.5Γ— base 🟒 Mild simplification
5,001 – 20,000 1.0Γ— base 🟑 Base simplification + 33% retention guard
20,001 – 50,000 1.5Γ— base 🟠 Strong simplification
50,000+ 2.5Γ— base πŸ”΄ Aggressive simplification

Base tolerance depends on zoom level:

  • World view (zoom 0-8): 1000m tolerance
  • Regional view (zoom 9-13): 100m tolerance
  • City view (zoom 14-16): 10m tolerance
  • Max detail (zoom 17+): 5m tolerance

Retention Guard

For moderately sized tracks (5,001–20,000 points), a minimum retention rate of ~33% prevents over-collapse. This preserves detail in tracks that are mostly linear but have important nuances.

Example:

  • Original: 10,000 points
  • Douglas-Peucker reduction: Would drop to 1,500 points
  • Guard enforcement: Returns at least 3,333 points
  • Result: βœ… Smooth rendering + preserved detail

Benefits

βœ… Fast loading β€” Even 100k point tracks load instantly
βœ… Preserved fidelity β€” Small tracks never simplified
βœ… Smart balancing β€” Retention guard prevents detail loss
βœ… Zoom-aware β€” More detail at higher zoom levels
βœ… Original data safe β€” Simplification only affects API responses


πŸ—ΊοΈ Roadmap

TBD

See the open issues for feature requests and known issues.


🀝 Contributing

Contributions are what make open source amazing! Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Guidelines

  • Follow SOLID principles and DRY practices
  • Use Test-Driven Development (TDD) where applicable
  • Run tests before submitting PR: cargo test (backend), npm test (frontend)
  • Update documentation for new features
  • Keep PRs focused and small

πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.


πŸ“¬ Contact

Project Maintainer: @like-a-freedom

Project Link: https://github.com/like-a-freedom/trackly

Issues & Feature Requests: GitHub Issues


πŸ™ Acknowledgments


πŸ”— CI/CD

The project uses GitHub Actions for automated testing and deployment:

  • 🐳 Build workflow β€” Publishes Docker images on releases
  • πŸ—οΈ Multi-arch support β€” Both linux/amd64 and linux/arm64

Made with ❀️ for outdoor enthusiasts

⬆ back to top

About

Your lovely gpx track storage

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •