Skip to content

Using the AI Builder

The AI Builder is your AI assistant for creating and modifying your app. Instead of writing database commands, you describe what you want in plain language and the AI proposes the changes for your review.

All tables, views, and pages are scoped to the active app. You can switch apps at any time using the app switcher or create a new one — see Managing Apps for details.

Click AI Builder in the sidebar to open the chat panel. Each conversation is saved automatically, so you can pick up where you left off.

When you create a new app and send your first message, the AI starts a brief discovery conversation to understand what you want to build.

Here’s how it works:

  1. Discovery — the AI asks 1-3 quick questions about the key concepts, workflows, and what matters in v1. It tailors the depth to how specific your request is — a clear domain like “project tracker” needs fewer questions than “something to manage my business.”
  2. App description — once it understands the shape, the AI summarizes your app in business language, confirms the description with you, and saves it. This description improves all future AI interactions.
  3. First feature — the AI proposes the best table to start with. You review and confirm, then it builds everything for that slice: table, sample data, and any pages it needs. It works in capability slices — small, self-contained features you can see and use right away.
  4. Pick the next feature — after each slice is built, the AI suggests 2-3 logical next capabilities. Choose one, ask for something different, or say you’re done.

For example, if you say “I want to build a project tracker,” the AI might ask what matters most — tasks, milestones, team members? — then summarize the app shape, save the description, and start building the core tasks table with sample data and a dashboard.

If you already know exactly what you need, provide the details upfront:

“I need to track orders, customers, and products — orders have a status and total, each order belongs to a customer”

The AI will recognize there’s enough detail and keep discovery short — confirming the app shape quickly before moving on to building.

Tell the AI what kind of data you want to track. For example:

“I need to track customers with a name, email, and phone number”

The AI will propose a table with the columns it thinks you need. You’ll see an interactive card showing the proposed table — not just a text response.

When the AI proposes a new table, a schema widget appears showing:

  • The table name
  • Each column with its name and type
  • Which columns are required

You can:

  • Edit any column — rename it, pick a type from the grouped dropdown (Text, Number, Date/Time, Other), or toggle whether it’s required
  • Remove a column you don’t need
  • Add a column the AI missed
  • Approve to create the table
  • Reject to cancel and ask for something different

The table is only created when you click Approve. Nothing changes until you confirm.

Once you approve, the table is created instantly. You’ll see it appear in the sidebar — clicking it opens the universal list/detail/edit views generated from your schema, so you can start adding data right away. No custom pages are needed for the basics. If you later want a tailored layout (custom columns, embedded sub-lists, a different form), just ask the AI to “give me a custom layout for the X list” and it will install editable pages you can iterate on.

Need to change a table after it’s been created? Just ask:

“Add a ‘status’ column to the customers table”

“Rename the ‘phone’ column to ‘phone_number’ in customers”

“Remove the ‘fax’ column from customers”

The AI supports four kinds of changes:

ChangeWhat it does
Add columnAdds a new column to the table
Remove columnDrops a column and its data
Rename columnChanges a column’s name (keeps the data)
Change typeChanges a column’s type (e.g., text to email, integer to currency)

Like creating tables, every modification is proposed first and only applied after you approve.

When one table references another (e.g., orders reference customers), the form shows a dropdown to pick the related record. By default, the dropdown shows the most likely label column (like name or email). You can change which columns appear:

“Show email instead of name in the customers dropdown”

“Display both name and phone for the contacts FK”

The AI proposes a set of columns with checkboxes. You can toggle columns on or off before approving.

If you no longer need a table, ask the AI to remove it:

“Drop the old_products table”

The AI shows a confirmation card with a destructive warning — the table, all its data, and its metadata will be permanently deleted. Click Drop Table to confirm or Cancel to keep it.

If other tables have foreign keys referencing the table you’re trying to drop, the operation will fail. You’ll need to drop or alter the dependent tables first.

You can drop a .csv file into the chat input to import its rows into a table — useful when you’re starting from a spreadsheet or migrating data from another system.

How it works:

  1. Drag a .csv onto the chat input, click the paperclip icon, or click the Import a CSV chip on the new-conversation screen. A chip appears showing the filename and row count.
  2. Add a brief instruction (or just send) — e.g. “Import this into customers” or “Create a table from this”.
  3. The AI reads the headers and the first 10 rows of your CSV to infer column types and propose a mapping. The full CSV stays in your browser; only the sample is shown to the AI in the chat transcript.
  4. New table: the AI proposes a schema (Create Table card) — confirm it, then a follow-up Import CSV card maps each CSV header to a column. Existing table: the Import CSV card appears directly with the AI’s best-guess mapping.
  5. Review the mapping. Headers whose names match a target column (exactly, case-insensitively, or after normalizing — e.g. First Namefirst_name) are pre-filled automatically; you only need to adjust the outliers. Change any target column or skip a column with — skip —. Watch the preview for type-coercion warnings highlighted in red.
  6. Click Import N rows. Rows are inserted in chunks; a progress bar tracks completion.

Limits: 50,000 rows and 20 MB per file. For larger imports, split the file.

Privacy: the first 10 rows of your CSV are visible to the AI and stored as part of your chat history. Don’t import data with sensitive values you wouldn’t share.

Error handling: if a chunk fails (e.g. a duplicate-key constraint, an unparseable date), import stops and you can either:

  • Retry remaining rows — re-attempts from the first row of the failed chunk (useful for transient/network failures; for hard constraint failures the same row will fail again, so use Stop & report failure instead), or
  • Stop & report failure — record the partial import and let the AI explain the error so you can fix the source CSV.

Type coercion: dates need YYYY-MM-DD; timestamps without an offset are interpreted as UTC; booleans accept true/false, yes/no, t/f, y/n, 1/0. Empty cells become NULL — for required (NOT NULL) columns, the widget warns you upfront if any rows are missing values.

If you reload the page mid-import, the file is lost from browser memory. The widget shows a message asking you to reject and re-attach. Note: any rows already inserted before the reload remain in the table — re-attaching starts a fresh import which may create duplicates.

CSV import is admin-only, like the other builder operations.

The AI can look up data in your tables to answer questions. For example:

“How many customers do I have?”

“What are the most recent orders?”

“Is there a customer named John?”

The AI runs a query behind the scenes and answers in plain language — you don’t need to know SQL. If you want to see the data in a table, the AI can create a view or report page instead.

The AI can make bulk changes to your data:

“Set all orders with status ‘draft’ to ‘published’”

“Delete all cancelled orders”

These tools show the conditions (WHERE) and changes (SET) in a review card before executing. After execution, you’ll see the number of affected rows and a preview of the changed data.

For normal single-row editing, use the CRUD UI instead — these tools are for AI-driven bulk operations.

Views are read-only SQL queries saved as virtual tables (see Building Blocks for the concept). They’re useful for dashboards, filtered lists, and any data that combines multiple tables into a flat display. For example:

“Create a view that shows each order with the customer name and total”

“Make a monthly revenue summary view”

The AI proposes a view widget showing the view name (editable) and the SQL query (read-only). You can rename the view before approving, but the SQL itself is authored by the AI.

Once approved, the view appears in the Views section of the sidebar and works like any other table in the CRUD UI — but it’s read-only.

Ask the AI to remove a view you no longer need:

“Drop the monthly_revenue view”

The AI shows a confirmation card with a destructive warning. Only views created through the AI Builder can be dropped.

Reports are custom pages that display data with grouped or nested layouts — for example, orders grouped by customer with line item details under each order. Unlike views (which show flat tables), reports use visual grouping to make related data easier to read.

“Create a report showing orders with their line items”

“Show me a breakdown of sales by region”

The AI works in two phases when creating a report:

  1. Data first — the AI proposes a query or view so you can validate the data is correct (right columns, right joins, right filters).
  2. Presentation second — once the data looks right, the AI creates a page with the appropriate grouped/nested layout.

This gives you natural control: you can say “I like the data but show it differently” or “use my existing view but render it as a report.”

See Building Blocks — Pages for an overview of all page types. In short:

  • View — when a flat table (one row per item) is enough. Example: “list of orders with customer names.”
  • Report — when you need grouped headers, nested details, or multi-section layout. Example: “orders report with line items under each order.”

Beyond tables, the AI can create custom pages with their own layouts and logic. For example:

“Create a dashboard page that shows order totals”

“Make an admin settings page”

The AI writes the page code (TSX) and presents it in a page widget with two tabs:

  • Preview — a live render of the page so you can see what it looks like
  • Source — the raw TSX code the AI wrote

Each page proposal shows editable header fields:

FieldDescription
SlugThe URL slug (e.g., dashboard) — set by the AI, read-only for updates. Pages are served at /page/<slug>.
TitleDisplay name shown in the sidebar
RoleMinimum role to access: owner, admin, staff, member, or anon
Show in navWhether the page appears in the sidebar
LayoutControls the sidebar behavior: Default (normal sidebar), Full width (sidebar collapses to a narrow icon strip — good for dashboards and reports), or No sidebar (sidebar hidden entirely — for polished app experiences where the page provides its own navigation)

You can edit the title, role, nav visibility, and layout before approving. The page is only saved when you click Create Page or Save Changes.

Ask the AI to modify a page that already exists:

“Update the dashboard to add a chart”

“Change the settings page to include a dark mode toggle”

The AI shows the updated source with a preview. Fields you don’t change are preserved.

Ask the AI to remove a page you no longer need:

“Delete the dashboard page”

The AI shows a confirmation card with the page slug and a warning. Click Delete Page to confirm or Cancel to keep the page. You can also manage pages in bulk at /view/pages in the CRUD UI.

Sometimes the AI will show a read-only preview of a page before proposing to save it. Previews don’t require approval — they’re just for visual feedback.

Ask the AI to create a form for entering data into any table. For example:

“Build a form for adding new customers”

The AI will generate a page with input fields matching the table’s columns, including smart widgets for foreign keys and file uploads. See Working with Data for details on how forms behave at runtime.

Every chat session is saved as a conversation. Use the left panel in the AI Builder view to manage them:

  • Past conversations — click any conversation in the list to resume it. The full message history is preserved.
  • New chat — click the New Chat button to start a fresh conversation.
  • Deleting — click the delete icon next to a conversation. A confirmation dialog appears before anything is removed. Deleting a conversation removes all its messages permanently.
  • Be specific — “I need a products table with name, price, and category” works better than “make me some tables.”
  • Slice by slice — the AI builds each capability automatically after you confirm. You’ll see tables and sample data appear as it works; the universal /table/<name> views become available immediately, no per-table page needed. The home screen starts as section cards listing your tables, and the AI offers a final “set up a home page” step that installs a clean landing page listing your tables, views, and any custom pages (the page stays in sync with the app description and the schema automatically).
  • Choice fields are validated — when the AI creates dropdown columns (like status or priority), sample data is checked to ensure it only uses valid options. If something doesn’t match, the AI corrects it automatically.
  • Edit before approving — you can adjust column names, types, and whether they’re required before creating the table.
  • System columns are automatic — you don’t need to ask for an ID, creation date, or update tracking. These are added to every table.