Template for apps turning sketches into live code
Top 27.7% on sourcepulse
This repository provides a starter template for building "Make Real" style applications, enabling users to transform UI mockups into interactive HTML experiences using AI. It's designed for developers looking to leverage AI for rapid UI prototyping and integration with the tldraw SDK.
How It Works
The application utilizes the tldraw SDK to create an interactive canvas. Users draw a UI mockup, select it, and trigger the "Make Real" button. This action captures the drawing, sends it to GPT-4 with instructions to generate HTML, and embeds the resulting HTML within a custom tldraw shape displayed in an iframe on the canvas. This allows for interactive iteration on AI-generated code.
Quick Start & Requirements
npm install
npm run dev
NEXT_PUBLIC_OPENAI_API_KEY
in a .env.local
file.Highlighted Details
Maintenance & Community
The project is associated with tldraw. Further community and development information can be found via tldraw's official channels.
Licensing & Compatibility
The repository is provided as a template, implying permissive usage for creating derivative works. Specific licensing details for the template itself are not explicitly stated in the README, but tldraw SDK is typically MIT licensed.
Limitations & Caveats
The "RiskyButCoolAPIKeyInput" component highlights potential security risks when handling API keys, especially in public-facing applications. The core functionality relies on external AI services (OpenAI), and the quality of output is dependent on the AI model and prompt.
2 weeks ago
1 week