Commit graph

1 commit

Author SHA1 Message Date
Rimuru
6666cc5f67 fix(frontend): replace broken file-based API routes with SolidStart middleware
Vinxi 0.5.7 + @solidjs/start 1.3.2 has a build bug where file-based API
routes (src/routes/api/*) are registered in the page router tree but never
mounted as Nitro handlers in the production build, so every /api/* request
returns a framework 404.

Fix: register a SolidStart middleware (src/middleware.ts) via the
middleware config field. The middleware intercepts all /api/* paths and
proxies them to the Rust gateway, bypassing the broken page router.

Covers:
- /api/gateway/* (catch-all proxy to gateway)
- /api/kb/categories
- /api/kb/articles
- /api/kb/articles/:slug

Also tightens the dev-server vite proxy from /api to /api/kb so it
doesn't shadow the new middleware in dev.

Removes the dead src/routes/api/ tree (no longer used).
2026-06-11 15:36:44 +05:30