If your stock list, menu, listings or prices already live in a database or a spreadsheet, you do not have to copy them into your site by hand. Connect the database once, choose the rows to show, and Buildan.app puts them on your pages as cards, tables, charts and numbers, with a page for every row if you want one.
In this tutorial a plant nursery called Fern and Field connects its stock database, shows the plants that are in stock as cards, adds a stat and a chart, and publishes.
What you need
- A Buildan.app site. A blank site is fine.
- A database or hosted table you can reach from the internet, and a user name and password for it. Buildan.app connects to PostgreSQL (also Supabase and Neon), MySQL and MariaDB (also PlanetScale), MongoDB, Supabase through its REST address, Firestore, Airtable and Google Sheets.
- A plan with room for a data source: Free includes 1, Pro 5 and Business 50. On Free, data is refreshed each time you publish. Pro and Business add scheduled and live updates (see Pricing).
Connect the database
Step 1: Open Data, then Databases
Open your site's dashboard and choose the Data tab. It has two parts: Databases for databases and hosted tables, and APIs for web services that answer with JSON. Stay on Databases and choose Connect a database.
You are asked What do you want to connect? Pick your kind of database. Each card says what you need for it, such as the connection string for Neon or a published sheet for Google Sheets.
Step 2: Fill in the connection
Give the connection a Name you will recognise. Then fill in Host and user: the Host, Port, Database, User and Password, or switch to Connection string and paste the one your database host gives you.
The password is stored encrypted. It is never shown again and never included in your published site. Keep Encryption on Verify certificate (recommended) unless your database uses a self signed certificate.
Step 3: Test the connection, then save
Choose Test connection. A tick, the database version and the number of tables mean it worked. If the user you entered can change data, you also see a reminder that a read only user is safer.
Choose Connect to save it.
Step 4: Browse the tables
Under Schema you see every table with its number of columns. Click one to see its columns, their types and keys, and its first rows under Preview rows. This is a quick way to check you connected to the right place.
Choose the rows with a dataset
A dataset is a saved query: the rows a page shows. You can make several from one database, for example plants in stock and plants on sale.
Step 5: Build the query in the Visual builder
With a table open, choose New dataset from this table and give the dataset a name, here Plants in stock. The Visual builder has everything for most needs:
- Table, and Columns to show (none ticked shows every column).
- Filters: pick a column, a condition such as is, contains, greater than or is one of, and a value.
- Order: sort by any column.
- Row limit: up to 1,000 rows.
For PostgreSQL and MySQL there is also SQL, if you prefer to write the query yourself. Choose Run preview to try it.
Step 6: Check the preview and the fields
The preview shows exactly the rows your pages will get. Here the plant that is out of stock is left out.
Under Fields, give each column a friendly Label and a Type, such as text, number, date, image or link. Then pick the Title field, the Slug field and the Image field. With a slug field, each row can have its own page at an address like /plants-in-stock/boston-fern. Choose Create dataset to save.
Step 7: Decide when the data updates
Under Updates and access, choose when your pages get fresh rows:
- When I publish: rows are built into the pages as you publish. Fastest for visitors, and the only choice on Free.
- On a schedule: checked regularly, and the site republishes itself when the rows changed.
- Live: pages load fresh rows through your site, with a short cache.
Only show rows of the signed in member limits rows to the member who is signed in to your site, for things like a customer's own orders. Choose Add row pages to create the page each row gets.
Put the data on your pages
Step 8: Drag the dataset onto a page
Choose Open editor, then Insert. Your datasets are listed under Data at the end of Sections. Drag As cards onto the page for a grid of cards, or As a table for a table. Each dataset is also listed under CMS lists, because to the editor it works like a CMS collection: you bind texts, images and links to its fields the same way.
Step 9: Add stats, charts and tables
Switch Insert to Elements. The Data group has components that read any dataset or collection: Stat, Data table, Chart, List or cards, Single record, Data map, Progress, Counter, Timeline and Filter bar. Click one to add it to the page.
Step 10: Set up the chart
Click the chart to see its settings. Choose the Data it reads and a Title. Under Chart, pick the Type (bar, line, area, pie or donut), what to Group by (here the date each plant was added, by month), and the Value, such as a count or the sum of a field. Legend, Axes and grid, Show values and Height finish it off. Colours come from your site's theme, and screen readers get a table of the same numbers.
Step 11: Set up a stat
A stat shows one number. Choose what to Calculate: a count of rows, or the sum, average, minimum or maximum Of field. Give it a Title, and open Number format for currency, decimals, a prefix or a suffix. Compare with the previous period adds the change against the last 7, 30, 90 or 365 days when your rows have a date.
Publish
Step 12: Publish and check the result
Choose Publish. The rows are built into your pages, so they load as fast as the rest of your site.
With Add row pages, every row has its own page, and it works on a phone too.
Tips and pitfalls
- Keep writes off unless you need them. To save form submissions into a table, turn on Allow writes from forms and automations for that source, then map a form to the table under Forms to tables. Use a user that can only write to that table.
- Filter in the dataset, not on the page. A filter in the query keeps rows you never show away from your pages altogether.
- Mind the limits. A query returns at most 1,000 rows. For long lists, switch on pages in the list's settings.
- Pick a stable slug column. Row pages use it in their address, so a column that never changes keeps links working.
- Republish on Free. Without scheduled or live updates, pages show the rows from your last publish.
- Use the APIs tab for web services. If your data comes from a service that answers with JSON rather than a database, connect it under Data, then APIs, and use it the same way.
Summary
Connect your database under Data, Databases with Connect a database, test it and save it. Build a dataset with the Visual builder or SQL to choose exactly which rows to show, name the fields, and decide when the data updates. In the editor, drag the dataset onto a page as cards or a table, and add stats, charts and other data components from Insert. Publish, and your pages show your real data.
Want visitors to add data too? Read Forms, email and workflows, where a workflow step can write a row to a connected database.


