I built a Frontier-evel AI web editor in 9 days with Cursor — under $160 in inference

Hi there everyone my name is Charles.

I built an entire Frontier-level intelligent AI-powered Web editor /creator in Cursor in 9 days with about $160 worth of inference. Here’s the story and how the journey went, I hope you enjoy.

You can visit the live final deployed project at : getWEB4.com

-Silicon Charles AKA Charles Romelus.
Follow me on X: @r0melusr0melus

Nine days ago, WEB4 was basically an idea:

Pick a design. Talk to it. Publish it.

Today it has a 500+ design catalog, a real visual editor, conversational AI editing, Layers/Inspector, multi-page projects, persistence, publishing, export, payments, AI credits, voice input, section generation, undo, custom-domain work, and a production database.

The entire build has cost me less than $160 in model inference so far.

And almost all of it was built inside Cursor.

The funny part is that the hard part was not “getting AI to write code.”

The hard part was keeping an AI-assisted build moving at insane speed without letting the architecture turn into spaghetti.


What WEB4 actually is

WEB4 is an AI website builder/editor, but I deliberately did not want another:

prompt → regenerate entire website → spend another giant chunk of tokens

workflow.

The model I ended up building around is closer to:

intent → agent action → validated primitive → persistent editable website

You start with one of hundreds of finished designs.

Then instead of rebuilding it, you can say things like:

  • “Make this headline shorter.”
  • “Replace this image.”
  • “Add an animated gallery here.”
  • “Move this section down.”
  • “Turn this image into a video.”
  • “Create an About page.”
  • “Make this whole section feel more premium.”

The AI interprets the request, but the editor remains deterministic.

That distinction ended up mattering a lot.


The stack

The application is mostly boring web technology:

  • Next.js / App Router
  • TypeScript
  • Tailwind
  • shadcn-style UI
  • Prisma
  • Neon Postgres
  • NextAuth/OAuth
  • Cloudflare R2
  • Vercel
  • GSAP where motion actually adds something
  • server-side AI providers
  • OpenAI transcription for voice
  • plain HTML/CSS/JS as the actual generated site format

The runtime AI model for WEB4 itself is currently DeepSeek V4-Pro.

For development, I’ve been bouncing between Grok and Claude Sonnet inside Cursor, depending on the job.

I tend to use one agent for broad investigation/architecture and another for more surgical changes.

That worked much better than pretending one model had to be the king of everything.


The pace was completely unreasonable

There were days where I would ship a feature, immediately find the architectural flaw underneath it, repair that, discover three UX problems created by the repair, and then build another major system on top of it before going to sleep.

A normal sequence was basically:

idea → Cursor agent → implementation → localhost → break it → screenshot the bug → agent investigates → repair → test → next feature

Sometimes multiple times per hour.

I kept asking myself:

“Does this need a framework, or does it need 60 lines of boring code?”

Boring code won surprisingly often.


The battles were the interesting part

1. Generated HTML is hostile territory

Once AI can generate arbitrary layouts, you lose the comforting assumptions of a handcrafted React component tree.

A user can click something buried five containers deep.

An image might live inside a weird wrapper.

A section may have animation classes, transformed parents, generated IDs, unusual CSS, or DOM that wasn’t structured the way the editor expected.

At one point I had elements being classified incorrectly and effectively becoming impossible to manipulate.

The solution was a feature I called ROOT.

If WEB4 gets confused about what you selected, ROOT walks upward until it finds the nearest meaningful section/container and gives control back to the user.

That tiny feature solved an entire category of “AI made weird DOM” problems.


2. I eventually built a semantic Layers panel

Trying to make every possible generated element easy to click visually was a losing battle.

So I built a Layers/Inspector system.

Not a giant DevTools DOM tree.

A filtered semantic tree containing things a human actually cares about:

  • sections
  • backgrounds
  • major groups
  • headings
  • text
  • images
  • videos
  • buttons

Selecting something in Layers highlights and scrolls to it in the preview.

Selecting something in the preview syncs Layers back.

That turned out to be one of the most important editor features.

[Screenshot: Layers tree + highlighted page element]


3. Section insertion broke because geometry is evil

One particularly stupid bug took way longer than expected.

WEB4 could add sections correctly almost everywhere, except near the bottom of certain generated pages.

The visible page extended roughly 290px beyond the actual last DOM landmark.

So visually I was clicking “after the last section,” while geometrically the editor thought I was somewhere else.

The fix was not more AI.

It was a better deterministic definition of the trailing page seam.

That was a recurring lesson during this build:

When the editor is wrong, don’t ask the LLM to become smarter. Fix the primitive.


4. AI animations made entire pages appear broken

Some generated pages used reveal animations that initialized content at very low opacity and relied on JavaScript / IntersectionObserver to reveal it.

Inside an editor iframe, that is not always what you want.

Result:

the page existed, Layers could see everything, but visually entire sections looked dead or nearly invisible.

My first instinct could have been:

regenerate the page

Wrong answer.

The correct solution was a deterministic repair pass that detects this class of issue and normalizes it for the editor.

No inference required.

Again: repair beats regeneration.


5. I over-hardened things and had to undo it

At one point the validator/sandbox became too restrictive.

Generated pages contain real JavaScript.

Animations are allowed.

Interesting sites do unusual things.

If your validation rules reject anything remotely creative, you eventually build a prison instead of a product.

My rule changed to:

Minimum necessary guardrails. Graceful repair where possible. Ship first.

I still reject obviously dangerous/broken things.

But I stopped trying to preemptively prevent every theoretical failure.

That accelerated development massively.


6. One AI provider technically returned HTTP 200 while returning… nothing

DeepSeek Flash gave me one of my favorite bugs of the project.

The request would connect.

HTTP 200.

Streaming connection alive.

And then:

no usable data.

Keep-alive traffic forever.

It looked like my streaming implementation was broken.

After enough tracing, I moved the product to DeepSeek V4-Pro, and streaming became reliable.

Lesson:

“200 OK” does not mean your integration is OK.

Instrument the actual stream.


7. Persistence had to become boring before anything else could become cool

The core representation became roughly:

base HTML + current editable state → materialized HTML

Saving, reopening and publishing had to be trustworthy before I let the AI get fancy.

I also made page creation atomic after finding a nasty class of failures where generation could partially mutate project state.

Now:

  • failed generation does not leave orphan pages
  • failed operations don’t silently consume credits
  • manifests/state commit only after the important pieces succeed

That was much less glamorous than AI generation.

It was also much more important.


The AI does not own the editor

This is probably the biggest architectural lesson I learned.

Early on, it is very tempting to let the model manipulate arbitrary DOM or regenerate giant chunks of HTML for every request.

I moved away from that.

The agent now resolves intent into constrained actions.

Things like:

editText
replaceMedia
addSection
moveSection
deleteSection

The server validates the action.

The editor executes the known primitive.

The model says what should happen.

My application decides how it happens.

This dramatically reduced:

  • random breakage
  • token usage
  • hallucinated mutations
  • difficult undo logic
  • persistence problems

It also makes changing models much easier.


“Agentic” does not have to mean tokenmaxxing

One of the assumptions I disagree with right now is that agentic software must mean repeatedly sending enormous context windows around.

WEB4 tries very hard not to do that.

Once intent has been translated into a known editor operation, deterministic software takes over.

That is partly why the development inference bill is still under $160 despite the pace of development.

I use the model aggressively for reasoning.

I try not to use it for things normal software already knows how to do.


Cursor changed how I debug

The thing I increasingly do is give the agent evidence, not theories.

Instead of:

“Move section seems broken, fix it.”

I give it:

  • screenshot
  • reproduction steps
  • relevant page
  • expected result
  • actual result
  • console/log output
  • instruction to trace the real execution path first

The quality difference is enormous.

A good prompt increasingly looks less like a programming request and more like a bug report from a very annoying QA engineer.


Another lesson: make agents prove things

I stopped accepting:

“This should work.”

I ask for:

  • relevant tests
  • typecheck
  • exact files changed
  • root cause
  • production behavior
  • what was deliberately not changed

For dangerous flows, I specifically ask for tests such as:

first candidate fails → second succeeds → exactly one publish occurs

That discipline prevents a surprising amount of AI-generated nonsense.


I also stopped letting agents redesign everything

Probably the single most useful instruction I give Cursor now is some variation of:

Do not rewrite unrelated code. Make the smallest correct change.

Large models have an almost irresistible urge to improve the neighborhood while they’re fixing the house.

At this development speed, that becomes lethal.

Surgical changes compound.

Drive-by refactors compound too — just in the opposite direction.


Some of what shipped during these 9 days

WEB4 now has:

  • 500+ finished starting designs
  • full-page AI generation
  • real editable images
  • editable text/headings/buttons/links
  • AI-generated sections
  • section movement/deletion
  • image ↔ video conversion
  • Layers/Inspector
  • ROOT selection recovery
  • undo
  • multi-page projects
  • save/reopen
  • project persistence
  • export
  • publishing
  • custom-domain flow
  • voice transcription
  • free-tier usage limits
  • AI credit wallet
  • paid credit packs
  • real checkout/payment flow
  • production database
  • responsive editor UI
  • production landing/SEO pages

And yes, there are still rough edges.

That is kind of the point.


The visual side matters more than I expected

I come from a visual/3D background, so I probably obsess over this more than most developers.

But AI makes functional software easier to produce.

That means taste becomes more valuable, not less.

A lot of the work wasn’t:

“Can Cursor implement this?”

It could.

The real question was:

“What should this feel like?”

The editor glow.

The Layers interaction.

Selection behavior.

The voice state.

The loading states.

The difference between a generated section that technically works and one that makes someone stop scrolling.

Agents can execute a direction insanely fast.

They are much less useful when nobody has a direction.


Advice I’d give anyone building with Cursor this way

1. Separate reasoning from execution

Let the model reason deeply.

Then constrain what it is actually allowed to mutate.

2. Fix primitives instead of prompting around broken architecture

If ten prompts are needed to avoid one editor bug, fix the editor bug.

3. Build repair systems

Generated content will occasionally be strange.

Repairing recoverable output is often better than rejecting or regenerating it.

4. Use deterministic code wherever deterministic code wins

Not everything needs inference.

5. Give agents screenshots and reproduction steps

Visual evidence is ridiculously useful for frontend debugging.

6. Demand root cause before edits

Otherwise you get symptom whack-a-mole.

7. Keep agents surgical

“Do not modify unrelated code” is one of the highest-ROI sentences in my prompts.

8. Test the failure path

The happy path isn’t where AI-generated systems usually hurt you.

9. Change models when the evidence says to

Don’t become emotionally attached to a provider.

10. Ship before your architecture becomes a religion

Some of my best decisions came from deleting “clever” constraints I had added two days earlier.


What surprised me most

I have been programming for a long time.

What feels different now isn’t simply that AI types code faster.

It’s that the loop between:

idea → architecture → implementation → visual inspection → correction

has collapsed.

Things I would previously have scheduled as a multi-day feature can now happen between breakfast and lunch.

That changes product development itself.

The limiting factor starts moving away from:

“Can I implement this?”

toward:

“Can I decide what deserves to exist?”

And I think we’re still massively underestimating what that does to small teams — or one-person teams.


WEB4 is still early.

But nine days ago most of what you see in these screenshots did not exist.

Now I can literally open a finished website, click something and talk to it.

Which is where the tagline eventually came from:

I don’t build websites anymore. I talk to them.

Happy to share more of the architecture / prompts / Cursor workflow if anyone is interested.

Sincerely,

-Silicon Charles AKA Charles Romelus.
Visit getWEB4.com


1 Like

Thanks for sharing!

1 Like

You bet! I hope you find value out of the post :slight_smile:

Really interesting build. The part about making save/reopen/publish trustworthy and testing the failure path stood out to me.

With credits, checkout, publishing and persistence all connected, there are some pretty clear end-to-end behaviors that could be tested from the outside.

If you’re open to it, I’d be happy to try a few of those flows as a fresh user and send you what I find. I’ve been experimenting with a structured way to independently verify AI-built apps, and WEB4 feels like an interesting one to try it on.