Build with AI (vibe coding) on Arianet
In vibe coding you say what you want and an AI assistant (Claude Code, ChatGPT, Cursor, Copilot, …) writes the code. Arianet BaaS is built so that the assistant understands how the project works without you explaining it, and every change it makes is published with one push.
If GitHub is new to you, read Start with no tech background first.
The workflow
You: "I want a small shop with a cart"
↓
Assistant: writes the site, the tables (migrations), the functions and config.toml
↓
Assistant: commit and push to GitHub or GitLab
↓
Arianet: build, run the migrations, apply the settings, publish the site (automatic)
↓
Assistant (with the Arianet MCP server): reads the deploy status and log; on an error it fixes and pushes again
- A push to the main branch (
main) updates the main site; every other branch gets a preview at its own address (Previews). - If a step fails, the Project keeps what it had.
Step 1: start from the ready-made sample
Copy arianet-baas-starter with Use this template and connect it in the panel with Git و Deploy (steps). The sample has two files for assistants:
| File | Purpose |
|---|---|
AGENTS.md | The project's rules for any assistant: repository layout, migrations, functions, the allowed config.toml keys, the build, auth and RLS, storage, realtime, local testing and a checklist before every push. ChatGPT/Codex, Cursor, Copilot and most assistants read it automatically. |
CLAUDE.md | Tells Claude Code to read AGENTS.md. |
If you started your own project from scratch, copy the sample's AGENTS.md into your repository and change the parts that are about the sample (such as the table names).
Step 2: give the assistant the docs
All Arianet docs are published in a form that models read completely and accurately (Docs for AI). For BaaS these files are enough:
| File | Content |
|---|---|
/en/baas/llms.txt | The BaaS pages with the main rules, in English (the most accurate for models) |
/en/baas/llms-full.txt | The whole BaaS reference in one file, in English |
/baas/llms.txt and /baas/llms-full.txt | The same files in Persian |
/en/llms.txt and /en/llms-full.txt | The whole site (cloud, VPS, hosting, CLI, …) |
These files are generated from these very pages every time the docs site is built, so they are always current. Every page is also available as Markdown by adding .md to its address, e.g. /en/baas/git.md.
Step 3: connect the Arianet MCP server
With the Arianet MCP server (https://mcp.ariaservice.net/mcp) the assistant works on your account itself, with exactly the permissions you choose on the consent page:
deploy_statusandget_logs: reads the last deploy's status and build log and fixes errors itself.create_baas_projectandrun_baas_migrations: creates a Project and runs migrations (a dry run by default).rollback_site: puts the site back to an earlier version (with your explicit approval).
The Service Key and passwords are never given to the assistant. How to connect each client (Claude, Claude Code, ChatGPT, Cursor, VS Code): Connect AI assistants.
Step 4: introduce the project to the assistant
Your first message to the assistant should say where the project is and what you want. If the panel shows a ready project brief for your Project, copy it and paste it into the first message. Otherwise fill in this template:
You are building my app on Arianet BaaS. Before writing any code:
1. Read AGENTS.md in this repository (if it is missing, read
https://docs.ariaservice.net/en/baas/llms.txt and the pages it links).
2. Follow the repository layout and rules exactly: SQL changes only as new files in
arianet/migrations (never edit an applied one), Edge Functions in arianet/functions/<name>/,
settings only with the documented keys in arianet/config.toml, site built with
`npm run build` into dist/, RLS on every table.
My project:
- Project URL: https://<ref>.baas.arianet.app
- Site: https://<site>.site.arianet.app
- Production branch: main
- The anon key is injected at build time as ARIANET_BAAS_URL / ARIANET_BAAS_ANON_KEY;
never ask me for the service key and never put any secret in the repository.
What I want:
<describe the app in plain words: who uses it, what they can do, what must stay private>
Work in small steps. After each step run `npm run build`, commit with a clear message and push.
Then check the deploy (deploy_status / get_logs if the Arianet MCP server is connected) and fix it
if it failed. Tell me in plain words what changed and anything I must do in the panel
(for example a secret to add).
The Project URL is on the API Keys and connect page and the site address in Sites. The anon key is public, so giving it to the assistant is fine; never give it the Service Key.
A few ready requests
Add sign-in with email and password, and a "my orders" page where every user sees only
their own orders. Use a new migration with RLS policies for the orders table.
The last Arianet deploy failed. Read the deploy log (get_logs), find the cause, fix it in
a new commit and push. If the error is migration_failed, none of the pending migrations
was applied, so fix the failing file itself; never edit a migration that was applied before.
Let users upload a profile photo: add a private bucket "avatars" in config.toml (max 2 MB,
images only), storage policies so each user can only touch their own folder, and show the
photo through a signed URL.
Rules the assistant must follow
If the assistant breaks these, the deploy is refused or the data is at risk. The sample's AGENTS.md has all of them:
| Rule | If it is broken |
|---|---|
Database changes only as a new file in arianet/migrations with the next number; an applied file is never edited. | The deploy is refused with migration_changed. |
No BEGIN/COMMIT inside migrations; all new files run in one transaction. | migration_failed, and nothing is applied. |
Every new table: enable row level security and a policy per action. | Users' data can be read or changed with the public anon key. |
Only the documented keys in config.toml; no secret in the file. | The deploy is refused with invalid_config. |
| The Service Key, the database password and other services' keys never in code or the repository; secrets go in the panel. | Anyone can read and delete all the data. |
Static site output (npm run build → dist); server-side rendering (SSR) is not supported. | build_failed or an empty site. |
Commit package-lock.json with every dependency change. | npm ci fails in the build. |
| Server work (webhooks, secret keys, deleting users) in an Edge Function, never in browser code. | The secret key is published with the site. |
What you do yourself
- Create the Project and connect the repository (once).
- Enter secrets in the panel when the assistant names them (e.g. a payment gateway's key).
- Turn on paid features (such as SMS sign-in) or upgrade the plan; the assistant must not do these without your approval.
- Look at the preview before merging, and approve sensitive actions the assistant asks for in the panel.