fix(api): add global /api prefix to resolve frontend route mismatch #507

Merged
jason.woltje merged 2 commits from fix/api-global-prefix into main 2026-02-26 01:13:49 +00:00
Owner

Summary

  • Frontend API client prefixes all paths with (e.g. , ) but backend controllers had no global prefix, causing 404s on all data-fetching pages in production
  • Add in with exclusions for (Docker healthcheck) and (BetterAuth OAuth flow)
  • Strip redundant from federation and CSRF controller paths that already included the prefix manually

Test plan

  • API builds clean (

@mosaic/api@0.0.1 build /home/jwoltje/src/mosaic-stack/apps/api
nest build)

  • All 3,243 API tests pass
  • All 1,195 web tests pass
  • Lint + typecheck pass (pre-commit hooks)
  • CI pipeline green
  • Deploy to Coolify and verify: , , return data instead of 404
  • Verify still works (Docker healthcheck)
  • Verify and OAuth flow still work

🤖 Generated with Claude Code

## Summary - Frontend API client prefixes all paths with (e.g. , ) but backend controllers had no global prefix, causing 404s on all data-fetching pages in production - Add in with exclusions for (Docker healthcheck) and (BetterAuth OAuth flow) - Strip redundant from federation and CSRF controller paths that already included the prefix manually ## Test plan - [x] API builds clean ( > @mosaic/api@0.0.1 build /home/jwoltje/src/mosaic-stack/apps/api > nest build) - [x] All 3,243 API tests pass - [x] All 1,195 web tests pass - [x] Lint + typecheck pass (pre-commit hooks) - [ ] CI pipeline green - [ ] Deploy to Coolify and verify: , , return data instead of 404 - [ ] Verify still works (Docker healthcheck) - [ ] Verify and OAuth flow still work 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jason.woltje added 1 commit 2026-02-26 01:02:31 +00:00
fix(api): add global /api prefix to resolve frontend route mismatch
Some checks failed
ci/woodpecker/push/api Pipeline failed
0c40630aa0
Frontend API client prefixes all paths with /api/ (e.g. /api/projects,
/api/knowledge/entries) but backend controllers had no global prefix,
causing 404s on all data-fetching pages in production.

- Add setGlobalPrefix('api') in main.ts with exclusions for /health
  (Docker healthcheck) and /auth/* (BetterAuth OAuth flow)
- Strip redundant 'api/' from federation and CSRF controller paths
  that already included the prefix manually

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje added 1 commit 2026-02-26 01:08:46 +00:00
fix(deps): override rollup to >=4.59.0 for CVE-2025-XXXXX
All checks were successful
ci/woodpecker/push/orchestrator Pipeline was successful
ci/woodpecker/push/api Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
bf213de374
Rollup 4.57.0 has arbitrary file write via path traversal
(GHSA-mw96-cpmx-2vgc). Added pnpm override to force >=4.59.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje merged commit 72c64d2eeb into main 2026-02-26 01:13:49 +00:00
jason.woltje deleted branch fix/api-global-prefix 2026-02-26 01:13:50 +00:00
Sign in to join this conversation.