What if you could give your users a simple text prompt and have your app automatically generate, render, and host an entire website? That's exactly what you'll learn to build here — a Lovable-style site generator powered entirely by Xano's database, APIs, and AI agent tools.
The data model is intentionally lightweight. You only need four tables: project, component, log, and user. The project table stores the generated HTML, CSS, JavaScript, and the original prompt. The component table acts as a reference layer, breaking the full site code into modular pieces that can be tracked and updated individually. The user table handles authentication, keeping everything secure from the start.
Your API is organized into three groups: app rendering, authentication, and landing page management. The rendering endpoints — index and editor — use a template engine to return raw HTML with a text/html content type, so the browser renders it directly. Your landing page endpoints are modular by design, with separate endpoints for CSS, HTML, and JavaScript. This separation lets you enrich each piece dynamically, giving you more control as the app owner.
Four agents power the entire build process: the orchestration agent, code creation agent, deconstruct agent, and edit agent. When a user submits a prompt and clicks "Create Project," the create project endpoint fires, adds a record, and kicks off the orchestration agent as a background post-process.
The orchestration agent — powered by Gemini 2.5 — expands the user's prompt, generates the full HTML/CSS/JavaScript, and then calls the deconstruct agent to break that code into individual components saved back to the database. Each agent has carefully written system prompts that dictate the workflow sequence, so the AI knows exactly what to do and in what order.
For edits, the edit agent reuses the same tool set as the orchestration agent but with modified tool instructions applied via triggers. This means you don't rebuild tools — you just adjust the instructions to fit the editing context.
Once a project is ready to publish, a dedicated publish workflow grabs all the HTML and CSS for that project, combines them, creates a zip file, and uploads it to Xano's static hosting using the Xano MCP server. To set this up, navigate to your instance settings, enable the metadata API and MCP server, select the scopes you need (database, frontend, logic), grab your SSE URL, and generate a bearer token.
Store your Gemini API key, Xano MCP URL, workspace ID, and bearer token as environment variables inside Xano. These credentials allow your agents to make authenticated calls to the MCP server and complete the full publish pipeline.
This project is a working blueprint for any AI-driven content or app generation tool. With Xano handling the backend — agents, APIs, database, and hosting all in one place — you're not far from shipping something genuinely powerful. Install the snippet linked in the description to get started in your own workspace today.
Join 100,000+ people already building with Xano.
Start today and scale to millions.