Documentation index for AI agents (llms.txt)
Skip to main content

Data & CMS

The Data panel holds your site's content and data. Open it with the Data icon in the left sidebar. It has two tabs:

  • Content: collections stored in your site's code. Every site has them, with no setup. Use them for content you edit yourself, like menus, team members, FAQs or blog posts.
  • Data source: tables in a database or spreadsheet you connect. Use one when your site needs to save what visitors send, like sign-ups, orders, bookings or user accounts. Once connected, the tab shows the source's name.
The Data panel showing the Journal collection in the grid
Tip

If your content is written straight into a page, ask the AI to move it into a collection: "move my menu into a collection so I can edit it myself".

Content collections​

Each collection is a file in your site's src/data folder. Changes show in your preview right away and reach your live site when you publish.

Create a collection​

Click + at the top of the panel, type a name and click Create. The window shows the file it will create, like /src/data/blog.ts.

The New collection window

A new collection starts empty. Click Add field to decide what it stores (see Fields and columns).

Rename, duplicate or delete​

Hover a collection and click ⋯, or right-click it, then choose Rename, Duplicate or Delete. You can also double-click a name to rename it. Renaming updates every file in your site that uses the collection. Deleting can't be undone.

The collection menu with Rename, Duplicate and Delete

When you have more than five collections, a Filter collections box appears above the list.

Connect a data source​

A site has one data source at a time. Click the Data source tab and pick one.

The Connect a data source window listing WebTwizz Cloud, Supabase, Postgres, MySQL, MongoDB and Google Sheets
SourceGood for
WebTwizz Cloud (Recommended)A database with sign-ins and file storage, added for you. No account needed
SupabaseDatabase, sign-ins and file storage, in your own Supabase account
PostgresRailway, RDS, or any Postgres you already run
MySQLRailway, RDS, or any MySQL database you already run
MongoDBAn Atlas cluster or any MongoDB deployment
Google SheetsMenus, price lists, schedules, any table you already keep in a sheet

Each source saves its connection details as secrets in Settings > Secrets, listed under From connected services.

Supabase and Google Sheets are also connectors. Once connected, your account is saved for your other projects, and Settings > Connectors shows the project's tables, sign-in settings or spreadsheet tabs. See Supabase and Google Sheets.

WebTwizz Cloud​

Choose WebTwizz Cloud and click Add database. To share data with another of your sites, pick the database that site uses from the list instead. See WebTwizz Cloud for limits, sharing and switching.

Most of the time you don't need to do this: the AI adds WebTwizz Cloud as soon as your site needs it.

Supabase​

  1. Choose Supabase and click Connect with Supabase.
  2. Sign in to Supabase and approve access. You come back to the same window.
  3. Pick a project from the list, or choose + Create new project.
  4. Click Connect.
  • If your Supabase account is already linked, you go straight to the project list.
  • + Create new project makes a new project in your first Supabase organization and connects it. It needs the Connect with Supabase sign-in and takes about two minutes, so keep the window open.
  • A paused project can't be connected. Restore it in your Supabase dashboard first.
  • Rather use a token? Click Paste an access token instead, generate one at supabase.com/dashboard/account/tokens, paste it and click Next.
  • Disconnect Supabase account, under the project list, unlinks your Supabase account from WebTwizz, so you can sign in with a different one.

Supabase adds NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, SUPABASE_SERVICE_ROLE_KEY and SUPABASE_ACCESS_TOKEN.

Postgres and MySQL​

  1. Choose Postgres or MySQL.
  2. Paste your Connection string. It starts with postgres:// or postgresql:// for Postgres, and mysql:// for MySQL.
  3. WebTwizz tries the connection as you type and shows Connected when it works, or the reason it didn't.
  4. Click Connect.

No connection string? Click No connection string? Enter host, user, and password separately and fill in Host, Database, Port, User and Password.

  • Postgres: use a pooled connection string if your provider offers one.
  • MySQL: use a user that can create and alter tables. WebTwizz needs MySQL 8.0.13 or newer.

The connection is saved as DATABASE_URL.

MongoDB​

Choose MongoDB and paste your Connection string (mongodb:// or mongodb+srv://). WebTwizz tries it as you type, like Postgres. When it shows Connected, click Connect. In Atlas, you'll find the string under Database > Connect > Drivers.

The string must include your database name, like mongodb+srv://user:pass@cluster.mongodb.net/mydb. It's saved as MONGODB_URI.

Google Sheets​

  1. Choose Google Sheets and click Continue with Google.
  2. Sign in and allow access.
  3. Pick one spreadsheet.

Only the spreadsheet you pick is shared with WebTwizz, and it stays private. Each tab shows as a table, and the tab's first row holds the column names.

From the chat​

When you ask the AI for something that saves data, it adds WebTwizz Cloud and keeps building. It shows a Connect a data source card instead when your site already uses another source, or when you've used all the databases on your plan. Clicking the card opens the same window right in the chat, starting on WebTwizz Cloud. Click All sources to pick a different one. Click Build with sample data first (or Not now) to connect later.

Change or disconnect​

Click ⋯ on the data source tab, or right-click the tab. The menu shows what's connected, plus Change data source, Open Supabase dashboard (Supabase only) and Disconnect.

  • Connecting a different source replaces the current one. Your data stays where it is, but your site stops using it. If the site has users, the window says how many will need to sign up again.
  • After a switch, the Data panel offers Update my site to use it, which asks the AI to move your pages over to the new source.
  • Disconnect asks you to confirm. Your site stops reading and writing through that source. Nothing is deleted on the provider's side.
  • There's no reconnect button. If a source stops working, for example after you change its password, disconnect it and connect it again.

Tables, collections and tabs​

Once a source is connected, the list on the left shows its tables. MongoDB calls them collections and Google Sheets calls them tabs, and the panel uses the same words.

  • Click + to create one. The window shows the final name before you create it.
  • Hover one and click ⋯, or right-click it, for Rename, Duplicate and Delete. Deleting removes the table and all its data from the source, and can't be undone. With Supabase, the menu also has Edit access in Supabase, which opens the table's rules there.
  • Supabase, Postgres and MySQL names become lowercase with underscores, so "Blog posts" becomes blog_posts. MongoDB and Google Sheets keep the name as you type it.

Who can reach a Supabase table​

Your site's visitors read and save Supabase data straight from their browser, so when you create a Supabase table you also pick who it's for, under Access:

  • Everyone: visitors see every row, and only you can change them. For products, posts or a menu.
  • Each user's own: signed-in users see and change only their own rows. The table gets a user_id column that fills in with whoever is signed in. For orders, notes or profiles.
  • Form submissions: visitors can add rows, and only you see them. For contact forms or a waitlist.
  • Only you: visitors can't see or change it. Your site's server code and the Data panel still can.

Everyone is picked to start with. The table is created with the rules for your pick, so it works on your site straight away.

If a table ends up open to more people than it should be, the list marks it Exposed, and the table shows what's open above its rows. See Database tables.

With Supabase or WebTwizz Cloud, the list also shows Users: everyone who signed up through your site's login. With Supabase they're read-only here; with WebTwizz Cloud you can also make someone an admin, send a password reset, block someone, delete them or export the list.

With WebTwizz Cloud, the list also shows Files: the buckets and folders holding what people upload on your site. You can upload, preview, move, rename and delete files there, copy their links, and make buckets and folders. See Files.

Query your data​

With WebTwizz Cloud, Supabase, Postgres, MySQL or MongoDB, click Query above the grid. A panel slides up from the bottom, already filled in with a query for the table you're on.

  • Ask about your data: type a question, like "parents who picked Splash this month", and click Ask. The AI writes the query, runs it and shows the answer, with the query above it.
  • Write a query: type SQL and click Run, or press Cmd+Enter. With MongoDB, write it as JSON, like {"collection": "orders", "filter": {"status": "paid"}}, or use "pipeline" for an aggregation.
  • Up to 500 results within 10 seconds. Page through them at the bottom, or click Export to download them as CSV or JSON. Queries you write that read or add data run right away. Anything that deletes or changes rows, drops a table or renames a column asks you to confirm first. When you use Ask, the AI's query also asks before adding rows. On WebTwizz Cloud, Restore data can put your data back if a change goes wrong. With other sources, it can't be undone.
  • Make room: drag the bar at the top of the panel to make it taller or shorter, or double-click it to fill the screen. Drag the line under the query to give it more lines. Press Esc, or drag the panel all the way down, to close it.

Work in the grid​

Both tabs use the same grid:

  • Type in the search box to filter rows.
  • Click a column header to sort ascending, again for descending, and a third time to clear the sort.
  • Use the controls at the bottom to change pages or rows per page.
  • Click a row to edit it. Click ⋯ at the end of a row, or right-click it, for Edit, Duplicate and Delete.
  • Click New item, or + below the last row, to add one.

Data source grids also have a refresh button. The grid refreshes on its own when the AI changes your data.

Fields and columns​

Content fields​

Click Add field, fill in Field name, pick a Type, optionally tick Required and set a Default value, then click Create field.

The Add field window

Field types: Text, Textarea, Number, Date, Date & Time, Boolean, Color, Link, Email, Phone, Image, Audio and Video.

Right-click a column header to Edit, Duplicate or Delete the field. Deleting a field removes its value from every item.

Data source columns​

Click Add column, fill in Column name, pick a Type, set a Default value if you want one, then click Create column.

  • Supabase, Postgres and MySQL: types are Text, Small Integer, Integer, Big Integer, Numeric (Decimal), Float, Date, Time, Timestamp, Boolean, UUID and JSON. Tick Required (NOT NULL) to make a value mandatory. Names use lowercase letters, numbers and underscores, and start with a letter. Date and Timestamp columns can default to Use current date or Use current time.
  • Google Sheets: a column is a header cell in the tab's first row. Types are Text, Number, Date, Date & time and Checkbox, and names can have spaces and capitals.
  • MongoDB: there's no Add column. Documents can hold different fields, and a field you add to a document shows up as a column.

Right-click a column header to Edit (rename), Duplicate or Delete it. The id column can't be changed.

Edit a row​

Click a row, or New item, and the Edit item or New item panel slides in with a field for each column. Required fields are marked with *.

The New item panel for a Content collection
  • Click Save or press Enter to save. Press Escape or click Cancel to close without saving.
  • In a data source's text fields, Shift+Enter adds a new line.
  • In Content collections, image fields open the image picker you use everywhere else in the builder.
  • To delete the row, click Delete at the bottom of the panel and confirm.
  • If your database rejects a change, the panel explains why in plain words.
  • MongoDB: use the two icons at the top of the panel, Fields and Raw JSON, to switch to editing the whole document as JSON. In an empty collection, click Write it as JSON to add your first document.

Rows you save in a data source are written straight to your database.

Select and act on many rows​

Tick the checkboxes next to rows to select them. The checkbox in the header selects every row on the page. When a whole page is selected and more rows match, click Select all (it shows the number of matching rows) to select them across all pages, or Clear to undo it.

The selection bar has Duplicate and Delete buttons.

  • Actions only touch rows that match your search. Search for "latte", select all and delete, and only the rows matching "latte" go. The confirmation says so.
  • Changing the search clears your selection.
  • Delete always asks you to confirm. In a data source, duplicating every row asks first too.
  • Some database tables can't be duplicated, like a table whose id must match a row in another table, such as a user account. Duplicate is turned off there, and hovering it tells you why.

Export​

Click Export above the grid and choose Export as CSV or Export as JSON to download everything in the collection or table, up to 50,000 rows. It works with every data source.

The Export menu with CSV and JSON options

Let the AI work with your data​

Once a data source is connected, the AI builds your site against it and can change it for you. Ask in plain words: "add a bookings table with name, email and date", or "add these 20 products to my products table".

Each change shows as a card in the chat, like Created table or Added data, and the grid updates. On Supabase, the AI creates each table with rules for who can reach it, then checks the result and fixes anything it left open before it finishes. Before anything that permanently removes data, like deleting rows or dropping a table, the AI stops and asks. Click Accept to go ahead or Reject to cancel.

How sources differ​

SupabasePostgres and MySQLMongoDBGoogle Sheets
Listed asTablesTablesCollectionsTabs
Nameslowercase_with_underscoreslowercase_with_underscoresAs typedAs typed
Add columnsYesYesNo, fields come from documentsYes, as header cells
Also hasUsers, Open Supabase dashboardRaw JSON editing
Saved asFour SUPABASE secretsDATABASE_URLMONGODB_URIGOOGLE_SHEETS_REFRESH_TOKEN