Export AI website code: one HTML file, a Next.js app, and GitHub
Nothing you build in Anticode is locked in. You can export AI website code as a single self-contained HTML file, or as a standard Next.js app with a database, server routes, accounts and an admin area, then push it to a GitHub repository you pick. There’s no Anticode runtime in either.
Two export formats
- One HTML file
- The page with its CSS inline, ready for any static host such as Cloudflare Pages, Netlify or Vercel.
- A Next.js app
- A Next.js (App Router) project in TypeScript with Postgres through Prisma and Zod validation. It has server routes for bookings, contact, newsletter and email sign-in, an admin area with two-factor sign-in, customer and staff roles, an audit log and Postgres row-level security. Email goes through Resend. App builds export too.
Export and push to GitHub step by step
- Open the project’s console and choose Download codebase (also in the Code tree’s menu).
- Pick one HTML file or the Next.js app, and download it.
- To push instead, connect GitHub (a separate grant with the repo scope) and pick or create a repository.
- Anticode commits the Next.js app to that repository.
- Follow the README to set DATABASE_URL, RESEND_API_KEY, EMAIL_FROM and APP_URL, run the migrations and deploy to your host.
Hosting the Next.js app
The README covers Neon, Supabase, Docker and Vercel. Any Postgres works. Some hosted Postgres roles bypass row-level security, which switches off the export’s RLS, so check the role you connect with. See Vercel, Neon and Supabase.
The project file
Every project is also one JSON file, anticode.json, with a public JSON Schema at /schema/project.v1.json and instructions for coding agents at /AGENTS.md. The CLI pulls and pushes it.
What the export doesn’t include
Hosting, analytics, connectors and Anticode’s security report stay with Anticode-hosted sites. In the export, those are yours to set up; the code is plain and documented so you can.
Inside the Next.js export
| Part | What it does |
|---|---|
| App Router pages | Your site’s pages as React server components, styled with the same design system |
| Prisma schema and migrations | Tables for bookings, messages, newsletter sign-ups, customers, staff and the audit log |
| Server routes | Bookings (with the slot check), contact, newsletter and email sign-in, validated with Zod |
| Admin area | Bookings, messages and subscribers for owners and staff, behind two-factor sign-in |
| Roles | Owner, admin and staff, plus customers who sign in with a magic link |
| Row-level security | Postgres policies so each role only reaches its own rows |
| Booking confirmations, sign-in links, team invites and owner alerts through Resend | |
| README | Setup, environment variables and hosting on Neon, Supabase, Docker or Vercel |
Develop locally
Without RESEND_API_KEY, the app prints each email to the terminal instead of sending it, so sign-in links and invites work on your laptop. In production it refuses to pretend: without a key, sending fails and is logged. Set APP_URL to the site’s public https address before relying on sign-in links.
Keep building after export
The export is a snapshot. Changes you make in the exported code don’t flow back into Anticode, and new Anticode changes need a new export or push. Many teams design and iterate in Anticode, then export once the content and layout are settled, and continue in their own repository with a coding agent.
Exporting a single page
The single HTML file is the simplest way to host a page elsewhere: upload it to any static host. Forms in it post to Anticode’s routes only while the site is published on Anticode, so on another host, use the Next.js export or your own form handler.
Questions people ask
Do I own the exported code?
Yes. The export is yours to host and change, with no Anticode runtime.
Does pushing to GitHub need full access to my account?
It uses a separate GitHub grant with the repo scope, asked for only when you push.
Can I export an app build?
Yes. App builds export as well as page builds.
Which Node.js version does the export need?
A current LTS version of Node.js, as the README states, with a Postgres database.
Can I deploy the export to Vercel?
Yes. The README covers Vercel, with Neon or Supabase for Postgres.