Quick Start Guide
Get ZapDev running locally in under 5 minutes. This guide covers the essentials to create your first AI-generated application.For detailed setup including all environment variables and optional services, see the Installation Guide.
Prerequisites
Before starting, ensure you have:- Node.js 18+ installed
- Bun package manager (
curl -fsSL https://bun.sh/install | bash) - Docker installed and running (required for E2B template building)
- Git for cloning the repository
Installation
Set Up Environment Variables
Copy the example environment file and configure essential variables:Edit
.env and add these required variables:Get free API keys from:
- Convex - Real-time database
- Clerk - Authentication
- OpenRouter - AI model access
- E2B - Code sandboxes
Set Up Convex Database
Initialize and start the Convex development server:Follow the prompts to create a new project or link to an existing one. This will populate
NEXT_PUBLIC_CONVEX_URL automatically.Keep the Convex dev server running in a separate terminal throughout development.
Update Template Name in Code
After building your template, update the template name in the code:Open
src/inngest/functions/code-agent.ts and update line 22:Create Your First Project
Now that ZapDev is running, let’s create your first AI-generated application:Sign Up / Sign In
Navigate to
http://localhost:3000 and create an account using Clerk authentication.Create a New Project
Click “New Project” and provide:
- Project Name: e.g., “My Todo App”
- Framework: Select Next.js (or your preferred framework)
- Description: Describe what you want to build
Watch AI Generate Code
The AI agent will:
- Create an E2B sandbox
- Generate project files
- Set up the development environment
- Build and start the application
Preview Your Application
Once generation completes, you’ll see:
- Live Preview: Your running application
- File Explorer: Browse generated files
- Code Editor: View and understand the code
Understanding the Architecture
ZapDev uses a feature-based module structure:Key Components
Convex Database
Real-time reactive database with automatic subscriptions
tRPC API
Type-safe API layer with automatic TypeScript inference
E2B Sandboxes
Isolated environments for safe code execution
AI Agents
Orchestrate code generation with streaming updates
Usage Limits
ZapDev includes built-in usage tracking:Common Commands
Troubleshooting
E2B Template Build Fails
Ensure Docker is running:Convex Connection Issues
Verify your Convex URL is set correctly:AI Generation Errors
Check your OpenRouter API key and credits:- Visit OpenRouter Dashboard
- Ensure your key has sufficient credits
- Verify the key is correctly set in
.env
Next Steps
Full Installation Guide
Complete setup with all environment variables and optional services
Framework Guide
Learn about supported frameworks and their configurations
API Reference
Explore the tRPC API and database schema
Deployment
Deploy ZapDev to Vercel or your preferred platform