ChaiBuilder Logo

Quickstart

There are two ways to get started with ChaiBuilder. Both end in the same place - a Next.js + Payload CMS site with chaipro pre-installed, running on your own database and hosting - and the 30-day free trial begins the moment you deploy, with no credit card and no email required.

One-click deployment Local setup
Where setup happens Entirely in the browser On your machine
Requirements A hosting account (Vercel to start) and a SQLite (libSQL/Turso) or Postgres database Node.js
Best for Getting a live site fastest, no local environment needed Local development, custom blocks, working offline

You can switch at any time - a one-click site can be cloned and run locally, and a local project deploys anywhere Next.js runs.

SQLite or Postgres - both fully supported. Whether set up through the /setup wizard or the CLI, a starter project runs on SQLite (a local file or a hosted libSQL / Turso database) or Postgres. Whichever path you take below, the only database prerequisite is one of these two.

Path A: One-click deployment

No local machine needed. You deploy the public starter first, then finish setup in the browser through the built-in setup wizard. The wizard is configured to work with Vercel and other hosted platforms - Vercel is the platform we're starting with.

Prerequisite: a SQLite (hosted libSQL / Turso) or Postgres database. Free options exist for both, and the wizard links you to them. For provider choices, connection strings, and pooling, see Database Setup.

1. Deploy the starter

Click the deploy button for your database:

Vercel copies the starter to your own GitHub account and puts it online. You do not need to fill in any settings yet - the starter boots without configuration.

2. Complete the setup wizard

When the deployment finishes, open your new site. Every route redirects to /setup, a short wizard that runs on your own deployment:

  1. Name your site.
  2. Connect your database - provide the connection details for the database you deployed for: a hosted libSQL / Turso URL and auth token, or your Postgres connection string. Free options exist for both; the wizard links you there and explains what to copy. It then verifies the connection and creates the database tables.
  3. Create your login - the admin email and password you will use to edit the site.
  4. Media storage (recommended) and AI features (optional) - can also be added later.

The wizard then prepares the database, creates your admin account and your site record, and shows a paste-ready block of environment variables - including your site's app key. Nothing you type is stored by ChaiBuilder; the wizard talks only to your own database.

3. Add the environment variables and redeploy

Paste the generated variables into your host's settings - on Vercel, Settings → Environment Variables - and redeploy from the Deployments tab. Every variable is explained in Environment & License.

Why the redeploy? The variables include your database credentials and other secrets. They belong in your hosting provider's settings, not in code, and a site only picks up new settings on the next deployment. This is the only redeploy - after it, you're done.

4. Sign in and build

Open /admin and sign in with the email and password you set in the wizard. Visiting /setup on a configured site shows a status checklist of what's configured and what's still missing (media storage, AI, site URL).

Any host that runs Next.js works the same way - on Netlify, import the variables under Site configuration → Environment variables, then redeploy.

Path B: Local setup

Two ways to set up locally, both ending in the same project. Option 1 (CLI) generates everything through terminal prompts. Option 2 (cloned starter + /setup) uses the same browser wizard as the one-click path, just running on your machine.

Prerequisites: Node.js. Both options work with SQLite (a local file or hosted libSQL / Turso) and Postgres - with a local SQLite file, no database server is required to start. Exact version requirements are listed in Requirements.

Option 1: Create your project with the CLI

Run the scaffolder on your machine. It walks you through a few prompts and generates a fully functional project - downloading the template, writing your environment, installing dependencies, running migrations, and seeding the database. No manual clone or wiring.

npx chaibuilder-app create

The wizard runs in three phases:

[1/3] Database setup - pick your project name, then choose your database:

  • Local file (SQLite) - file:./local.db, zero config. Created for you; fastest way to start.
  • Remote (libSQL / Turso) - provide a libsql://… URL and auth token. The scaffolder verifies the connection before continuing.

To run on Postgres, point DATABASE_URL at your Postgres connection string - see Database Setup for connection strings, pooling, and schema isolation.

A local file database can move to Turso (or another libSQL service) later - import the file and switch your env URL to the remote one. You're not locked into where you start.

[2/3] Create admin user - enter an admin email and password. This is the account you'll use to log into the builder - there's no separate signup step.

[3/3] - the scaffolder installs dependencies, migrates, and seeds the database.

Everything is written into the project's environment configuration, so the app is pointed at your own database from the start. All content lives in your database - ChaiBuilder never has access to it.

Option 2: Clone the starter and let /setup guide you

Prefer the browser wizard? Clone the starter repository, install, and run it:

git clone https://github.com/chaibuilder/chaibuilder-starter my-app
cd my-app
pnpm install
pnpm run dev

Open the app in your browser - an unconfigured starter takes you straight to /setup, the same wizard as the one-click path: name your site, connect your database (SQLite or Postgres), create your admin login. Add the environment variables it generates (including your app key) to your .env and restart.

Then: build locally, deploy when ready

If you used the CLI, move into the project and start it (the scaffolder prints the exact dev command; it detects your package manager, defaulting to pnpm):

cd my-app
pnpm run dev

Open the app in your browser and sign in with the admin email and password you set during setup. Confirm the visual builder loads.

Deploy to your server

Because a ChaiBuilder site is a standard Next.js app, it deploys anywhere Next.js + Payload runs - Vercel, Netlify, Cloudflare, a self-managed Node server, and more - to hosting you own.

pnpm run build
pnpm run start

Point your database environment variables at your production database. Start at Hosting Overview, then follow the page for your target: Vercel, Netlify, Cloudflare, or Node / Docker.

After either path

Whichever path you took, a few things apply to every site:

  • Your license key is optional during the trial and required after 30 days - see Trial & Licensing for where it goes.
  • Media needs object storage. Image and file uploads require a configured store such as S3 or R2 (wired through Payload's S3 plugin). The one-click wizard can collect this during setup; set it up before going live either way - see Storage Configuration.
  • Pages use SSG + ISR - built on first visit and cached, then revalidated automatically on publish. See Rendering Model.

Build your first page

  1. Open the visual builder in your running site.
  2. Create a new page and give it a route.
  3. Drag in blocks from the panel and arrange them on the canvas.
  4. Edit content inline; apply design tokens and your theme for consistent styling.
  5. Use Preview (Next.js draft mode) to check the page before it goes live.
  6. Click Publish - the page is invalidated and revalidated automatically, so visitors see the new version.

For the full editing workflow, see Building Pages.

What's next

© ChaiBuilder. All rights reserved.