Commit Graph

4 Commits

Author SHA1 Message Date
Benjamin Taylor 6f3638c446 document Copilot Runtime hosting for React SPAs
A React single-page app is the one frontend the docs could not get to a
working runtime. Every framework quickstart hosts the runtime in a Next.js
route handler and uses a relative runtimeUrl of /api/copilotkit, which only
resolves because Next.js serves the app and the runtime from one origin. A
Vite or CRA app has neither a server nor a shared origin, so that step had
nowhere to land.

Add a React SPA page covering only that difference: a standalone Node runtime
server, the absolute runtimeUrl it requires, and cors: true -- which is off by
default on createCopilotNodeListener, unlike the Express and Hono adapters.
Everything else links back to the root React docs rather than restating them.

Registering react-spa in the frontend registry is what makes /react-spa
resolve; route resolution is gated on isFrontendId, so an unregistered page
404s. Vue and React Native are the precedent: registered, single-page, no
namespaced subtree. The existing registry-driven guard in frontend-options
already covers the new page.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 11:52:48 -05:00
Tyler Slaton 6c15645b6b docs: organize Channels guides by provider and framework 2026-07-27 23:50:31 -04:00
Mike Ryan 06df1ea155 docs(angular): improve standalone documentation 2026-07-23 07:51:53 -07:00
Mike Ryan 873cbb8b6c feat(showcase): checkpoint 1 - baseline and registry 2026-07-23 07:12:53 -07:00