trails/apps/journal/app
Ullrich Schäfer 18c3c37eaf
Implement Journal REST API v1 endpoints
Add all REST API endpoints for mobile app consumption:

Routes:
- GET /api/v1/routes — paginated list with cursor, Zod validation
- GET /api/v1/routes/:id — full detail with GPX, versions
- POST /api/v1/routes — create with Zod-validated body
- PUT /api/v1/routes/:id — update, creates new version
- DELETE /api/v1/routes/:id — returns 204

Activities:
- GET /api/v1/activities — paginated list with cursor
- GET /api/v1/activities/:id — full detail
- POST /api/v1/activities — create with GPX stat extraction
- DELETE /api/v1/activities/:id — returns 204

Supporting:
- POST /api/v1/routes/compute — BRouter proxy
- POST /api/v1/uploads — presigned upload URL generation

Device management:
- GET /api/v1/auth/devices — list connected devices with isCurrent
- DELETE /api/v1/auth/devices/:id — revoke device token
- Store device_name on token exchange

Infrastructure:
- requireApiUser() guard — returns 401 with structured error
- apiError() helper for consistent error responses
- All endpoints use Zod schemas from @trails-cool/api for validation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 00:57:27 +02:00
..
components Reduce map fly animation to 200ms 2026-04-11 00:48:41 +02:00
lib Implement Journal REST API v1 endpoints 2026-04-13 00:57:27 +02:00
routes Implement Journal REST API v1 endpoints 2026-04-13 00:57:27 +02:00
entry.client.tsx Upgrade i18next v26 + react-i18next v17 with SSR-safe init 2026-03-29 11:38:36 +02:00
entry.server.tsx Upgrade i18next v26 + react-i18next v17 with SSR-safe init 2026-03-29 11:38:36 +02:00
root.tsx Pass full locale from Accept-Language to ClientDate 2026-03-29 11:46:21 +02:00
routes.ts Implement Journal REST API v1 endpoints 2026-04-13 00:57:27 +02:00