Make Real: tldraw's AI Adventure

Rate this content
Bookmark

This is the full story behind "Make Real", tldraw's viral AI experiment that lets you turn your low fidelity drawing into a functional website. It's half startup rollercoaster ride and half moral tale about betting on React — as Make Real was only possible because of the ability to put any React component onto tldraw's canvas.

Here's the full behind-the-scenes perspective, and everything we learned along the way.

This talk has been presented at React Advanced 2024, check out the latest edition of this React Conference.

FAQ

No, the generated code is in vanilla HTML, CSS, and JavaScript.

Yes, tldraw can be used for wireframing, among other purposes like creating flowcharts and assets.

tldraw uses browser APIs and techniques like hiding off-screen elements without unmounting them to manage performance.

tldraw is based in London.

Yes, tldraw can integrate AI models to generate content like prototypes and flowcharts from canvas drawings.

tldraw can be extended by adding custom shapes as React components. There are plans for plugins to enhance its functionality.

tldraw is a canvas and whiteboard SDK that can be integrated into a React app to build and extend your own canvas.

Yes, tldraw is collaborative and free to use.

Unlike other canvas applications that use custom rendering engines, tldraw is built with React and utilizes the DOM for rendering, making it versatile for web use.

You can visit tldraw.com for general use and tldraw.dev for developer resources.

Steve Ruiz
Steve Ruiz
28 min
25 Oct, 2024

Comments

Sign in or register to post your comment.
  • Va Da
    Va Da
    P4
    Thanks!
  • Steve Ruiz
    Steve Ruiz
    tldraw
    > Is there a fully open source alternative to Tldraw? Yes Va Da, tldraw! Our v1 product is MIT licensed. https://github.com/tldraw/tldraw-v1
  • Va Da
    Va Da
    P4
    Is there a fully open source alternative to Tldraw?
Video Summary and Transcription
tldraw is a canvas and a whiteboard SDK that can be integrated into React apps. It allows for high-performance rendering using the DOM and React. tldraw's canvas is powerful and can be enhanced with Vision models for image creation and AI utilization. It enables easy iteration and updating of designs based on annotations. tldraw can be used to create UIs, complex applications, interactive things, calculators, ASCII art, and more. It explores the use of AI on the canvas and can generate images, code, flowcharts, and content. tldraw focuses on performance optimization, AI model exploration, security, usability, and accessibility. The Talk also discusses the business model, future plans, and the vision of building a plugin community for the canvas.

1. Introduction to Tealdraw

Short description:

I am Steve Ruiz from a company called Tealdraw. Tealdraw is a canvas and a whiteboard SDK that can be integrated into React apps. It's a beautiful software that allows you to do all the things you can do on the web on the canvas. Canvases are notoriously hard to build and render, but Tealdraw uses the DOM and React to achieve high performance. You can use Tealdraw for various purposes like making memes, flowcharts, wireframes, and more. It's collaborative, free, and easy to use.

I am Steve Ruiz from a company called Tealdraw. Let me put this over here. We are in London. You can follow me on Twitter, and you should, at SteveRuiz.

Okay. Tealdraw is this canvas. Whiteboard. It's also a whiteboard SDK, which is kind of the interesting thing, a little bit different about it, where you can put it into a React app and build your own canvas, extend it, add stuff to it, all that. It's beautiful software.

Just to prove that it really, really is a React app, I'll do one of these. This is the only time that I'm gonna show code and then I'll go back to everything else, you know. Hey, hello. What? Hey, hello. Right there, right? So even though the canvas is, you know, it feels like a canvas, it can zoom in, zoom out, you can do lots and lots and lots of shapes and all that stuff, and it'll just do it right, right, right. Every one of these little shapes is its own React component. And so you can do all the things that you can do on the web on the canvas as well. And that is not an obvious decision.

Canvases are notoriously, like, hard to build, and they're also hard to, like, render stuff in. Apps like Miro, Figma, et cetera, they used custom rendering engines that they were in very high-performance languages, they used WASM and all those things, like, in order to get the most out of the browser experience so that you can have thousands of shapes and move around very smoothly. But it turns out you can actually do that with the DOM and with React as well. So if your app is slow, it's on you, not on this.

So what do you do with this type of app? You can do, you know, whatever. Make your memes, make your, you know, write your hay, it's got that lovely, like, pressure-sensitive or variable-width line algorithm that I made. You can do flowcharts and make different assets and stuff like that. You can do wireframes. A lot of people use this for wireframes. But you know, it's just for drawing, it's just for communicating. It's collaborative, it's free, tealdraw.com, go for it. And for me, that's enough. I actually, you know, this is the thing that I wanted to build, I wanted to build technology and made it really easy for other people to build these types of applications.

2. Enhancing the Canvas with Vision Models

Short description:

Tealdraw allows you to drop in a component, extend it, add your own stuff, and wire it into your app. The canvas became even more powerful when the Vision models came out, enabling easy creation of images and utilization of AI. The Make Real project, inspired by Open AI's Vision models, generates code and prototypes based on user drawings. Tealdraw's web-based canvas allows for advanced functionality like annotation and interactivity.

Drop in a Tealdraw component, extend it, add your own stuff, wire it into your app. That was the hope. 2022, when I started the idea of, like, using AI on the canvas. I mean, AI was kind of getting popular, GPT-2, that type of stuff. And what people would be doing is, like, having the GPT-2 generate Mermaid.js diagrams, render them and then, like, basically render them onto the canvas. I'm like, oh, that's kind of cool, but it's not really that cool. Yeah, whatever, right? Or, like, having templates that you could use the AI to, like, swap things in and out, you know, kind of like FigJam style, like, their AI-powered template stuff. It's not really exciting to me, but it would have been very easy to build on top of Tealdraw.

It wasn't until the Vision models came out, and this was, you know, end of 2022, that suddenly the canvas became, like, oh, cool, like, the models now work with images. We have a canvas that we can very easily create images out of, right? Like, I can just do whatever, copy as SVG or copy as PNG, you know, paste, and now here's my image from whatever I just drew. Maybe we could use that as input to the models. Now, I wasn't actually, we weren't the, the original idea for Make Real didn't come from us, even. It came from a designer at Figma named Sawyer Hood, formerly of Figma, who saw the Open AI's presentation about these new Vision models and was like, oh, this is so cool, we can use this to generate code. And he had a little demo where it would kind of create a prototype based on whatever you drew, and it would send it to the model and say, hey, model, you are an expert tailwind and web developer who works from, like, low fidelity wireframes and creates working prototypes. Here's the latest image from your designers. Please come back with a working prototype. And it would. We took this a lot further. We put it back on the canvas. So this is a, again, the canvas is made of web stuff, so we can do this. Sadly, Miro and the others could not because their canvas wasn't web.

This little thing that I can still draw on top of and rotate, all that stuff, is a working website. I can double click in here, I can add minutes, I can add seconds, I can start the timer, and it sort of runs. Applause. Yeah, right. Yeah. Which is kind of cool. But again, because it's on the canvas, I can do more than that. I can also annotate. I can say, you know, put in a header here that says, like, timer.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
Watch video: Debugging JS
Debugging JavaScript is a crucial skill that is often overlooked in the industry. It is important to understand the problem, reproduce the issue, and identify the root cause. Having a variety of debugging tools and techniques, such as console methods and graphical debuggers, is beneficial. Replay is a time-traveling debugger for JavaScript that allows users to record and inspect bugs. It works with Redux, plain React, and even minified code with the help of source maps.
A Framework for Managing Technical Debt
TechLead Conference 2023TechLead Conference 2023
35 min
A Framework for Managing Technical Debt
Top Content
Today's Talk discusses the importance of managing technical debt through refactoring practices, prioritization, and planning. Successful refactoring requires establishing guidelines, maintaining an inventory, and implementing a process. Celebrating success and ensuring resilience are key to building a strong refactoring culture. Visibility, support, and transparent communication are crucial for addressing technical debt effectively. The team's responsibilities, operating style, and availability should be transparent to product managers.
The Whimsical Potential of JavaScript Frameworks
React Summit US 2023React Summit US 2023
28 min
The Whimsical Potential of JavaScript Frameworks
Top Content
Watch video: The Whimsical Potential of JavaScript Frameworks
The speaker discusses the whimsical and detailed work of Stripe, particularly their interactive and dynamic pages. They explain the use of React for building whimsical details and tracking mouse position. The speaker introduces React Spring for smooth animation and React3 Fiber for creating a 3D egg model. They also mention the use of Framer Motion and React server components for animating CSS properties.
Building a Voice-Enabled AI Assistant With Javascript
JSNation 2023JSNation 2023
21 min
Building a Voice-Enabled AI Assistant With Javascript
Top Content
This Talk discusses building a voice-activated AI assistant using web APIs and JavaScript. It covers using the Web Speech API for speech recognition and the speech synthesis API for text to speech. The speaker demonstrates how to communicate with the Open AI API and handle the response. The Talk also explores enabling speech recognition and addressing the user. The speaker concludes by mentioning the possibility of creating a product out of the project and using Tauri for native desktop-like experiences.
A Practical Guide for Migrating to Server Components
React Advanced 2023React Advanced 2023
28 min
A Practical Guide for Migrating to Server Components
Top Content
Watch video: A Practical Guide for Migrating to Server Components
React query version five is live and we'll be discussing the migration process to server components using Next.js and React Query. The process involves planning, preparing, and setting up server components, migrating pages, adding layouts, and moving components to the server. We'll also explore the benefits of server components such as reducing JavaScript shipping, enabling powerful caching, and leveraging the features of the app router. Additionally, we'll cover topics like handling authentication, rendering in server components, and the impact on server load and costs.
Power Fixing React Performance Woes
React Advanced 2023React Advanced 2023
22 min
Power Fixing React Performance Woes
Top Content
Watch video: Power Fixing React Performance Woes
This Talk discusses various strategies to improve React performance, including lazy loading iframes, analyzing and optimizing bundles, fixing barrel exports and tree shaking, removing dead code, and caching expensive computations. The speaker shares their experience in identifying and addressing performance issues in a real-world application. They also highlight the importance of regularly auditing webpack and bundle analyzers, using tools like Knip to find unused code, and contributing improvements to open source libraries.

Workshops on related topic

AI on Demand: Serverless AI
DevOps.js Conf 2024DevOps.js Conf 2024
163 min
AI on Demand: Serverless AI
Top Content
Featured WorkshopFree
Nathan Disidore
Nathan Disidore
In this workshop, we discuss the merits of serverless architecture and how it can be applied to the AI space. We'll explore options around building serverless RAG applications for a more lambda-esque approach to AI. Next, we'll get hands on and build a sample CRUD app that allows you to store information and query it using an LLM with Workers AI, Vectorize, D1, and Cloudflare Workers.
AI for React Developers
React Advanced 2024React Advanced 2024
142 min
AI for React Developers
Featured Workshop
Eve Porcello
Eve Porcello
Knowledge of AI tooling is critical for future-proofing the careers of React developers, and the Vercel suite of AI tools is an approachable on-ramp. In this course, we’ll take a closer look at the Vercel AI SDK and how this can help React developers build streaming interfaces with JavaScript and Next.js. We’ll also incorporate additional 3rd party APIs to build and deploy a music visualization app.
Topics:- Creating a React Project with Next.js- Choosing a LLM- Customizing Streaming Interfaces- Building Routes- Creating and Generating Components - Using Hooks (useChat, useCompletion, useActions, etc)
Build Modern Applications Using GraphQL and Javascript
Node Congress 2024Node Congress 2024
152 min
Build Modern Applications Using GraphQL and Javascript
Featured Workshop
Emanuel Scirlet
Miguel Henriques
2 authors
Come and learn how you can supercharge your modern and secure applications using GraphQL and Javascript. In this workshop we will build a GraphQL API and we will demonstrate the benefits of the query language for APIs and what use cases that are fit for it. Basic Javascript knowledge required.
Leveraging LLMs to Build Intuitive AI Experiences With JavaScript
JSNation 2024JSNation 2024
108 min
Leveraging LLMs to Build Intuitive AI Experiences With JavaScript
Featured Workshop
Roy Derks
Shivay Lamba
2 authors
Today every developer is using LLMs in different forms and shapes, from ChatGPT to code assistants like GitHub CoPilot. Following this, lots of products have introduced embedded AI capabilities, and in this workshop we will make LLMs understandable for web developers. And we'll get into coding your own AI-driven application. No prior experience in working with LLMs or machine learning is needed. Instead, we'll use web technologies such as JavaScript, React which you already know and love while also learning about some new libraries like OpenAI, Transformers.js
Llms Workshop: What They Are and How to Leverage Them
React Summit 2024React Summit 2024
66 min
Llms Workshop: What They Are and How to Leverage Them
Featured Workshop
Nathan Marrs
Haris Rozajac
2 authors
Join Nathan in this hands-on session where you will first learn at a high level what large language models (LLMs) are and how they work. Then dive into an interactive coding exercise where you will implement LLM functionality into a basic example application. During this exercise you will get a feel for key skills for working with LLMs in your own applications such as prompt engineering and exposure to OpenAI's API.
After this session you will have insights around what LLMs are and how they can practically be used to improve your own applications.
Table of contents: - Interactive demo implementing basic LLM powered features in a demo app- Discuss how to decide where to leverage LLMs in a product- Lessons learned around integrating with OpenAI / overview of OpenAI API- Best practices for prompt engineering- Common challenges specific to React (state management :D / good UX practices)
Working With OpenAI and Prompt Engineering for React Developers
React Advanced 2023React Advanced 2023
98 min
Working With OpenAI and Prompt Engineering for React Developers
Top Content
Workshop
Richard Moss
Richard Moss
In this workshop we'll take a tour of applied AI from the perspective of front end developers, zooming in on the emerging best practices when it comes to working with LLMs to build great products. This workshop is based on learnings from working with the OpenAI API from its debut last November to build out a working MVP which became PowerModeAI (A customer facing ideation and slide creation tool).
In the workshop they'll be a mix of presentation and hands on exercises to cover topics including:
- GPT fundamentals- Pitfalls of LLMs- Prompt engineering best practices and techniques- Using the playground effectively- Installing and configuring the OpenAI SDK- Approaches to working with the API and prompt management- Implementing the API to build an AI powered customer facing application- Fine tuning and embeddings- Emerging best practice on LLMOps