Vibe Coding Turns a Single HTML File Into an App

Single HTML file app built through vibe coding with a coding agent

One developer asked a coding agent for a clone of the Markdown editor iA Writer that runs in a browser, then let it iterate for an hour. The outcome of that round of vibe coding is a single file, Writer.html, at 1.56 MB. Around 0.44 MB of it is typefaces embedded as base64.

Inside are an editor, a live preview, a style checker, a document library and a sandbox for extensions, all in two inline script tags. Most of the original’s features work.

The app is the file

A Mac app came afterward. Its first version took ten minutes: a Swift web view that displays Writer.html, nothing more. Native code was added later for the things a web page can’t do, namely syncing through an email account, storing secrets safely and keeping documents as ordinary files in any folder.

Single-file tools have a following. Simon Willison calls them HTML tools and has built over 150, mostly with models. Thoughtworks placed the approach in the Assess ring of its April 2026 Technology Radar, noting that sharing such utilities becomes the real challenge once they cost almost nothing to produce.

Those tools are tiny. Willison caps them at a few hundred lines with no build step so a model can rewrite them quickly. Writer.html ignores both limits. Esbuild assembles it from eight JavaScript modules plus CodeMirror, marked, compromise and DOMPurify. Even so, it launches with a double click.

Why agents do well here

The common theory credits the missing build step. Writer has a build, so that can’t be the whole story. What it lacks is a runtime environment to manage. No server, database or second process stands between a code change and a visible result. The agent builds the file, opens it, scripts the page and checks the outcome in a single loop. The session log shows it pasting text, quitting and confirming what landed on disk.

A bug in a layered system might hide in the server, the database or the connection between them. In one file it can only be in the file being edited. The roughly 250 KB of source also fits in an agent’s context, so it can read everything before touching anything.

The browser supplies the platform. Documents are kept in IndexedDB, or in a real folder via the File System Access API. Extensions run in a Web Worker without DOM or network access. Grammar highlighting uses a bundled NLP library, and PDF export goes through the print dialog. KaTeX is the lone external piece, fetched from a CDN the first time a formula shows up.

Distribution is simple as well. Email the HTML file and it runs. The Mac build, lacking a Developer ID signature and notarisation, is blocked by Gatekeeper everywhere except the author’s machine.

Features written on request

Since a model wrote the file, a model can modify it. An extension is a JSON package with a manifest and a script, running in the sandbox with access to only the text, the selection and the file path. In the Mac app, an Add a Feature command takes a plain description, has a model write the extension, runs tests in the sandbox and shows its permissions before installation.

The project’s own evaluation had five requested features pass five hidden acceptance tests for 21 cents overall. With a single run, five cases and a scoring setup built by the same project, that result is an example, not evidence.

Where a document can’t go

The Swift layer exists for four limits:

  • Mac-to-Mac sync uses an IMAP mailbox, and web pages can’t open mail connections.
  • The mailbox password and encryption key belong in the Keychain. Pages only get localStorage, which Willison uses for API keys while admitting that making users paste their own is a hassle.
  • Folder access works only in Chromium browsers, and MDN lists the API as limited availability. Safari and Firefox keep documents inside one profile on one machine.
  • Radar’s entry warns that running a stranger’s HTML file is risky. A 1.5 MB minified bundle doesn’t count as readable source.

The takeaway is to build the application as a document and reserve native code for what documents can’t do.

Who maintains it?

Upkeep is the catch. The real iA Writer ships with an update framework and a company. This clone has its builder. It is frozen at the point the agent stopped, while browsers move on and bundled libraries release fixes it won’t get.

That makes the builder the vendor to a customer base of one. Saying the building agent can stay and fix bugs skips a lot. A maintainer must know what can never change, can’t grade its own work, and has to run unattended.

The build took an hour; keeping it alive is the unsolved part, and the author says the next post will address it.

Source: IKANGAI

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.