Generated sites live on another address
Generated HTML is untrusted. On a separate origin it can’t read the app’s cookies or call the app’s API as the user.
Case study AI website builder
Describe a website, and it plans the pages and writes them into a live preview. Change a whole page, or one section, by saying what you want.

Going from an idea to a working site usually means a blank editor and a long list of decisions.
Designed and built it on my own: the site planner, the page writer, the live preview and the admin.
You describe the site; the builder (server-rendered screens, plain JavaScript) sends it to the app.
The FastAPI app handles accounts and quotas and creates a job. A site plan comes first: pages, sections, colours, fonts.
A worker asks a model (local Ollama or a cloud model) for each page and streams it back.
A fixed output contract and an HTML validator check every page; an invalid page gets one repair call.
Each page is saved as a new version in SQLite or PostgreSQL, so any change can be undone.
Tailwind compiles a stylesheet per site, and a separate address serves the previews and the published sites.
Progress streams to the browser over Server-Sent Events, so you watch each page being written.
Generated HTML is untrusted. On a separate origin it can’t read the app’s cookies or call the app’s API as the user.
It isn’t editable, so a change to a prompt can’t break the parsing.
They work with smaller and local models, and are simple to host anywhere.


