AI-native website setup: from free template to live site
AI-native websites
By Stefan Maritz8 min read

TL;DR
- An AI-native website is a code-first site your agents can edit and publish to. It lives in a Git repo, deploys on every push, and takes new posts through an API, so nobody clicks through a page builder.
- Start from a template. Every theainativemarketer.com template is a single HTML file with a remix prompt, free to use, edit, and ship.
- Your coding agent does the build. Claude Code, Anthropic's coding agent, or Codex, OpenAI's, rebuilds the template in Next.js and Tailwind CSS inside a private GitHub repo.
- Sanity, a headless CMS, holds the blog. The Sanity CLI sets up an embedded Studio at /studio inside the same Next.js app.
- Vercel, a hosting platform, puts it live. Every push to main becomes a production deployment, and every other branch gets a preview.
A template is a show home. You walk in, like the layout, and then you still have to move in: your furniture, your post, your name on the door. This guide is the moving day, from a downloaded template to a live site with a blog your agents can publish to, sized for a founder or a two-person marketing team.
Every command below comes from the tool's own docs, linked on the step that uses it.
What is an AI-native website setup?
An AI-native website setup is a code-first site in a Git repo, built and changed by a coding agent, with a CMS that accepts posts through an API. Content arrives without a deploy, and code changes ship through a branch you review.
How an AI-native website fits together
Our own site runs a close cousin of this setup, with posts stored as files in Git. You can move an existing WordPress or Webflow site onto either version without losing rankings if you map every URL and set up redirects first.
What do you need before you start?
You need five accounts and a few tools on your computer. Set them all up first, so the build never stops halfway for a sign-up form.
| Account or tool | What it does here | Check before you start |
|---|---|---|
| Claude Code or Codex | Builds and edits the site | Claude Code needs a Pro, Max, Team, Enterprise, or Console account. Codex works with a ChatGPT Plus, Pro, Business, Edu, or Enterprise plan. |
| GitHub | Private repo for the code | Create the repo under your personal account if you will use Vercel's Hobby plan |
| Vercel | Hosting and deploys | Hobby teams cannot deploy private repos owned by a GitHub organisation |
| Sanity | Blog database and Studio | A free account is enough to start |
| Domain registrar | Your address | Access to the DNS settings |
| Node.js and Git | Run the project locally | The embedded Sanity Studio needs Node.js 22.12 or later |
How do you install Claude Code or Codex?
Run one install command in a terminal, open a new terminal window, and sign in on first launch. Pick one agent: every later step work with either.
Claude Code's native installer on macOS, Linux, or WSL:
curl -fsSL https://claude.ai/install.sh | bash
On Windows PowerShell, run irm https://claude.ai/install.ps1 | iex. Check it with claude --version, then run claude and follow the browser prompts to log in.
Codex's installer on macOS or Linux:
curl -fsSL https://chatgpt.com/codex/install.sh | sh
Run codex and choose Sign in with ChatGPT. The npm route is npm install -g @openai/codex.
Always start the agent inside your project folder, commit before each big change, and ask for a plan before any large edit. A plan costs one message, and a bad rewrite costs an afternoon.
How do you turn a template into a Next.js and Tailwind site?
Download the template, create an empty Next.js project with Tailwind, push it to a private repo, and have your agent rebuild the design in components. Keep the design exactly as it is in this step and rebrand afterwards, so every difference you spot has one cause.
- Get the template. On any template page, open the full preview, click Download HTML, and click Copy prompt to save the remix prompt next to the file. Note the interactions you want to keep.
- Create the project. Run
npx create-next-app@latest my-siteand choose the recommended defaults, which include TypeScript, ESLint, Tailwind CSS, the App Router, and an AGENTS.md file for coding agents. Put the template and prompt in areferencefolder. - Push it to a private repo. With the GitHub CLI, run
gh repo create my-site --private --source=. --remote=origin --push. Check that.gitignorecovers.envfiles before you push anything else. - Hand it to the agent. Start
claudeorcodexin the folder and paste the prompt below.
Read reference/<template>.html and reference/remix-prompt.md.
Rebuild this template as a Next.js site in this repo (App Router,
TypeScript, Tailwind CSS are installed).
- Keep every section and interaction from the original.
- Ignore the remix prompt's one-file rule: split the page into components.
- Move repeated colours, fonts, and radii into Tailwind theme tokens.
- Load fonts with next/font and photos with next/image.
- Keep prefers-reduced-motion support.
- Ask before adding any library.
Reply with a plan first and wait for my OK.
Run npm run dev, open the site next to the template preview, and give the agent one difference at a time. Finish with npm run build, which must pass before you commit.
How do you make the template yours?
Ask the agent to replace the copy, colours, and photos with your own, using your brand rules as its source. If your brand guide lives in a tool your agent can reach over MCP, point the agent at it. If it lives in a document, paste it into the AGENTS.md file the project already has, so every session starts from it.
Add one hard rule to the prompt: never invent testimonials, client logos, numbers, or awards. Templates come full of convincing quotes and logos, and every one that ships by accident costs you trust. Have the agent leave a marked TODO wherever you have nothing real yet.
Then add the machine-readable layer: app/sitemap.ts, app/robots.ts, organisation schema on the homepage, and an llms.txt file. Crawlers and answer engines read these files directly.
How do you add a Sanity blog?
Run npx sanity@latest init inside the Next.js project, accept the embedded Studio, and keep the /studio route. The CLI writes sanity.config.ts, sanity.cli.ts, and the route file, and adds http://localhost:3000 to your CORS origins.
Then ask the agent for a post document type with title, slug, SEO title, meta description, excerpt, body HTML, FAQ, author, featured image URL, status, and published date. Ask for /blog and /blog/[slug] pages that show only published posts, sanitise the HTML on the server, and add every post to the sitemap and an RSS feed.
Storing the body as HTML means a post renders exactly as the publisher sent it. The trade-off is a raw HTML field in the Studio, which you can convert to rich text later if your team edits posts there a lot.
How does an agent publish to the blog?
A content engine calls a signed endpoint on your site, such as /api/publish, and the endpoint writes the post into Sanity. The endpoint checks the signature, creates or replaces the post by slug, and revalidates /blog so the post shows without a redeploy.
Contengi, built by the team behind this site, publishes to custom sites this way. Its webhook signs each request with HMAC-SHA256, sends POST to publish or update, PATCH to unpublish, and DELETE to remove, and comes with a ready prompt for Claude Code. Contengi is in beta.
The Sanity side needs four things from you:
- A write token. In sanity.io/manage, add an API token that can write and save it as
SANITY_API_WRITE_TOKENin.env.local. Write tokens stay server-side, so it never gets aNEXT_PUBLIC_prefix. - One document per slug. Tell the agent to build the document ID from the slug and use createOrReplace, so a republish updates the same post.
- A local test. Ask for a script that signs a sample payload with a placeholder secret and sends a publish, an unpublish, and a delete to
localhost. Change one character of the secret and run it again: every request should fail. - A key log. Have the endpoint log the payload's top-level keys, never values, so the first real publish confirms the field mapping.
How do you put the site live on Vercel?
Import the GitHub repo in Vercel, add your environment variables, and deploy. Vercel lists your connected repositories under New Project and lets you set environment variables before the first deploy.
- Add the variables. Copy the Sanity project ID, dataset, and write token from
.env.localby their exact names, then deploy. - Add your domain. In the project's domain settings, add your address and create the DNS records Vercel shows at your registrar.
- Trust the domain in Sanity. Add your live domain as a CORS origin with credentials allowed, because a self-hosted Studio cannot log in without it. The CLI route is
npx sanity cors add https://yourdomain.com. - Connect the publisher. Add your endpoint URL in your content engine, save its signing secret in Vercel, redeploy, and send a test.
From here, articles go live through the webhook, and code changes go through a branch: the agent opens a pull request, Vercel builds a preview, and you merge when it looks right.
Launch checklist
- Build passes on Vercel with no missing environment variables.
- Every template quote, logo, and number is replaced with something real or removed.
- Photos are your own, and the template's image host is gone from the Next.js config.
- Studio logs in on the live domain.
- A test post publishes, updates at the same URL, and unpublishes to a 404.
- Sitemap, robots, schema, and llms.txt load on the live domain.
- Search Console has your sitemap.
Frequently asked questions
What is an AI-native website?
An AI-native website is a code-first site in a Git repo that coding agents build and change, with a CMS that takes posts through an API, so publishing and updates run without a page builder.
Do I need to know how to code to follow this guide?
You need to be comfortable running commands in a terminal and reading what the agent proposes. The agent writes the code, and you review plans, check the result in the browser, and approve commits.
Can I use Codex instead of Claude Code?
Yes. Both run in your project folder, read the repo, and run commands, and the prompts in this guide work in either.
Why use Sanity instead of Markdown files in Git?
Sanity gives editors a Studio and lets posts go live without a deploy. Markdown files in Git are simpler and work well when only agents publish, with each post landing as a commit.
Are the theainativemarketer.com templates free?
Yes. Each template is free to use, edit, and ship, with no credit needed.
More insights
Claude Code vs Codex for marketing teams in 2026: a docs-based comparison
Claude Code and Codex both edit a repository, run commands, and open pull requests. This comparison, built from each tool's docs, shows where they differ for a marketing team and how to keep your rules portable.
Reviews · 7 min
Claude Cowork vs Claude Code for marketers: which one to use in 2026
Claude Cowork and Claude Code share one agent engine and do different jobs. This docs-based comparison shows which one a marketing team should open for reports, decks, websites, and scheduled work.
Reviews · 7 min
Best AI website builder for marketing sites in 2026
Wix, Framer, Webflow, Lovable, v0, and Claude Code compared on what a marketing team keeps after launch: code, SEO output, and agent editing. Built from each tool's own docs.
AI-native websites · 7 min