Skip to content

docs: add frontend integration guide#9

Merged
trenchsheikh merged 1 commit into
mainfrom
cursor/frontend-integration-doc-43a7
Apr 30, 2026
Merged

docs: add frontend integration guide#9
trenchsheikh merged 1 commit into
mainfrom
cursor/frontend-integration-doc-43a7

Conversation

@trenchsheikh

Copy link
Copy Markdown
Owner

Adds backend/docs/FRONTEND_INTEGRATION.md, a practical guide for the
frontend team on how to wire up to the UnderWriter backend.

What's covered

  • Servers and ports, plus the recommended Next.js rewrite to avoid CORS.
  • All four endpoints (/api/health, /api/run, /api/memo/{runId}, /api/amend) with request/response shapes.
  • The shared contract.ts types (DeskFinding, Verdict, RunEvent, MemoData, OverrideContext, AmendmentDraft) and three options for sharing the file with the frontend.
  • The SSE run flow: guaranteed event order, why EventSource won't work for POST, a copy-pasteable streaming reader (lifted from scripts/smoke.ts), and a suggested useReducer state model.
  • End-to-end UI choreography for the two seeded demos (clean-acme PASS / bec-acme BLOCK + amendment).
  • Error-handling tiers, frontend env vars, and a checklist for the UI build.

The guide is read-only documentation — no code changes — so no testing needed beyond rendering the markdown.

Slack Thread

Open in Web Open in Cursor 

Co-authored-by: Mr T <trenchsheikh@users.noreply.github.com>
@trenchsheikh trenchsheikh marked this pull request as ready for review April 30, 2026 19:44
@trenchsheikh trenchsheikh merged commit d335835 into main Apr 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants