The Code tab
The Code tab shows the app’s files in a tree on the left and an editor on the right. It opens onsrc/app/page.tsx, the app’s home page.
The editor understands TypeScript: it highlights code, and you can jump from a name to where it’s defined in another file.
You can edit any file that isn’t locked. You can’t create, rename or delete files in the Code tab. Ask the AI to do that.
Save or discard your edits
When you have unsaved edits, a dot appears on the Code tab (tooltip “Unsaved changes”). At the bottom of the editor:- Save changes saves your edits. You see “Code saved”, and the preview updates. Vybe merges your edits with any changes the AI made since you opened the file.
- Cancel discards all your unsaved edits.
Saving in the Code tab doesn’t create a checkpoint. If you later restore an earlier checkpoint, your saves made after that checkpoint are undone too. See Version history.
Link to a file and line
To send someone straight to a line of code, add?tab=code&path=<file>:<line> to the editor URL. For example:
Locked files
Some files hold configuration that Vybe manages. They’re marked with a gear icon in the file tree and are read-only, for you and for the AI:
Only those specific helper files are locked. The rest of
src/client-lib/ and src/server-lib/ can be edited.
You don’t need to edit locked files to get things done:
- To add a package, ask the AI. It installs it from Vybe’s approved list. See Tech stack.
- To change the database, ask the AI. It changes tables with SQL. See App data.
Project structure
New apps start with this layout:- Each folder under
src/appis a URL path.src/app/orders/page.tsxis the/orderspage, andsrc/app/api/orders/route.tsis the/api/ordersendpoint. - Files that run in the browser start with
"use client". - Pages and components read data through SWR hooks defined in
src/client-lib/api-client.ts, which call the app’s own API routes. - API routes read and write the database with SQL.
The README
The AI keeps aREADME.md at the root of the app with three sections:
- The app’s high-level strategy and goal.
- The changes made so far.
- Architecture and technical decisions, with the reasons behind them.
Tests and type checks
As it builds features, the AI writes Jest unit tests in.test.ts files next to the code, and runs a type check after making changes. When Auto Build is on, every change is also built and tested, and failures go back to the AI to fix. See The app editor.
You can ask for more coverage at any time:
Add unit tests for the discount calculation, including the edge cases for zero and negative amounts.
Download the code
Click Download All Files under the file tree to download the app’s code as a ZIP file named after the app.Clone the code with git
Each app’s code lives in a git repository. To clone it, click the git branch icon (tooltip “Clone code”) next to Download All Files. The Clone repository popover gives you:- An HTTPS URL, with how long it stays valid (“URL expires in 30 days”).
- The command to run:
git clone <url>.