GithubHelp home page GithubHelp logo

teamgroove / draw-a-ui-forked Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tldraw/make-real

0.0 0.0 0.0 1.14 MB

Draw a mockup and generate html for it

Home Page: https://draw-a-ui-umber.vercel.app

License: MIT License

JavaScript 1.10% TypeScript 87.51% CSS 11.40%

draw-a-ui-forked's Introduction

Try it out at makereal.tldraw.com.

**To use your own API key, you need to have access to usage tier 1. Check out your current tier, and how to increase it in the OpenAI settings.

This is an experimental fork of Sawyer Hood's draw a ui. Hopefully some of these changes can make it upstream!

  • Changes the preview to an embedded shape that appears on the canvas.
  • Only selected shapes are used when generating html.
  • One embedded preview can be given back to GPT, with annotations.
  • Some other tweaks.

draw-a-ui

This is an app that uses tldraw and the gpt-4-vision api to generate html based on a wireframe you draw.

A demo of the app

This works by just taking the current canvas SVG, converting it to a PNG, and sending that png to gpt-4-vision with instructions to return a single html file with tailwind.

Disclaimer: This is a demo and is not intended for production use. It doesn't have any auth so you will go broke if you deploy it.

Getting Started

This is a Next.js app. To get started run the following commands in the root directory of the project. You will need an OpenAI API key with access to the GPT-4 Vision API.

echo "OPENAI_API_KEY=sk-your-key" > .env.local
yarn
yarn dev

Open http://localhost:3000 with your browser to see the result.

draw-a-ui-forked's People

Contributors

steveruizok avatar sawyerhood avatar todepond avatar shtepcell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.