trails.cool monorepo (migrated from GitHub)
Find a file
Ullrich Schäfer 46743a91db
Auto-download BRouter segments on first container start
Fresh `pnpm dev:services` checkouts came up with an empty
brouter_segments volume, so every routing request returned
"datafile not found" and the e2e suite's BRouter tests failed.

Add an entrypoint that runs download-segments.sh when /data/segments
has no rd5 files, then exec's the existing server command. Subsequent
starts find the populated volume and skip straight to the server.
Keep wget in the final image (previously stripped) so the entrypoint
can fetch segments at runtime.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 00:43:43 +02:00
.claude Add /ia-review and /spec-drift-review process skills 2026-04-26 08:41:07 +02:00
.github Update single PR comment across preview deploy + teardown 2026-05-04 07:17:57 +02:00
apps Test PR for staging preview lifecycle 2026-05-03 22:18:06 +02:00
docker/brouter Auto-download BRouter segments on first container start 2026-05-08 00:43:43 +02:00
docs Refresh IA doc — all six streams shipped on 2026-04-26 2026-04-26 10:03:05 +02:00
e2e Redesign navbar with avatar dropdown and mobile drawer 2026-04-26 09:56:20 +02:00
infrastructure Update Caddyfile staging upstreams to ports 3110/3111 2026-05-03 22:48:53 +02:00
openspec Merge branch 'main' into stigi/staging-envs 2026-05-03 22:10:25 +02:00
packages Bump the production group with 19 updates 2026-05-03 08:33:39 +00:00
scripts Make scripts/ a pnpm workspace + add README 2026-04-19 07:56:01 +02:00
.gitignore Ignore .claude/scheduled_tasks.lock 2026-04-19 12:00:02 +02: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 SOPS+age secrets, split CD workflows, GitHub OAuth for Grafana 2026-03-27 17:28:04 +01:00
CLAUDE.md Move persistent staging off port 3100 to avoid Loki conflict 2026-05-03 22:38:38 +02:00
docker-compose.dev.yml Add local dev setup, fix BRouter Dockerfile, archive change (#12) 2026-03-22 23:11:43 +00:00
eslint.config.js Fix CI on main: RouteMap typecheck + metro.config lint 2026-04-17 22:26:38 +02:00
LICENSE Initial monorepo setup with architecture plan 2026-03-22 11:29:33 +01:00
package.json Add typescript to root devDependencies 2026-05-08 00:37:42 +02:00
playwright.config.ts Implement notifications + supporting fixes 2026-04-26 01:28:55 +02:00
pnpm-lock.yaml Add typescript to root devDependencies 2026-05-08 00:37:42 +02:00
pnpm-workspace.yaml Bump the production group with 19 updates 2026-05-03 08:33:39 +00:00
README.md Restore 'primary development tool' qualifier for Claude Code in README 2026-03-29 13:12:04 +00:00
SECURITY.md Security hardening: headers, scanning, Docker, firewall 2026-03-25 09:58:12 +01:00
tsconfig.base.json Fix TypeScript parameter property crash in Node strip-only mode 2026-04-12 14:00:00 +02:00
turbo.json Standardize monorepo pipeline: test, lint, typecheck across all workspaces 2026-04-13 00:00:43 +02:00
vitest.config.ts Standardize monorepo pipeline: test, lint, typecheck across all workspaces 2026-04-13 00:00:43 +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 Add tests to all packages, remove passWithNoTests 2026-04-13 00:48:27 +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://github.com/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)

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://raw.githubusercontent.com/trails-cool/trails/main/infrastructure/docker-compose.yml
docker compose up -d

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

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.

License

MIT