Architecture & engineering
ChaiBuilder installs into your Next.js application and stores pages as JSON in your own PostgreSQL or SQLite database. Your customers and their AI agents edit the same pages, changes go live on publish without a build or deploy queue, and one installation serves every customer site on your platform.
Your SaaS platform
Your database
Your auth session
ChaiBuilder
chaicore + chaipro, inside your Next.js app
What it serves
Visual editor
/api/mcp agent endpoint
Cached customer sites
Hosted builders force you to proxy requests to a vendor cloud and sync data over external APIs. ChaiBuilder runs inside your own deployment next to the rest of your code.
Installed as npm packages in your Next.js application. One server action endpoint validates and executes every builder operation against the current user's permissions.
ChaiBuilder maintains its own clean tables for customer sites (apps), pages, block JSON, revisions, and settings right inside your database, alongside your existing product tables.
Pass your application's current user session into ChaiBuilder's context resolver to tell the builder which customer site, user ID, and role permissions apply. Your customers never log in twice.
Customer uploads and edited images go straight to the S3-compatible bucket you control.
Whether your core SaaS is already a Next.js monorepo or runs on Rails, Laravel, Django, Go, or .NET, ChaiBuilder fits cleanly into your infrastructure.
Drop chaipro directly into your Next.js codebase. Share the same deployment, database connection, authentication session, and React component library.
Run ChaiBuilder as a dedicated Next.js service in your cloud (serving customer custom domains and the /editor route) while its server-side data providers read live records from your existing backend API or primary database.
Static site generators require a full build and deploy whenever content or data changes. ChaiBuilder decouples page updates from code deployments.
Write simple server functions (Global, Page-type, and Block providers) that query your database or internal API for a customer's listings, inventory, menu items, or locations and inject them into page bindings before render.
Each customer page renders on its first request and is cached at the edge or server. You never wait on a 10,000-site build step during CI/CD deploys.
When a customer or account manager clicks Publish, ChaiBuilder invalidates only that specific page's cache tag and rebuilds it in milliseconds.
When a record changes in your core SaaS (such as an updated price or new listing), fire its cache tag at /api/revalidate so only the customer pages displaying that record refresh automatically.
Whether an update comes from your onboarding team, a customer in the visual canvas, or an AI agent over MCP, nothing reaches a live site until it is approved and published.
01
A customer edits visually on the canvas, asks the in-builder AI chat assistant, or connects Claude or Cursor to the /api/mcp endpoint using their personal API key.
02
Changes save to the page's draft state. Real-time page locking ensures an AI agent and a human editor never overwrite each other's active work.
03
Reviewers inspect the unpublished draft on the real site layout via Next.js draft mode.
04
One click pushes the draft live and records a permanent revision entry (marking whether a human or an agent made the change) for instant rollback at any time.
Register any React component with a schema that defines which props customers can edit in the sidebar and which page types the block can appear on.
Expose validated, permission-checked backend operations (such as checking live stock or submitting a custom lead form) directly to the builder.
Register your own database tables, permission keys, and custom UI panels inside the editor using the exact same plugin API our own Pro extensions use.
Register domain-specific agent tools alongside your custom blocks so AI agents can query your live platform data while drafting pages.
You never have to trust a black box. Read and run the core engine on GitHub today; license chaipro when you run sites for your customers.
The core visual canvas, block system, SQLite page storage, and Next.js runtime page renderer. Free for single-site projects and developer evaluation.
Adds multi-tenancy, PostgreSQL support, white-label editor branding, RBAC roles and permissions, page revisions and restore, multilingual management, URL redirects, media manager, full AI assistant, the built-in MCP server, and priority engineering support.
Bring your stack, your database schema, and your multi-tenant routing questions to a 30-minute technical demo.

The website builder for agents and humans. Owned by you. The website module for platforms and agencies that run many sites, self-hosted on Next.js.
© ChaiBuilder. All rights reserved.