api/ is wired into nothing — no docker service, no client calls, no CORS even if a client called #86
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#86
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Where:
docker-compose.ymlanddocker-compose.actors.yml(search confirms: no api service is referenced).src/(grep foraxios,/api/v1,fetch.*apireturns nothing — frontend never calls the backend).api/src/index.ts(noapp.use(cors(...)), noapp.use(helmet())— both deps installed).Bug:
corsandhelmetare inapi/package.jsondependencies but never imported.ALLOWED_ORIGINSenv var is set atdocker-compose.actors.yml:34but no api service reads it..forgejo/workflows/ci.yml:73) hits/healthzon the nginx container, notapi/src/index.ts.:3001/auth/registerfrom:3000in dev, the browser would block the request as cross-origin and the response would never arrive.Fix consistent with existing patterns:
Match what the easystitch-service client already does (
src/lib/easystitch-client.ts:118-135resolveBaseUrl,137-143getAuthHeaders). The frontend already proxies/api/easystitchthrough Vite in dev (vite.config.ts) and nginx in prod (docker-compose.yml:13). Mirror that for the api/ backend:vite.config.ts, add a second proxy entry for/api/v1→http://localhost:3001.location /api/v1/block forwarding to theapiupstream.api/src/index.ts, add before the routes:docker-compose.yml, add anapiservice that buildsapi/and readsDATABASE_URL,ALLOWED_ORIGINS,JWT_SECRET,S3_*envs.Acceptance: a frontend fetch to
/api/v1/auth/register(after wiring the route, see #83) hits the Express app, returns either a real 201 or the honest 501 from #84, and the browser sees the response (no CORS preflight failure).api/Express stub — zero callers, 11 unused deps, dead vite proxy/api/v1 → :3001#113