Outcome of today's `/spec-drift-review`. Concentrated on the high-and-medium-severity items; low-severity wording left for the next per-feature change to pick up naturally. High-severity URL fixes (specs were actively misleading): - account-management — email-change verification URL was specced as `/auth/verify-email-change?token=...`; the actual route is `/auth/verify?email-change=1&token=...` (see auth.verify.tsx:8). A reader implementing against the old wording would build a link that 404s. - observability — "Both apps SHALL expose a /metrics endpoint" was half right: the planner is at /metrics, but the journal exposes /api/metrics. The infrastructure spec already had the right URLs; the observability spec disagreed with itself. Now both correct, with a one-line note explaining the per-app split. Medium-severity wording drift (Stream E aftermath): - profile-settings, account-management, connected-services — all three said "the settings page SHALL include a [...] section", which described the old single-scrollable settings page. Stream E (PR #323) split /settings into four sub-pages (/settings/{profile,account,security,connections}); rewording each spec to point at its specific sub-page. The API endpoints (/api/settings/*) and behavior are unchanged. - authentication-methods — passkey add/delete previously said "via the settings page"; now specifically /settings/security. Code drift fixed inline: - apps/journal/app/routes/auth.verify.tsx — after a successful email change, the redirect was going to `/settings#account` (an anchor on the OLD single-scrollable settings page). Stream E retired that page; the right destination now is `/settings/account`. Without this the user would land on /settings/profile (which is what /settings redirects to) instead of the page that just changed. sse-broker spec wording: - The "no buffering tweaks in the Caddy reverse_proxy block" scenario asserted the entry was "a plain `reverse_proxy journal:3000`". After PR #329 the journal block has `lb_try_duration 30s` / `lb_try_interval 250ms` — neither affects streaming, so SSE still works, but the spec's "plain" language was no longer literally true. Reworded to forbid only buffering-related directives; explicitly call out that retry-on-restart directives like lb_try_duration are fine. Navbar consolidation (journal-landing): - The shipped navbar's full shape was scattered: notifications said "navbar has a bell," explore said "navbar has an Explore entry," but no spec described the avatar dropdown, the primary-nav cluster (Feed/Routes/Activities), or the mobile drawer (Stream C / PR #324). Added a "Top navbar shape" requirement to journal-landing covering all of it — anonymous vs signed-in, desktop vs mobile, dropdown contents, drawer behavior. The per-feature specs (notifications, explore) still own their own badges/entries; this requirement just says what the whole cluster looks like. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .claude | ||
| .github | ||
| apps | ||
| docker/brouter | ||
| docs | ||
| e2e | ||
| infrastructure | ||
| openspec | ||
| packages | ||
| scripts | ||
| .gitignore | ||
| .gitleaks.toml | ||
| .mcp.json | ||
| .prettierrc | ||
| .sops.yaml | ||
| CLAUDE.md | ||
| docker-compose.dev.yml | ||
| eslint.config.js | ||
| LICENSE | ||
| package.json | ||
| playwright.config.ts | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| SECURITY.md | ||
| tsconfig.base.json | ||
| turbo.json | ||
| vitest.config.ts | ||
| vitest.setup.ts | ||
| vitest.shared.ts | ||
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:
- PostgreSQL + PostGIS on port 5432 (via Docker)
- BRouter routing engine on port 17777 (via Docker)
- Database schema pushed automatically via Drizzle
- BRouter segment downloaded for Berlin area (~124MB, cached)
- Journal on http://localhost:3000
- 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