ppt-tool/frontend/app/api/v1/ppt
Vadym Samoilenko 1f5a0c27da Fix SSE proxy: create Next.js route handlers for all streaming endpoints
Next.js rewrites() buffer HTTP responses and drop long-lived connections,
making SSE (text/event-stream) impossible. The backend never even received
the request (no log entry in API, ECONNRESET in web proxy logs).

Create dedicated route.ts files for all 3 SSE endpoints:
- /api/v1/ppt/outlines/stream/[id]
- /api/v1/ppt/presentation/stream/[id]
- /api/v1/ppt/jobs/[job_id]/stream

Each route forwards cookies for auth and returns backend's ReadableStream
directly as a Response, preventing any buffering. Sets X-Accel-Buffering: no
to also disable nginx buffering.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 20:43:58 +00:00
..
jobs/[job_id]/stream Fix SSE proxy: create Next.js route handlers for all streaming endpoints 2026-03-01 20:43:58 +00:00
outlines/stream/[id] Fix SSE proxy: create Next.js route handlers for all streaming endpoints 2026-03-01 20:43:58 +00:00
presentation/stream/[id] Fix SSE proxy: create Next.js route handlers for all streaming endpoints 2026-03-01 20:43:58 +00:00