trails/apps/journal/app/routes
Ullrich Schäfer 881991ca18
feat(journal): federation protocol doc + delivery observability
Task group 4 of federation-hardening.

4.1 — FEDERATION.md at the repo root: actor discovery (WebFinger, actor,
NodeInfo), object/activity types with real JSON examples (Note, Create,
Delete, the narrow follow-graph inbox), addressing, HTTP-Signature
expectations, the two-layer dedup contract, durable delivery/retry
policy, and blocklist moderation semantics — precise enough for another
implementation to interoperate. Linked from README and docs/architecture.

4.2 — three prom-client metrics + a journal dashboard row:
- `federation_delivery_total{outcome}` — incremented in deliver-activity
  (delivered/skipped/failed).
- `federation_inbox_dropped_total{reason}` — incremented at every inbox
  drop (duplicate | blocked); this is the counter deferred from task 3.2.
- `federation_queue_depth` — gauge sampled at scrape time in
  /api/metrics from PgBossMessageQueue.getDepth(); the restart-loss
  regression detector.
Grafana journal.json gains a Federation row (delivery rate, queue depth,
inbox drops); the logs panels shift down to make room.

Verified: dashboard JSON valid; journal typecheck + lint clean; unit
suite 357 passing (route-template guard unaffected).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 23:11:43 +02:00
..
activities.$id.server.ts route-surface-breakdown (Phase 2): async Overpass backfill + SSE 2026-06-14 19:18:03 +02:00
activities.$id.tsx route-surface-breakdown (Phase 2): async Overpass backfill + SSE 2026-06-14 19:18:03 +02:00
activities._index.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
activities._index.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
activities.new.server.ts activity-sport-type: schema, contract, write/read paths, federation 2026-06-12 14:11:41 +02:00
activities.new.tsx activity-sport-type: schema, contract, write/read paths, federation 2026-06-12 14:11:41 +02:00
api.auth.login.ts security: log redaction, magic-link enumeration, federation doc cap 2026-06-11 07:52:34 +02:00
api.auth.register.test.ts fix(journal): architectural audit omnibus 2026-05-24 10:28:33 +02:00
api.auth.register.ts fix(journal): rate-limit auth endpoints 2026-05-24 11:51:43 +02:00
api.e2e.komoot.ts Rewrite komoot E2E tests to use server-side seed endpoint 2026-05-23 10:57:16 +02:00
api.e2e.route.$id.ts Fix unused import lint error in api.e2e.route.$id.ts 2026-05-10 15:24:31 +02:00
api.e2e.seed.ts Show POI details (phone, website, opening hours) on Journal route detail page 2026-05-17 23:32:38 +02:00
api.events.ts Drop auth.server.ts re-exports + rename to .server.ts convention (task 5.2) 2026-05-08 03:01:30 +02:00
api.follows.$id.approve.ts Drop auth.server.ts re-exports + rename to .server.ts convention (task 5.2) 2026-05-08 03:01:30 +02:00
api.follows.$id.reject.ts Drop auth.server.ts re-exports + rename to .server.ts convention (task 5.2) 2026-05-08 03:01:30 +02:00
api.metrics.ts feat(journal): federation protocol doc + delivery observability 2026-07-13 23:11:43 +02:00
api.nodeinfo.ts feat(journal): federation inbox — Mastodon follows land here 2026-06-06 14:33:43 +02:00
api.notifications.$id.read.ts Drop auth.server.ts re-exports + rename to .server.ts convention (task 5.2) 2026-05-08 03:01:30 +02:00
api.notifications.read-all.ts Drop auth.server.ts re-exports + rename to .server.ts convention (task 5.2) 2026-05-08 03:01:30 +02:00
api.routes.$id.callback.ts route-surface-breakdown (Phase 1): Planner-path surface/waytype bars 2026-06-14 18:46:49 +02:00
api.routes.$id.edit-in-planner.ts journal: branded ownership loading for routes and activities 2026-06-10 02:35:00 +02:00
api.routes.$id.gpx.ts Add route detail day segment highlighting and per-day GPX export 2026-04-11 00:44:11 +02:00
api.settings.delete-account.ts Drop auth.server.ts re-exports + rename to .server.ts convention (task 5.2) 2026-05-08 03:01:30 +02:00
api.settings.email.ts fix(journal): architectural audit omnibus 2026-05-24 10:28:33 +02:00
api.settings.passkey.delete.ts e2e: register and repair the settings/explore/social specs 2026-06-11 08:32:18 +02:00
api.settings.profile.ts Drop auth.server.ts re-exports + rename to .server.ts convention (task 5.2) 2026-05-08 03:01:30 +02:00
api.sync.callback.$provider.ts journal: OAuth connect→callback→resume lifecycle as one module 2026-06-10 07:44:04 +02:00
api.sync.connect.$provider.ts journal: OAuth connect→callback→resume lifecycle as one module 2026-06-10 07:44:04 +02:00
api.sync.disconnect.$provider.ts fix(journal): centralize session-auth helpers + extract .server.ts siblings 2026-05-24 10:44:33 +02:00
api.sync.komoot.connect.ts fix(journal): centralize session-auth helpers + extract .server.ts siblings 2026-05-24 10:44:33 +02:00
api.sync.komoot.import-status.ts fix(journal): centralize session-auth helpers + extract .server.ts siblings 2026-05-24 10:44:33 +02:00
api.sync.komoot.import.ts journal: typed job seam + Komoot credentials through the manager 2026-06-10 02:05:24 +02:00
api.sync.komoot.verify.ts fix(journal): centralize session-auth helpers + extract .server.ts siblings 2026-05-24 10:44:33 +02:00
api.sync.push.$provider.$routeId.ts journal: OAuth connect→callback→resume lifecycle as one module 2026-06-10 07:44:04 +02:00
api.sync.webhook.$provider.test.ts feat(journal): Garmin activity import — provider, webhook pipeline, backfill (§1–5) 2026-06-07 17:47:22 +02:00
api.sync.webhook.$provider.ts feat(journal): Garmin activity import — provider, webhook pipeline, backfill (§1–5) 2026-06-07 17:47:22 +02:00
api.users.$username.follow.ts Drop auth.server.ts re-exports + rename to .server.ts convention (task 5.2) 2026-05-08 03:01:30 +02:00
api.users.$username.unfollow.ts Drop auth.server.ts re-exports + rename to .server.ts convention (task 5.2) 2026-05-08 03:01:30 +02:00
api.v1.activities.$id.ts activity-sport-type: schema, contract, write/read paths, federation 2026-06-12 14:11:41 +02:00
api.v1.activities._index.ts activity-sport-type: schema, contract, write/read paths, federation 2026-06-12 14:11:41 +02:00
api.v1.auth.devices.$id.ts Implement Journal REST API v1 endpoints 2026-04-13 00:57:27 +02:00
api.v1.auth.devices.ts Implement Journal REST API v1 endpoints 2026-04-13 00:57:27 +02:00
api.v1.routes.$id.ts one source of truth for Route/Activity shapes; enforce api contracts 2026-06-10 07:39:50 +02:00
api.v1.routes._index.ts one source of truth for Route/Activity shapes; enforce api contracts 2026-06-10 07:39:50 +02:00
api.v1.routes.compute.ts Session-bind /api/route and /api/overpass 2026-04-21 22:18:45 +02:00
api.v1.routes.test.ts one source of truth for Route/Activity shapes; enforce api contracts 2026-06-10 07:39:50 +02:00
api.v1.test.ts Add unit tests for REST API validation and pagination 2026-04-13 00:58:18 +02:00
api.v1.uploads.test.ts security: authorize and validate presigned upload requests 2026-06-10 22:23:14 +02:00
api.v1.uploads.ts security: authorize and validate presigned upload requests 2026-06-10 22:23:14 +02:00
api.well-known.nodeinfo.ts feat(journal): federation inbox — Mastodon follows land here 2026-06-06 14:33:43 +02:00
api.well-known.trails-cool.test.ts Implement OAuth2 PKCE auth, discovery, and mobile API client 2026-04-13 00:41:40 +02:00
api.well-known.trails-cool.ts feat(journal): outbound trails-to-trails follows (social-federation §6) 2026-06-07 11:50:35 +02:00
api.well-known.webfinger.ts feat(journal): Fedify spike — WebFinger + actor objects behind FEDERATION_ENABLED 2026-06-06 14:15:27 +02:00
auth.accept-terms.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
auth.accept-terms.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
auth.login.tsx Implement completeAuth chokepoint + caller migration 2026-05-08 02:38:15 +02:00
auth.logout.tsx Drop auth.server.ts re-exports + rename to .server.ts convention (task 5.2) 2026-05-08 03:01:30 +02:00
auth.register.tsx Implement completeAuth chokepoint + caller migration 2026-05-08 02:38:15 +02:00
auth.verify.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
auth.verify.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
explore.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
explore.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
feed.server.ts activity-sport-type: schema, contract, write/read paths, federation 2026-06-12 14:11:41 +02:00
feed.tsx activity-stats: shared StatRow + canonical metrics across surfaces 2026-06-12 14:48:36 +02:00
follows.outgoing.tsx feat(journal): outbound trails-to-trails follows (social-federation §6) 2026-06-07 11:50:35 +02:00
follows.requests.tsx Merge /follows/requests into /notifications as a tabbed inbox 2026-04-26 08:24:59 +02:00
home.server.ts home: use the shared StatRow + SportBadge on activity cards 2026-06-12 16:03:36 +02:00
home.tsx home: use the shared StatRow + SportBadge on activity cards 2026-06-12 16:03:36 +02:00
legal.imprint.tsx Apply minimal legal-review follow-ups 2026-04-19 07:27:56 +02:00
legal.privacy.tsx poi-index: Grafana dashboard/alert, docs, privacy manifest 2026-07-12 22:54:51 +02:00
legal.terms.tsx Store Terms version alongside acceptance timestamp 2026-04-19 07:46:34 +02:00
notifications.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
notifications.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
oauth.authorize.tsx Drop auth.server.ts re-exports + rename to .server.ts convention (task 5.2) 2026-05-08 03:01:30 +02:00
oauth.token.ts Implement Journal REST API v1 endpoints 2026-04-13 00:57:27 +02:00
privacy.tsx Add legal pages, ToS acceptance, and alpha banner 2026-04-18 00:08:48 +02:00
routes.$id.edit.server.ts journal: branded ownership loading for routes and activities 2026-06-10 02:35:00 +02:00
routes.$id.edit.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
routes.$id.server.ts route-surface-breakdown (Phase 2): async Overpass backfill + SSE 2026-06-14 19:18:03 +02:00
routes.$id.tsx route-surface-breakdown (Phase 2): async Overpass backfill + SSE 2026-06-14 19:18:03 +02:00
routes._index.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
routes._index.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
routes.new.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
routes.new.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
settings._index.tsx Split /settings into 4 sub-pages with a sidebar layout 2026-04-26 09:48:00 +02:00
settings.account.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
settings.account.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
settings.connections.komoot.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
settings.connections.komoot.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
settings.connections.server.ts feat(journal): Garmin activity import — provider, webhook pipeline, backfill (§1–5) 2026-06-07 17:47:22 +02:00
settings.connections.tsx feat(journal): Garmin activity import — provider, webhook pipeline, backfill (§1–5) 2026-06-07 17:47:22 +02:00
settings.profile.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
settings.profile.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
settings.security.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
settings.security.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
settings.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
settings.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
sync.import.$provider.server.ts chore(ts): eliminate the remaining 4 \as any\ casts in production code 2026-05-26 07:11:02 +02:00
sync.import.$provider.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
sync.import.garmin.server.ts feat(journal): Garmin activity import — provider, webhook pipeline, backfill (§1–5) 2026-06-07 17:47:22 +02:00
sync.import.garmin.tsx feat(journal): Garmin activity import — provider, webhook pipeline, backfill (§1–5) 2026-06-07 17:47:22 +02:00
sync.import.komoot.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
sync.import.komoot.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
users.$username.followers.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
users.$username.followers.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
users.$username.following.server.ts fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
users.$username.following.tsx fix(journal): extract loaders/actions for the remaining 21 mixed routes 2026-05-24 11:05:40 +02:00
users.$username.inbox.integration.test.ts security: log redaction, magic-link enumeration, federation doc cap 2026-06-11 07:52:34 +02:00
users.$username.inbox.ts feat(journal): federation inbox — Mastodon follows land here 2026-06-06 14:33:43 +02:00
users.$username.outbox.ts feat(journal): federation outbox + push delivery to remote followers 2026-06-06 15:32:52 +02:00
users.$username.server.ts profile-weekly-distance: weekly distance bar chart on the profile 2026-06-13 07:46:06 +02:00
users.$username.tsx profile-weekly-distance: weekly distance bar chart on the profile 2026-06-13 07:46:06 +02:00