# ui2code.ai

> ui2code.ai turns designs, screenshots, Figma files, and natural-language prompts into production-ready frontend code. Users describe or upload an interface; the platform plans a blueprint, streams code generation in real time, and produces a live, iterable preview that can be exported or deployed.

The main public site lives at `https://ui2code.ai`. The primary backend API (discovery metadata, capability flags, health, auth endpoints) lives at `https://api.ui2code.ai`. Both origins publish the same agent-discovery surface so LLMs and tools can orient themselves without crawling the human UI.

Typical users are frontend engineers, product designers, agencies, and PMs who need to go from visual source material to running code. Supported flows include screenshot-to-code, Figma-to-React/Vue, prompt-to-UI, design-system-aligned scaffolding, and rapid prototyping. Generated projects are persisted, can be iterated on from the dashboard, and can be exported or deployed to a sandboxed preview.

Access model: the landing page, pricing, and legal pages are fully public. The dashboard, project workspace, prompt library, UI preview, and settings are behind Clerk-backed authentication (issuer: `https://clerk.ui2code.ai`). Programmatic clients should exchange an API key for a short-lived access token via the backend API and then follow the OAuth 2.0 / OIDC metadata published at the well-known endpoints below.

Markdown negotiation: public HTML pages respond with markdown when the request carries `Accept: text/markdown`. Agents that want structured content should prefer this over scraping HTML.

## Product

- [Homepage](https://ui2code.ai/): start here to try a design-to-code or prompt-to-UI conversion.
- [Pricing](https://ui2code.ai/pricing): plan tiers, included usage, and upgrade paths.
- [API Discovery docs](https://ui2code.ai/docs/api): concise agent-oriented overview of every public discovery endpoint on the main site.
- [Dashboard](https://ui2code.ai/dashboard): signed-in workspace for managing generated projects (authentication required).
- [Prompt library](https://ui2code.ai/prompt-library): curated and saved prompts for common conversion flows (authentication required).
- [UI preview](https://ui2code.ai/ui-preview): sandboxed live preview of generated apps (authentication required).

## Docs

- [OpenAPI 3.1 service description](https://ui2code.ai/openapi.json): machine-readable schema covering public discovery and auth-bootstrap endpoints.
- [RFC 9727 API catalog](https://ui2code.ai/.well-known/api-catalog): `application/linkset+json` index linking docs, service description, and metadata documents.
- [Backend API base](https://api.ui2code.ai/api): primary API origin — use for `/api/health`, `/api/status`, `/api/capabilities`, and authenticated endpoints.

## Authentication

- [OpenID Connect discovery](https://ui2code.ai/.well-known/openid-configuration): OIDC metadata mirroring the configured Clerk issuer.
- [OAuth 2.0 authorization server metadata](https://ui2code.ai/.well-known/oauth-authorization-server): authorization/token endpoints, supported grant types, PKCE methods.
- [RFC 9728 protected resource metadata](https://ui2code.ai/.well-known/oauth-protected-resource): declares which authorization server can issue tokens for this resource.
- [API key exchange](https://api.ui2code.ai/api/auth/exchange-api-key): programmatic clients exchange a platform-issued API key for a short-lived access token.

## Agent Integration

- [MCP server card](https://ui2code.ai/.well-known/mcp/server-card.json): declarative description of the read-only Model Context Protocol server published by this origin.
- [MCP endpoint](https://ui2code.ai/mcp): JSON-RPC 2.0 endpoint speaking protocol version `2025-06-18`. Supports `initialize`, `tools/list`, `tools/call`, `resources/list`, `resources/read`.
- [Agent skills index](https://ui2code.ai/.well-known/agent-skills/index.json): SHA-256-digested catalog of downloadable `SKILL.md` documents. Current skills: `discover-ui2code-surface`, `convert-designs`, `review-pricing-and-policies`.

## Legal

- [Privacy policy](https://ui2code.ai/privacy-policy)
- [Terms of service](https://ui2code.ai/terms-of-service)
- [Cookie policy](https://ui2code.ai/cookies)

## Optional

- [Backend llms.txt](https://api.ui2code.ai/llms.txt): companion overview at the API origin, focused on the Cloudflare Workers / Durable Object generation platform. Useful when you specifically need backend architecture context.
- [Agent markdown gateway](https://ui2code.ai/agent-markdown): fetch markdown representations of public marketing pages by passing `?path=/pricing` (or similar) instead of negotiating `Accept: text/markdown` on each page.
- [robots.txt](https://ui2code.ai/robots.txt): published with a `Content-Signal: ai-train=no, search=yes, ai-input=yes` header to declare the preferred agent posture.
