trails/apps/planner/app/lib
Ullrich Schäfer b45e69885d
poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics
Replace the planner's Overpass proxy with a self-hosted POI index:
- map-core POI categories become structured tag selectors (single source of
  truth) + osmium filter / classification helpers
- planner.pois PostGIS table (centroid points, GiST + category indexes)
- /api/pois serving route (session + same-origin + rate limit, 100 cap)
- lib/pois.ts client (renamed from overpass.ts; GET, quantized bbox)
- metrics: poi_api_requests_total + DB-collected index rows/age gauges;
  drop overpass_* metrics
- remove /api/overpass proxy + dead OVERPASS_URLS on the planner service
  (Journal surface backfill still uses it via code default)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 22:38:03 +02:00
..
__screenshots__/elevation-chart-draw.browser.test.tsx chore: update visual snapshots [skip ci] 2026-05-10 17:15:46 +00:00
brouter.test.ts fix(planner/brouter): cap upstream response size to 10MB 2026-05-26 00:48:45 +02:00
brouter.ts fix: extensionless server-side imports + lint rule to catch them 2026-05-26 08:08:19 +02:00
crash-recovery.test.ts Add transactional emails (SMTP) and planner features (no-go areas, notes, crash recovery) 2026-03-26 01:00:42 +01:00
db.ts Add Drizzle ORM with shared db package (#10) 2026-03-22 22:35:50 +00:00
elevation-chart-draw.browser.test.tsx Fix Vitest browser provider setup and test cleanup 2026-05-10 19:01:24 +02:00
elevation-chart-draw.ts Split ElevationChart + PlannerMap into deep modules; add visual regression testing 2026-05-10 16:41:23 +02:00
gpx-export.test.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
gpx-export.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
host-election.test.ts Fix planner production server + use .ts extensions everywhere 2026-03-25 01:41:33 +01:00
host-election.ts Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
http.server.test.ts fix(planner/brouter): add 30s timeout to outbound fetch 2026-05-25 23:53:19 +02:00
http.server.ts fix(planner/brouter): add 30s timeout to outbound fetch 2026-05-25 23:53:19 +02:00
logger.server.test.ts feat(planner): per-request requestId propagated through logs 2026-05-25 22:43:58 +02:00
logger.server.ts feat(planner): per-request requestId propagated through logs 2026-05-25 22:43:58 +02:00
metrics.server.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
overnight.test.ts Add per-day map coloring and remaining unit tests 2026-04-11 00:12:27 +02:00
overnight.ts Add multi-day data model, computeDays, and GPX roundtrip 2026-04-10 23:51:31 +02:00
poi-cache.test.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
poi-cache.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
poi-categories.test.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
poi-snap.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
pois.test.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
pois.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
rate-limit.test.ts Fix planner production server + use .ts extensions everywhere 2026-03-25 01:41:33 +01:00
rate-limit.ts Increase route rate limit from 60 to 300 requests/hour 2026-04-11 02:05:41 +02:00
require-session.test.ts Session-bind /api/route and /api/overpass 2026-04-21 22:18:45 +02:00
require-session.ts Session-bind /api/route and /api/overpass 2026-04-21 22:18:45 +02:00
route-data.test.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
route-data.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
route-merge.test.ts Cache BRouter segments client-side, fetch only the diff 2026-04-24 17:57:54 +02:00
route-merge.ts Cache BRouter segments client-side, fetch only the diff 2026-04-24 17:57:54 +02:00
segment-cache.test.ts Cache BRouter segments client-side, fetch only the diff 2026-04-24 17:57:54 +02:00
segment-cache.ts Cache BRouter segments client-side, fetch only the diff 2026-04-24 17:57:54 +02:00
sessions.ts fix(planner): bound /api/sessions listing (default 50, max 200) 2026-05-26 00:46:38 +02:00
snap-to-poi.test.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
url-validation.server.test.ts security: validate Planner callback URL to close an SSRF sink 2026-06-10 22:18:18 +02:00
url-validation.server.ts security: validate Planner callback URL to close an SSRF sink 2026-06-10 22:18:18 +02:00
use-days.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
use-elevation-data.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
use-gpx-drop.ts Centralize waypoint Yjs serialization in waypointFromYMap/waypointToYMap 2026-05-18 21:02:27 +02:00
use-host-election.ts Deepen three architectural seams: FIT consolidation, host election extraction, injectable db 2026-05-10 15:52:31 +02:00
use-nearby-pois.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
use-pois.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
use-profile-defaults.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
use-routing.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
use-undo.test.ts Add undo/redo to planner 2026-04-04 10:04:01 +01:00
use-undo.ts Add undo/redo to planner 2026-04-04 10:04:01 +01:00
use-waypoint-manager.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
use-yjs-poi-sync.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
use-yjs.ts chore(ts): drop two more redundant casts 2026-05-26 01:02:49 +02:00
vite-yjs-plugin.ts Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
waypoint-ymap.test.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
waypoint-ymap.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
yjs-server.test.ts fix(planner): cap per-WS-frame + per-session Yjs doc size 2026-05-26 00:13:01 +02:00
yjs-server.ts fix(planner): require session row before accepting Yjs WebSocket upgrade 2026-05-26 00:24:16 +02:00