Design Draft Generation Code, the Future of Web Development?

Design Draft Generation Code, the Future of Web Development?. Web design and development is an ever-evolving field, and designers and front-end developers。

分享
Design Draft Generation Code, the Future of Web Development?
Generate By DALLE-3

Web design and development is an ever-evolving field, and designers and front-end developers often face a common challenge: how to quickly and efficiently turn conceptual sketches into actual usable HTML code. This process is time-consuming and error-prone, especially when fleshing out complex design ideas. During the preliminary design phase, frequent changes and adjustments are often required. If every change requires manual code writing, it will slow the project schedule and increase costs.

Currently, we have two ways to solve this problem: the first is the low-code mode, and the second is to use AI. Ai will merge the low-code mode, and many commercial companies are already doing this. Today’s protagonist is a project with over 13k stars on GitHub draw-a-ui. It describes itself like this:

Draw a mockup and generate HTML for it

It is based on tldraw and gpt-4-vision API, aiming to automatically generate HTML code based on the wireframe diagram drawn by users. Users only need to sketch a simulated interface, draw-a-ui can convert it into an HTML file equipped with Tailwind CSS, greatly reducing the time from design to development. The project is currently in development, but the core function — converting SVG of the drawing canvas into PNG and then sending this PNG to gpt-4-vision to return a single HTML file as instructions — has been perfected.

Using this project is very simple: clone it and configure your OpenAI key.
echo "OPENAI_API_KEY=sk-your-key" > .env.local
npm install
npm run dev

echo "OPENAI_API_KEY=sk-your-key" > .env.local 
npm install 
npm run dev

You can access it through http://localhost:3000.

https://github.com/SawyerHood/draw-a-ui/blob/main/demo.gif

It supports online design and uploading PNG images, such as taking a screenshot of the Medium homepage and then uploading it. We can get the results after waiting for about 20 seconds (screen recording is accelerated).

Although the draw-a-ui project is currently labeled for demonstration purposes and not recommended for direct use in production environments, its underlying concepts and technological implementations undoubtedly showcase future development trends. This project utilizes cutting-edge artificial intelligence technologies, such as GPT-4, to bring revolutionary changes to front-end development workflows.

I’m looking forward to this technology since I hate writing CSS. 🐶

文章索引

阅读更多

那些意外变成特性的 Bug:当代码漏洞改写计算史

那些意外变成特性的 Bug:当代码漏洞改写计算史

那些意外变成特性的 Bug:当代码漏洞改写计算史. 比起草台班子将错就错的神话,面对异常数据时的观测定力才是真的 社交网络上常年流传着一类爽文:某家公司的程序员把代码写崩了,结果不仅没被开除,这个 Bug 反而成了拳头产品,妥妥的爽文主角剧本。 最常被搬出来的有三个:Audio Hijack 写错试用期拯救公。

By huizhou92