Lurker News
Hey HN, I’m Kiet – one half of the two-person team building Onlook (https://beta.onlook.com/), an open-source [https://github.com/onlook-dev/onlook/] visual editor that lets you edit and create React apps live on an infinite canvas.

We launched Onlook [1][2] as a local-first Electron app almost a year ago. Since then, “prompt-to-build” tools have blown up, but none let you design and iterate visually. We fixed that by taking a visual-first, AI-powered approach where you can prompt, style, and directly manipulate elements in your app like in a design tool.
Two months ago, we decided to move away from Electron and rewrite everything for the browser. We wanted to remove the friction of downloading hundreds of MBs and setting up a development environment just to use the app. I wrote more here [3] about how we did it, but here are some learnings from the whole migration:
1. While most of the React UI code can be reused, mapping from Electron’s SPA experience to a Next.js app with routes is non-trivial on the state management side.
2. We were storing most of the data locally as large JSON objects. Moving that to a remote database required major refactoring into tables and more loading states. We didn’t have to think as hard about querying and load time before.
3. Iframes in the browser enforce many more restrictions than Electron webview. Working around this required us to inject code directly into the user project in order to do cross-iframe communication.
4. Keeping API keys secure is much easier on a web application than an Electron app. In Electron, every key we leave on the client can be statically accessed. Hence, we had to proxy any SDK we used that required an API key into a server call. In the web app, we can just keep the keys on the server.
5. Pushing a release bundle in Electron can take 1+ hours. And some users may never update. If we had a bug in the autoupdater itself, certain users could be “stranded” in an old version forever, and we’d have to email them to update. Though this is still better than mobile apps that go through an app store, it’s still very poor DX.
How does Onlook for web work?
We start by connecting to a remote “sandbox” [4]. The visual editing component happens through an iframe. We map the HTML element in the iframe to the location in code. Then, when an edit is made, we simulate the change on the iframe and edit the code at the same time. This way, visual changes always feel instant.
While we’re still ironing out the experience, you can already: - Select elements and prompt changes
- Update TailwindCSS classes via the styling UI
- Draw in new divs and elements
- Preview on multiple screen sizes
- Edit your code through an in-browser IDE
We want to make it trivial for anyone to create, style, and edit codebases. We’re still porting over functionalities from the desktop app — layers, fonts, hosting, git, etc. Once that is done, we plan on adding support for back-end functionalities such as auth, database, and API calls.
Special thank you to the 70+ contributors who have helped create the Onlook experience! I think there’s still a lot to be solved for in the design and dev workflow, and I think the tech is almost there.
You can clone the project and run it from our repo (linked to this post) or try it out at https://beta.onlook.com where we’re letting people try it out for free.
I’d love to hear what you think and where we should take it next :)
[1] https://news.ycombinator.com/item?id=41390449
[2] https://news.ycombinator.com/item?id=40904862
[3] https://docs.onlook.com/docs/developer/electron-to-web-migra...
[4] Currently, the sandbox is through CodeSandbox, but we plan to add support for connecting to a locally running server as well

Comments (81) 28 threads

Earlier comments
OsrsNeedsf2P2 replies#
What's up with the recent trend of YC being open source? Is it an ideology thing, a sign of confidence, or is it really that consumers prefer open source software?
vachina1 reply#
Ensures your beta software gets free updates until it gets commercialized by private equity 3 years later.
hoakiet98#
I think this is a cynical take on OSS. As a for-profit company, we have already commercialized the desktop version and plan on commercializing the web version as well.

I don't think this is unhealthy for open-source, and I hope we're transparent about that. The code is still free and self-hostable under Apache 2.0.

hoakiet98#
> What's up with the recent trend of YC being open source?

To be fair, we were open source before we got into YC. YC didn't mandate any business model, and the vast majority of our batchmates (empirically, 90%) were closed-source.
> Is it an ideology thing, a sign of confidence, or is it really that consumers prefer open source software?
I personally think it's a competitive advantage for distribution, differentiation, and attracting talent. Also as an engineer, I just like OSS.

Nimishg141 reply#
Tried it once, wasn't very happy with the results. Honestly I was expecting a big jump from Sonnet 4 in terms of design quality.
D_R_Farrell#
Was it too boring or what was disappointing about the result?

Sonnet 4 has been producing much more reliable outputs, but it's always a challenge to push it to get really creative. I think there are probably great ways we could be prompting for more creative output, but something we'll need to keep experimenting with for sure.

homebodify2 replies#
As a designer passionate about UX/UI or product design and vibe coding, I truly believe Onlook has the potential to be the tool that finally brings designers' dreams to life. I'm excited to see how Onlook can expand what's possible for designers and give us greater creative freedom. You have my full support!
hoakiet981 reply#
Thanks for the super early feedback and support, homebodify :)
homebodify#
Anytime!
fakedang1 reply#
Do you think Onlook could supersede Figma in terms of usability? This seems to me, a complete design outsider, like a Figma meets VS Code.
homebodify#
To be honest, I've been using Figma for a long time, but Figma hasn't reduced my workload a lot. So if we approach this from a workflow perspective rather than just as a tool, I would place more value on Onlook. It's hard to simply say right or wrong, but changes are definitely happening right now.
puppycodes1 reply#
Looks interesting but for a design focused service to not be "Ready for mobile" yet isnt a great look.
hoakiet981 reply#
fair point. we didn't really intend for the app to be used on mobile yet since it's like using Figma on mobile.
puppycodes1 reply#
Sure thing, but it would be great to be able to see examples of the app on a mobile device when visiting the site. Otherwise I have zero incentive to open it on my other device. My 2 cents is don't bank on being mysterious. Show us the goods without making us sign up, change devices, or work for it.

I personally loathe this trend of making us login after giving us a prompt box.
Just show us the app, your github does this well! Otherwise your lost in the sea of AI marketing pitches that overwhelm us daily.

hoakiet98#
It's honestly not so much being mysterious as much as the UI is not usable on mobile. I don't think we'll support mobile for a while given the extra design constraints that it imposes.

> I personally loathe this trend of making us login after giving us a prompt box.
I do too, and am very aware of how HN/other engineers feel on this topic. It's mostly a way to get around abuse and access issues. We have a pattern moving forward for guest accounts, but couldn't prioritize it in time for this launch.
I think not needing to sign in is a good way to kick the tire which helps growth as well. So point taken to prioritize this higher. Thank you :)

Load more comments