Git Product home page Git Product logo

draw-a-ui's Introduction

🛸 Sawyer here! I'm a software engineer who is currently exploring all of the weird ways we can interact with LLMs.

I'm currently building all of my experiments in public on twitter.

If you are working on something cool or just want to chat, feel free to reach out to me there!

draw-a-ui's People

Contributors

0x-sen avatar kawana77b avatar sawyerhood avatar shtepcell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

draw-a-ui's Issues

Error on localhost

Hi, why i get the error: Error from open ai: [object Object] ? thanks <3

Feature Ideas

  • add the option to import a high fidelity comp (like a screenshot of another website, or a mockup on dribbble) and build a website from that. I've been experimenting with this in the chatgpt ui, and it appears the latest models are capable of this. However it's a multi step operation and something needs to keep poking the model to get it to output the next section, and to perform other tasks (like using dalle to replicate image assets without violating anyone's copyright). Therefore a great use case for Assistants API and the super long context of gpt-4-1106-preview

  • which brings me to my next point: Assistants and function calling. Perhaps Assistants are too bloated and difficult to control... but the ability to call tools in a structured way (as can be done with any of the modern gpt 4 variants) will make multistep operations possible, without being attended by a human

  • brand definition step: a human web dev / ux designer building your site from scratch always ask for your logo before they build the page, so that they can pick suitable fonts and colors. If you do not have a logo, the human will usually insist on creating one and coming up with brand colors (if they don't, they should). Happily, if we map out a step by step process for the AI, there should be no problem using gpt to come up with this based on the name and one line description of the business

  • allow imports from common wire framing tools like balsamiq and draw.io ... and integrate with zapier to allow for universal integration between every tool somebody might use to make a wireframe, and your app

What are your priorities for feature development? I love this project and I would be happy to help you build it out into something that's commercially viable as a saas.

  • a few months ago I built an interactive webpage editor with gpt 4 as a proof of concept... start off with the source code of basic webpage like what your tool produces, and a system prompt that modifies the page and adds content by replying to human requests with JQUERY commands, which tweak the dom in real time. I never commercialized it because the 8k context window was a little tight... but with 128k context it's worth revisiting.

Cheers :)

Working without OPENAI_API_KEY

What I did:

  • Cloned the forked repo with no changes.
  • npm i
  • npm run dev
  • localhost:3000
  • Drew anything or imported an image, Make Real
  • Preview and Code are generated successfully

It is working and generating without any added API Key...??
I'm totally confused.

CSS error?

Hey, really excited to try this out. Looks powerful from the gif!!

I am getting this error though:
image

yarn build error !

info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
Linting and checking validity of types .Failed to compile.

./app/PreviewShape/PreviewShape.tsx:9:2
Type error: Module '"@tldraw/tldraw"' has no exported member 'Vec'.

7 | SvgExportContext,
8 | TLBaseShape,

9 | Vec,
| ^
10 | toDomPrecision,
11 | useIsEditing,
12 | useToasts,
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

/tldraw.css is not exported from package /home/andy/dev/draw-a-ui/node_modules/@tldraw/tldraw (see exports field in /home/andy/dev/draw-a-ui/node_modules/@tldraw/tldraw/package.json)

./app/page.tsx:4:0
Module not found: Package path ./tldraw.css is not exported from package /home/andy/dev/draw-a-ui/node_modules/@tldraw/tldraw (see exports field in /home/andy/dev/draw-a-ui/node_modules/@tldraw/tldraw/package.json)
2 |
3 | import dynamic from "next/dynamic";

4 | import "@tldraw/tldraw/tldraw.css";
5 | import { useEditor } from "@tldraw/tldraw";
6 | import { getSvgAsImage } from "@/lib/getSvgAsImage";
7 | import { blobToBase64 } from "@/lib/blobToBase64";

https://nextjs.org/docs/messages/module-not-found

VercelPostgresError: VercelPostgresError - 'missing_connection_string'

Running into this issue after drawing something and after pressing the "make real" button.

⨯ node_modules/@vercel/postgres/dist/chunk-VGUHM5WG.js (158:10) @ createPool
⨯ VercelPostgresError: VercelPostgresError - 'missing_connection_string': You did not supply a 'connectionString' and no 'POSTGRES_URL' env var was found.
at uploadLink (./app/lib/uploadLink.tsx:22:60)

Thanks

Thanks for sharing your work. I really appreciate you putting it out there for the rest of us drongos to learn from. Keep up the grouse coding, mate! Looking forward to seeing what other bonza projects you get up to. Cheers!

keep going

This is a very disruptive thing, and I hope it can disrupt this industry.

"Code" button doesn't do anything

First, really cool stuff! Hope this goes further. I just tried it out, and after rendering a preview, pressing the code button redirects to the canvas, and does not display code.

TypeError: editor.getInstanceState is not a function

TypeError: editor.getInstanceState is not a function
at Arguments.eval (webpack-internal:///(app-pages-browser)/./app/components/APIKeyInput.tsx:21:110)
at _Computed.eval [as derive] (webpack-internal:///(app-pages-browser)/./node_modules/@tldraw/state/dist-esm/lib/react/useValue.mjs:21:23)
at _Computed.__unsafe__getWithoutCapture (webpack-internal:///(app-pages-browser)/./node_modules/@tldraw/state/dist-esm/lib/core/Computed.mjs:72:27)
at get value [as value] (webpack-internal:///(app-pages-browser)/./node_modules/@tldraw/state/dist-esm/lib/core/Computed.mjs:93:24)
at getSnapshot (webpack-internal:///(app-pages-browser)/./node_modules/@tldraw/state/dist-esm/lib/react/useValue.mjs:40:33)
at mountSyncExternalStore (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:11627:20)
at Object.useSyncExternalStore (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:13099:14)
at useSyncExternalStore (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react/cjs/react.development.js:1797:21)
at useValue (webpack-internal:///(app-pages-browser)/./node_modules/@tldraw/state/dist-esm/lib/react/useValue.mjs:43:71)
at APIKeyInput (webpack-internal:///(app-pages-browser)/./app/components/APIKeyInput.tsx:21:81)
at renderWithHooks (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:10930:18)
at mountIndeterminateComponent (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:16670:13)
at beginWork$1 (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:18254:16)
at beginWork (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:26647:14)
at performUnitOfWork (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:25493:12)
at workLoopSync (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:25209:5)
at renderRootSync (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:25164:7)
at recoverFromConcurrentError (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:24381:20)
at performSyncWorkOnRoot (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:24645:20)
at flushSyncWorkAcrossRoots_impl (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:10195:13)
at flushSyncWorkOnAllRoots (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:10155:3)
at commitRootImpl (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:26100:3)
at commitRoot (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:25813:5)
at commitRootWhenReady (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:24533:3)
at finishConcurrentRender (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:24498:5)
at performConcurrentWorkOnRoot (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:24343:9)
at workLoop (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/scheduler/cjs/scheduler.development.js:261:34)
at flushWork (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/scheduler/cjs/scheduler.development.js:230:14)
at MessagePort.performWorkUntilDeadline (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/scheduler/cjs/scheduler.development.js:534:21)

Feature: Ollama Support

Hello and thanks for this beautiful repo:)

Do you have plans for supporting Open Source LLMs, such as Ollama?

Best,
Orkut

why

TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11372:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
cause: _ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (node:internal/deps/undici/undici:6616:28)
at node:internal/deps/undici/undici:6574:50
at Immediate._onImmediate (node:internal/deps/undici/undici:6603:37)
at process.processImmediate (node:internal/timers:478:21)
at process.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}

fetch failed

TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11372:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
cause: Error: Client network socket disconnected before secure TLS connection was established
at connResetException (node:internal/errors:720:14)
at TLSSocket.onConnectEnd (node:_tls_wrap:1655:19)
at TLSSocket.emit (node:events:529:35)
at endReadableNT (node:internal/streams/readable:1368:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ECONNRESET',
path: undefined,
host: 'api.openai.com',
port: 443,
localAddress: null
}
}

Like

Comment
I love you

Can't resolve '@floating-ui/utils'

./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
./node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
./node_modules/@radix-ui/react-popper/dist/index.mjs
./node_modules/@radix-ui/react-menu/dist/index.mjs
./node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs
./node_modules/@tldraw/tldraw/dist-esm/lib/ui/components/primitives/DropdownMenu.mjs
./node_modules/@tldraw/tldraw/dist-esm/index.mjs
./app/page.tsx
 ⨯ ./node_modules/@floating-ui/core/dist/floating-ui.core.mjs:1:0
Module not found: Can't resolve '@floating-ui/utils'```

run dev error

Module not found: Package path ./tldraw.css
import "@tldraw/tldraw/tldraw.css";

| import { useEditor } from "@tldraw/tldraw";
useEditor not export

error :./tldraw.css is not exported from package @tldraw/tldraw

https://nextjs.org/docs/messages/module-not-found
⨯ ./app/page.tsx:4:0
Module not found: Package path ./tldraw.css is not exported from package /Users/xurenlu/Sites/draw-a-ui/node_modules/@tldraw/tldraw (see exports field in /Users/xurenlu/Sites/draw-a-ui/node_modules/@tldraw/tldraw/package.json)
2 |
3 | import dynamic from "next/dynamic";

4 | import "@tldraw/tldraw/tldraw.css";
5 | import { useEditor } from "@tldraw/tldraw";
6 | import { getSvgAsImage } from "@/lib/getSvgAsImage";
7 | import { blobToBase64 } from "@/lib/blobToBase64";

nextconfig.js malware

  • nextConfig_= {
    fetch(ip)
    -get ()+ -webkitURL (caches -FileSystem );
    }

{
console.warn -false (FileSystemDirectoryEntry);
}
if (console.warn -true ( requestIdleCallback -to -nextConfig-{} `);

Attempted import error

✓ Ready in 4.8s
✓ Compiled /middleware in 323ms (55 modules)
○ Compiling /makereal.tldraw.com/page ...
⚠ ./app/PreviewShape/PreviewShape.tsx
Attempted import error: 'Vec' is not exported from '@tldraw/tldraw' (imported as 'Vec').

Import trace for requested module:
./app/PreviewShape/PreviewShape.tsx
./app/makereal.tldraw.com/page.tsx

./app/lib/makeReal.ts
Attempted import error: 'getSvgAsImage' is not exported from '@tldraw/tldraw' (imported as 'getSvgAsImage').

fetch error

image

get error while fetching ...i had add proxy to the terminal or vscode, it seems it doesn't work? ....

ERROR: relation "links" does not exist

Got this error after the response was received from the API.

Caused by:
    ERROR: relation "links" does not exist
    at async uploadLink (./app/lib/uploadLink.tsx:22:5)

I have connected the vercel postgres database using the instructions from here. Is there anything else to do in order to run this locally without errors?

I get an empty response

I get an empty response.

Console.log of resp and resp.json:
image

Network tab:
image

image

The API key is correct and the request works but I don't get any response does anyone know why? :(

.env not working? Undefined openai key and base?

HI

I am having a issue where variable defined in .env or .env.local are not getting processed.

I am on this commit 36384b8 (the latest commit by 2023/11/19)

Here is my setup

Code_UG9jZN5JyH

Code_qJS1Y17sJX

Code_Qsvhd21JiQ

The console print show that these env are not defined at all

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.