Ride your bike. Collaborative, Social, Privacy friendly https://trails.cool
  • TypeScript 90.8%
  • HTML 2.9%
  • Shell 2.3%
  • JavaScript 1.4%
  • Python 1%
  • Other 1.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ullrich Schäfer 06bc164d2a
All checks were successful
CI / Dockerfile Package Check (push) Successful in 6s
CI / Security Scan (push) Successful in 8s
CI / Visual Tests (push) Successful in 6s
CI / Journal Image Smoke Test (push) Successful in 7s
CI / Checks (push) Successful in 21s
CI / E2E Tests (push) Successful in 7s
Merge pull request 'ci: add a CI usage report script' (#362) from ci/usage-report into main
Reviewed-on: #362
2026-11-18 09:05:13 +00:00
.agents/skills chore(deps): Update development 2026-11-17 08:49:22 +00:00
.claude docs(ops): log in with personal SSH keys, not the CI deploy keys (#339) 2026-11-15 23:02:01 +00:00
.design-sync feat(ui): emit a standalone stylesheet and sync the DS to Claude Design 2026-09-13 10:48:29 +02:00
.forgejo ci: skip main CI when the merged tree equals a green pull request head 2026-11-18 09:52:00 +01:00
.github ci: replace Dependabot with self-hosted Renovate 2026-07-26 13:08:39 +02:00
apps chore(deps): Update Node.js to v26.13.1 (#346) 2026-11-16 00:24:47 +00:00
docker fix(docker): drop the eMudhra keytool step that breaks image builds 2026-11-16 00:40:51 +01:00
docs docs(ops): log in with personal SSH keys, not the CI deploy keys (#339) 2026-11-15 23:02:01 +00:00
e2e test(e2e): wait for the map before using it in the search tests 2026-10-04 01:25:56 +02:00
infrastructure chore(deps): Update ghcr.io/google/cadvisor Docker tag to v0.61.0 (#352) 2026-11-16 15:58:44 +00:00
openspec docs(openspec): shorten requirement bodies under 500 characters 2026-10-08 10:24:30 +02:00
packages chore(deps): move duplicated dependencies to the pnpm catalog 2026-10-12 12:00:14 +02:00
scripts ci: add a CI usage report script 2026-11-18 10:00:09 +01:00
.dockerignore feat(journal): two-instance federation harness + trails↔trails Accept fix (§11) 2026-06-07 13:36:35 +02:00
.env.development.example Local dev stack improvements 2026-05-17 23:12:22 +02:00
.gitignore ci: correct the pnpm audit / Renovate division of labour (#169) 2026-09-23 17:51:08 +00:00
.gitleaks.toml Fix .gitleaks.toml config syntax 2026-03-25 11:59:26 +01:00
.mcp.json Add Sentry MCP server config, ignore worktrees 2026-03-25 07:43:58 +00:00
.prettierrc Complete monorepo toolchain setup (tasks 1.1-1.7) 2026-03-22 12:12:57 +01:00
.sops.yaml Encrypt tofu state natively, retiring the SOPS re-encrypt step 2026-09-06 11:39:32 +02:00
CLAUDE.md docs(ops): log in with personal SSH keys, not the CI deploy keys (#339) 2026-11-15 23:02:01 +00:00
CONTEXT.md Atomic GPX save: validate + persist row + geometry in one transaction 2026-05-10 15:02:56 +02:00
CONTRIBUTING.md docs: describe how contribution actually works 2026-07-27 23:15:04 +02:00
docker-compose.dev.yml feat(planner): location search box, current location, waypoint names 2026-10-03 02:51:35 +02:00
eslint.config.js feat(docker): install production dependencies only in the app images 2026-10-11 15:26:10 +02:00
FEDERATION.md feat(journal): federation protocol doc + delivery observability 2026-07-13 23:11:43 +02:00
LICENSE Initial monorepo setup with architecture plan 2026-03-22 11:29:33 +01:00
package.json chore(deps): Update pnpm to v12.21.0 (#349) 2026-11-16 00:28:06 +00:00
playwright.config.ts feat(planner): location search box, current location, waypoint names 2026-10-03 02:51:35 +02:00
pnpm-lock.yaml chore(deps): Update dependency i18next to v27.1.5 (#357) 2026-11-18 08:15:22 +00:00
pnpm-workspace.yaml chore(deps): Update dependency baseline-browser-mapping@>=2.0.0 <2.11.0 to v2.11.38 (#353) 2026-11-17 08:57:03 +00:00
README.md feat(planner): location search box, current location, waypoint names 2026-10-03 02:51:35 +02:00
renovate.json5 fix(renovate): track the Playwright image tag through npm 2026-11-16 00:11:03 +01:00
SECURITY.md docs: describe how contribution actually works 2026-07-27 23:15:04 +02:00
tsconfig.base.json Fix TypeScript parameter property crash in Node strip-only mode 2026-04-12 14:00:00 +02:00
turbo.json fix(ci): hash root configs and infra fixtures into the Turbo cache 2026-11-18 09:12:40 +01:00
vitest.config.ts test: centralize vitest testTimeout so packages can't inherit the 5s default 2026-08-18 16:59:56 +02:00
vitest.setup.ts Add testing strategy: Vitest for unit tests, Playwright for E2E 2026-03-22 12:36:09 +01:00
vitest.shared.ts Complete the vitest 5 upgrade and port maxForks to maxWorkers 2026-09-07 14:43:05 +02:00

trails.cool

Collaborative route planning and federated activity sharing for outdoor enthusiasts.

Planner — Plan routes together in real-time. Share a link, invite friends, edit waypoints collaboratively. Powered by BRouter for intelligent routing with elevation awareness.

Journal — Track your adventures. Import activities from Garmin, Strava, or Wahoo. Share routes and rides with friends. Self-host your own instance and federate with others via ActivityPub.

Status

Early development. See the architecture plan and project philosophy.

Project Structure

This is a TypeScript monorepo using pnpm workspaces and Turborepo.

apps/
  planner/        Collaborative route editor (React Router 7 + Yjs + Leaflet)
  journal/        Activity social platform  (React Router 7 + Fedify + PostGIS)

packages/
  types/          Shared TypeScript interfaces
  ui/             Shared React components (Tailwind)
  map/            Leaflet map wrappers
  gpx/            GPX parsing and generation
  i18n/           Internationalization (English + German)

Getting Started

Prerequisites: Node.js 20+, pnpm, Docker

# Clone
git clone https://git.ullrich.is/trails-cool/trails.git
cd trails

# Install dependencies
pnpm install

# Start development (apps only, no database or routing)
pnpm dev

# Start full stack (PostgreSQL + BRouter + apps)
pnpm dev:full

Full Local Dev Setup

pnpm dev:full starts everything needed to test the Planner end-to-end:

  1. PostgreSQL + PostGIS on port 5432 (via Docker)
  2. BRouter routing engine on port 17777 (via Docker)
  3. Database schema pushed automatically via Drizzle
  4. BRouter segment downloaded for Berlin area (~124MB, cached)
  5. Journal on http://localhost:3000
  6. Planner on http://localhost:3001

Other useful commands:

pnpm dev:services     # Start Docker services only (DB + BRouter)
pnpm db:push          # Push database schema changes
pnpm db:studio        # Open Drizzle Studio (DB browser)

Location search (optional). The Planner's search box and automatic waypoint names need a Photon geocoder. Start a small one (Andorra data, ~2 MB) and point the Planner at it:

docker compose -f docker-compose.dev.yml --profile geocoder up -d photon
GEOCODER_URL=http://localhost:2322 pnpm --filter @trails-cool/planner dev

Set PHOTON_DEV_DB_URL to another country's photon-db-*-1.0-latest.tar.bz2 from https://download1.graphhopper.com/public/ before the first start to use other data. Without GEOCODER_URL the search box is hidden.

Development Tools

This project uses AI-assisted, spec-driven development. See docs/tooling.md for details.

Tool Purpose
cmux Native macOS terminal for running multiple AI coding sessions
Claude Code AI coding assistant (primary development tool)
GitHub Copilot AI coding assistant
Crit Browser-based inline code review
OpenSpec Spec-driven development workflow

Self-Hosting

The Journal is designed to be self-hosted. A single Docker Compose file gets you running:

curl -O https://git.ullrich.is/trails-cool/trails/raw/branch/main/infrastructure/docker-compose.yml
docker compose up -d

See docs/architecture.md for details on self-hosting configuration.

Federation

The Journal federates over ActivityPub. The wire protocol — actor discovery, object/activity types with JSON examples, addressing, signatures, deduplication, delivery retry, and moderation — is documented in FEDERATION.md, which is precise enough for another implementation to interoperate against.

Philosophy

  • Privacy by design — The Planner collects zero user data
  • Data ownership — Export everything, self-host, no lock-in
  • Open source — MIT licensed, built on open standards
  • Simplicity — Start simple, add complexity only when needed

Read more: docs/philosophy.md

Contributing

Human contributions are welcome. This project is built with AI-assisted development (Claude Code + OpenSpec), but we value human judgment, design taste, and community input.

One thing to know up front: the project is developed on a self-hosted Forgejo instance with registration disabled, so you can't fork and open a pull request unprompted. The repository is publicly readable and cloneable, and there are two straightforward ways in — request an account, or email a patch.

See CONTRIBUTING.md for both, plus what CI expects and which changes are non-goals.

License

MIT