Overview
ZapDev uses advanced AI agents to transform natural language descriptions into fully functional web applications. Simply describe what you want to build, and our AI generates production-quality code with proper architecture, type safety, and best practices.The AI code generation system supports multiple frameworks: Next.js, Angular, React, Vue, and Svelte. The AI automatically selects the best framework based on your requirements, or you can specify your preference.
How It Works
ZapDev’s code generation follows a sophisticated workflow:- Framework Selection - AI analyzes your request using the framework selector agent
- Sandbox Creation - Isolated E2B sandbox environment is provisioned
- Code Generation - AI writes code using framework-specific prompts and tools
- Validation - Automatic linting and build checks ensure code quality
- Auto-Fix - If errors are detected, AI retries with error context
- Real-time Streaming - Code appears in your editor as it’s generated
Framework Intelligence
The AI uses intelligent heuristics to select the optimal framework:- Next.js (Default)
- Angular
- React
- Vue
- Svelte
When to use: Full-stack React apps, SEO-focused sites, e-commerce, marketing websitesPre-installed:
- Shadcn UI (comprehensive component library)
- Tailwind CSS v4
- TypeScript with strict mode
- “Build a Netflix clone”
- “Create an e-commerce site”
- “Make a landing page for my SaaS”
AI Agent Architecture
ZapDev uses a multi-agent system for code generation:Code Agent
- Model selection (OpenRouter via Vercel AI Gateway)
- Sandbox lifecycle management (E2B)
- Build validation and auto-fix retries
- Real-time status streaming
Framework-Specific Prompts
Each framework has optimized system prompts:Agent Tools
AI agents have access to powerful tools for code generation:File Operations
createOrUpdateFiles
createOrUpdateFiles
Batch file creation/updates in the sandbox. Uses Python optimization to avoid O(N) API latency.Example usage:
readFiles
readFiles
Read multiple files in parallel to inspect existing code.Example usage:
Terminal Access
terminal
terminal
Execute commands in the E2B sandbox for package installation, building, and linting.Example usage:
Code Quality & Validation
Every AI-generated application goes through automatic quality checks:Mandatory Validation: Before completing any task, the AI MUST run
npm run build and fix ALL errors. No code is delivered with build failures.Auto-Fix Workflow
- Initial Generation - AI writes code based on your prompt
- Build Check -
npm run buildruns automatically - Error Detection - TypeScript, ESLint, and framework errors are captured
- Auto-Fix Retry - AI receives error context and regenerates code
- Validation Loop - Process repeats up to 2 times if needed
- Success - Clean build required before completion
Security Best Practices
All AI-generated code follows security guidelines:Streaming & Real-Time Updates
Code generation streams events to your interface in real-time:Usage & Rate Limits
Code generation operates within credit limits:| Plan | Daily Limit | Features |
|---|---|---|
| Free | 5 generations | All frameworks, Auto-fix, Streaming |
| Pro | 100 generations | Priority processing, Higher timeout |
Credits are tracked in a 24-hour rolling window. Each code generation request consumes 1 credit regardless of complexity.
Advanced Features
Conversational Refinement
After initial generation, you can refine your application through conversation:Component Reuse
The AI leverages pre-installed component libraries:- Next.js: Automatically uses Shadcn UI components
- Angular: Integrates Angular Material
- React: Uses Chakra UI primitives
- Vue: Leverages Vuetify components
- Svelte: Applies DaisyUI classes
Database Integration
When you request database features:- ORM: Drizzle ORM
- Database: PostgreSQL (Prisma Console hosted)
- Auth: Better Auth (when authentication requested)
- Migrations: Drizzle migrations
Best Practices
Write Clear, Descriptive Prompts
Write Clear, Descriptive Prompts
The more specific your request, the better the results:❌ Vague: “Build an app”✅ Clear: “Build a todo app with Next.js, user authentication, and dark mode”
Specify Framework When Needed
Specify Framework When Needed
Explicitly mention the framework if you have a preference:
- “Create an Angular dashboard with Material Design”
- “Build a Svelte portfolio for performance”
- “Make a Vue calendar with Vuetify”
Request Full Features, Not Placeholders
Request Full Features, Not Placeholders
The AI generates production-ready code, not demos:❌ Placeholder: “Add a login form”✅ Complete: “Add login form with email validation, password strength indicator, and error handling”
Iterate Through Conversation
Iterate Through Conversation
Use follow-up messages to refine and enhance:
- Initial: “Build a blog”
- Refine: “Add pagination”
- Enhance: “Add search functionality”
- Polish: “Make it mobile-first responsive”
Limitations
While powerful, the AI has some constraints:- No external API calls - Uses static/local data only
- No image URLs - Uses emojis and colored placeholders
- Dev servers don’t run - Code is validated via builds, not runtime
- Sandbox isolation - No access to your local filesystem
Next Steps
Real-Time Sandboxes
Learn how E2B provides isolated execution environments
Live Preview
Explore the split-pane interface with real-time updates
File Explorer
Browse generated code with syntax highlighting
Multi-Framework Support
Deep dive into all supported frameworks