Project structure
Your app follows a standard Next.js 15 App Router layout:/src/app— Contains your pages (aspage.tsxfiles) and API routes (asroute.tsfiles). Each folder represents a URL path./src/components— Reusable React components shared across pages./src/lib— Shared utility functions, constants, and type definitions./src/client-lib— Client-side libraries for authentication, integrations, and data queries. These are managed by Vybe and cannot be edited./src/server-lib— Server-side libraries for database access, external APIs, and integration clients. Also managed by Vybe./prisma/schema.prisma— Your database schema. The AI modifies this when creating or updating tables.
Pre-installed libraries
Every Vybe app comes with a curated set of libraries pre-installed and ready to use.Shadcn UI
A collection of 50+ accessible, customizable UI components built on Radix primitives and Tailwind CSS. The AI uses these components by default when building interfaces. Common components include:| Component | Use Case |
|---|---|
Button | Actions, form submissions |
Table | Data display with rows and columns |
Dialog | Modal dialogs and confirmations |
Form | Form layouts with validation |
Select | Dropdown selection |
Card | Content containers |
Tabs | Tabbed navigation |
Badge | Status indicators |
Input | Text input fields |
Toast | Notification messages |
Recharts
A composable charting library for building data visualizations. The AI uses Recharts with Shadcn’s chart wrapper components to create bar charts, line charts, pie charts, area charts, and more.Tailwind CSS
Utility-first CSS framework for styling. All Vybe apps use Tailwind for layout, spacing, colors, typography, and responsive design. The AI writes Tailwind classes directly in your JSX.Lucide
An icon library with hundreds of icons. The AI uses Lucide icons throughout your app for buttons, navigation, status indicators, and decorative elements.Sonner
A toast notification library. The AI uses Sonner to display success messages, error alerts, and other transient notifications to your app’s users.Server components vs. client components
Next.js 15 uses React Server Components by default. This affects how the AI writes your code:- Server Components (default) — Rendered on the server. Can directly access databases and server-side APIs. Cannot use browser APIs, event handlers, or React hooks like
useState. - Client Components — Rendered in the browser. Required for interactivity (forms, buttons, state management). Must include the
"use client"directive at the top of the file.
"use client" directive and others do not.
Dynamic routes
Next.js 15 uses Promise-based params for dynamic routes. If your app has routes like/customers/[id], the AI generates code that awaits the params:
Locked files
Certain system files in your project are locked and cannot be modified by the AI or manually. These files are managed by Vybe to ensure your app’s infrastructure remains stable. Locked files include:package.jsonandpackage-lock.json— Dependency managementnext.config.js— Next.js configurationtsconfig.json— TypeScript configurationprisma/schema.prisma— Database schema (managed via AI SQL tools).env— Environment variables (managed through app settings)- Client and server library files in
src/client-libandsrc/server-lib
The AI is aware of locked files and will not attempt to edit them directly. For example, instead of editing
package.json, the AI uses a dedicated tool to install packages. Instead of editing prisma/schema.prisma directly, the AI runs SQL migrations.Viewing code in the editor
The Code tab in the editor lets you browse your app’s source code:- File explorer — A tree view of your project’s files and folders in the left sidebar
- Syntax highlighting — Full highlighting for TypeScript, JSX, CSS, JSON, SQL, and more
- File search — Find specific files by name
- Diff view — After the AI makes changes, see exactly what was added, removed, or modified
Working with the AI on code
When asking the AI to modify code, you can reference specific files, components, or patterns:Change the table on the customers page to show 50 rows per page instead of 25.
Move the sidebar navigation into its own component so I can reuse it on other pages.
Add form validation to the create customer page — name and email should be required.The AI understands your project structure and can find the relevant files based on your description. You do not need to specify exact file paths unless you want to be precise.
What’s next
- Understand version history and rollback: Version History
- Learn about the live preview: Preview & Sandbox
- Manage your app’s data: App Data