Giter Club home page Giter Club logo

make-real-starter's Introduction

Make Real

Use this repo as a template to create Make Real style apps like makereal.tldraw.com. To get started:

  1. Use the template and clone your new repo to your computer
  2. Run npm install to install dependencies
  3. Get an OpenAI API key from platform.openai.com/api-keys. Make sure you are at least a Tier 1 API user, which means you have access to GPT-4 Vision. You can check your tier on the OpenAI API Limits.
  4. Create a .env.local file that contains OPENAI_API_KEY=your api key here
  5. Run npm run dev
  6. Open localhost:3000 and make some stuff real!

How it works

Make Real is built with tldraw, a very good React library for creating whiteboards and other infinite canvas experiences.

To use it, first draw a mockup for a piece of UI. When you're ready, select the drawing, and press the Make Real button. We'll capture an image of your selection, and send it to OpenAI's GPT-4V along with instructions to turn it into a HTML file.

We take the HTML response and add it to a tldraw custom shape. The custom shape shows the response in an iframe so that you can interact with it on the canvas. If you want to iterate on the response, annotate the iframe, select it all, and press 'Make Real' again.

To make changes

To change how Make Real works, start from the makeReal() function. From there, you can change the prompt that gets sent to gpt-4.

If you'd like Make Real to create something other than HTML, you'll need to either update the ResponseShape to display something different, or use one of tldraw's built-in shapes like image or text.

The dangerous API key input method

For prototyping or at least until the vision APIs are able to support higher usage limits, we've also included the RiskyButCoolAPIKeyInput, similar to the one found on makereal.tldraw.com. Please use this as carefully and ethically as you can, as users should be reluctant to add API keys to public sites.

make-real-starter's People

Contributors

somehats avatar todepond avatar steveruizok 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.