What this guide covers
How to use v0 by Vercel to scaffold a complete full-stack application — React UI, Postgres database, and API routes — from a single natural language prompt.
Why Full-Stack with v0?
v0 isn’t just a UI generator anymore. With the composite model family and sandbox runtime, you can describe a full application — frontend, backend, database — in plain English and get working code across all layers. This guide walks through the end-to-end workflow.
Step 1: Write a Full-Stack Prompt
The quality of v0’s output depends on the specificity of your prompt. Instead of “build me an app,” describe the full stack:
“Create a team task manager with: a Postgres database schema for users, projects, and tasks; API routes for CRUD operations; a dashboard showing project progress with charts; and a dark-mode sidebar navigation. Use Next.js App Router, shadcn/ui, and Tailwind CSS.”
v0 will generate:
- Database schema — tables, relationships, indexes
- API routes — Next.js route handlers with validation
- UI components — dashboard, sidebar, forms, data tables
- Type definitions — TypeScript interfaces for all entities
Step 2: Review and Iterate in Sandbox
v0’s sandbox runtime lets you interact with the generated app before exporting. Click through the UI, test API calls, check the database behavior. Use follow-up prompts to refine:
- “Add role-based access: admin can manage users, member can only view tasks”
- “Add email notifications when a task is assigned”
- “Generate seed data with 50 sample projects and 200 tasks”
Each iteration costs tokens, but the composite model family maintains context across iterations — you’re building on previous work, not starting over.
Step 3: Export via GitHub Sync
When the app is working in the sandbox, use v0’s GitHub integration to push the entire codebase to a branch:
- Connect your GitHub repository in v0’s settings
- Click “Push to GitHub” — v0 creates a branch with the full project
- Open a pull request to review and merge
- Deploy to Vercel with one click
The exported code includes:
app/directory with routes, layouts, and pagescomponents/with all UI componentslib/with database client and utilitiesprisma/or equivalent schema files- Full TypeScript types
Step 4: Production Hardening
v0 gets you 80% of the way. Before going to production, review:
- Authentication — v0 generates auth patterns but you should verify sessions, tokens, and OAuth flows
- Security — audit API routes for authorization checks, input validation, rate limiting
- Performance — check database queries for N+1 issues, add caching where needed
- Edge cases — empty states, error boundaries, loading states, offline behavior
Real Example: Team Dashboard in 20 Minutes
A developer at a Series A startup described this prompt:
“Internal dashboard for our support team: connect to our existing Postgres database, show ticket volume by day (chart), ticket status breakdown (pie chart), SLA compliance rate (gauge), and a searchable ticket table. Use Next.js App Router, shadcn/ui, and our existing design tokens.”
v0 generated:
- 12 React components (dashboard layout, charts, data table, search)
- 4 API routes (ticket stats, list, search, update)
- Database query layer with Prisma
- TypeScript types from the existing schema
Time from prompt to merged PR: 20 minutes.
When Full-Stack v0 Works Best
| Scenario | Fit |
|---|---|
| Internal tools and admin panels | ✅ Excellent |
| MVP and prototype backends | ✅ Great starting point |
| Simple CRUD with auth | ✅ Handles well |
| Complex business logic | ⚠️ Needs human review |
| Multi-service architecture | ⚠️ v0 is single-app focused |
| High-security systems | ❌ Not recommended |