Skip to content

Playground & HTTP API

Public playground: https://cross-framework.netlify.app/ — full documentation: https://cross-framework-doc.netlify.app/

The interactive UI lives in the Nuxt 4 app under website/. It is not part of the published npm package; it is a developer demo that calls the same conversion logic as the CLI.

Run locally

From website/:

bash
npm install
npm run dev

Default dev server port is 3022 (website/nuxt.config.tsdevServer.port).

Open http://localhost:3022 in your browser.

Production / preview base URL: set NUXT_PUBLIC_SITE_URL (or your host’s equivalent) so SEO and links resolve correctly.

HTTP API

Endpoint: POST /api/convert

Body (JSON):

FieldTypeDefaultDescription
from"react"reactSource framework (only react supported).
to"vue"vueTarget (only vue supported).
sourceCodestring""Full React component source.
filenamestring"Component.tsx"Virtual filename for the parser.

Success: HTTP 200 with plain text body = the generated Vue SFC string.

Error: HTTP 400 with statusMessage set to the thrown error message (or "Conversion failed" if non-Error).

Implementation reference: website/server/api/convert.post.ts (calls convertCode from src/convert.ts).

Samples

The playground loads curated examples from website/samples/nine demos (greeting, class/style card, invoice line, roadmap steps, mount title, shopping cart, settings panel, onboarding wizard, command palette). See website/samples/index.ts for the list.

Questions? parsajiravand@gmail.com · MIT License · BRANDING.md for name / fork policy · https://cross-framework.netlify.app/ · https://cross-framework-doc.netlify.app/