AI-Powered Web Application Generator
Transform natural language prompts into fully functional, live Next.js applications β instantly.
Features β’ How It Works β’ Architecture β’ Getting Started β’ Tech Stack
Generate applications using your preferred AI provider:
- Google Gemini (gemini-2.0-flash)
- OpenAI (gpt-4o-mini)
- Anthropic Claude (claude-3-5-sonnet, claude-3-5-haiku)
- xAI Grok (grok-2-latest)
- OpenRouter (devstral-2512, mistral-7b-instruct)
Encrypted API key storage with AES-256-GCM encryption. Bring your own API keys β stored securely with your user account.
Each generation runs in an isolated E2B sandbox with:
- Pre-configured Next.js 15.3.3 environment
- Full file system access
- Terminal command execution
- Hot module reloading
- Isolated port 3000 preview
Iterate on your applications through natural conversation:
- Multi-turn context retention
- Incremental feature additions
- Real-time code modifications
Generated apps include:
- TypeScript throughout
- Tailwind CSS styling
- shadcn/ui components (pre-installed)
- Responsive layouts
- Accessibility best practices
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β USER PROMPT β
β "Build a todo app with dark mode" β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ZYRO ORCHESTRATION β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Clerk β β tRPC β β Inngest β β Prisma β β
β β Auth βββββΆβ API βββββΆβ Events βββββΆβ Storage β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI AGENT NETWORK β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β CODE AGENT β β
β β β’ System prompt with Next.js/Tailwind/shadcn expertise β β
β β β’ Tools: terminal, createOrUpdateFile, readFile β β
β β β’ Iterates until <task_summary> generated β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββ ββββββββββββββββββββββ β
β β Title Generator β β Response Generator β β
β β (3-word summary) β β (User message) β β
β ββββββββββββββββββββββ ββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β E2B SANDBOX β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Isolated Next.js 15.3.3 Environment β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
β β π /home/user β β
β β βββ app/ β Generated pages & components β β
β β β βββ page.tsx β β
β β β βββ layout.tsx β β
β β β βββ [components].tsx β β
β β βββ components/ui/ β Pre-installed shadcn components β β
β β βββ lib/utils.ts β Utilities (cn, etc.) β β
β β βββ package.json β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
β β π₯οΈ Dev server running on port 3000 with hot reload β β
β β π§ npm available for dependency installation β β
β β π Full file system read/write access β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LIVE PREVIEW β
β https://[sandbox-id].e2b.dev β’ Shareable URL β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Zyro is built as a modern, event-driven system using Next.js 15 with a sophisticated agent-based AI backend:
zyro/
βββ src/
β βββ app/ # Next.js 15 App Router
β β βββ (home)/ # Authenticated routes
β β βββ api/ # API endpoints (tRPC, Inngest)
β β βββ projects/ # Project views
β β
β βββ components/ # UI Components
β β βββ ui/ # shadcn/ui components
β β βββ code-view/ # Code editor & preview
β β βββ file-explorer.tsx # File tree navigation
β β βββ tree-view.tsx # Directory structure
β β
β βββ modules/ # Feature modules
β β βββ home/ # Dashboard
β β βββ projects/ # Project management
β β βββ messages/ # Chat interface
β β βββ api-keys/ # Key management
β β
β βββ inngest/ # Background job processing
β β βββ functions.ts # AI agent orchestration
β β βββ client.ts # Inngest client
β β βββ utils.ts # Sandbox utilities
β β
β βββ trpc/ # Type-safe API layer
β β βββ routers/ # API route definitions
β β βββ server.tsx # Server utilities
β β βββ client.tsx # Client utilities
β β
β βββ lib/ # Shared utilities
β β βββ prisma.ts # Database client
β β βββ ai-keys/ # Encryption utilities
β β βββ utils.ts # Helper functions
β β
β βββ prompt.ts # AI system prompts
β
βββ prisma/
β βββ schema.prisma # Database schema
β
βββ sandbox-template/ # E2B sandbox config
βββ nextjs/ # Next.js template
model Project {
id String @id @default(uuid())
name String
userId String
messages Message[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Message {
id String @id @default(uuid())
content String
role MessageRole // USER | ASSISTANT
type MessageType // RESULT | ERROR
projectId String?
Fragment Fragment?
}
model Fragment {
id String @id @default(uuid())
messageId String @unique
sandboxUrl String # Live preview URL
sandboxId String? # E2B sandbox identifier
title String # AI-generated title
files Json # Generated file contents
}
model UserAiProviderKey {
id String @id @default(uuid())
userId String
provider AiProvider // GEMINI | OPENAI | ANTHROPIC | GROK | OPENROUTER
iv Bytes # Encryption IV
ciphertext Bytes # Encrypted key
authTag Bytes # Auth tag
last4 String # Display hint
}The core of Zyro is an Inngest Agent Kit powered network:
| Agent | Purpose | Model |
|---|---|---|
| Code Agent | Generates and modifies application code | Provider's primary model |
| Title Generator | Creates 3-word fragment titles | Provider's fast model |
| Response Generator | Writes user-friendly completion messages | Provider's fast model |
Available Tools:
| Tool | Description |
|---|---|
terminal |
Execute shell commands (npm install, etc.) |
createOrUpdateFile |
Write files to the sandbox |
readFile |
Read existing file contents |
- Node.js 18+ with pnpm
- PostgreSQL database
- Clerk account for authentication
- E2B account for sandbox execution
- Inngest account for event processing
-
Clone the repository
git clone https://github.com/riaz37/zyro.git cd zyro -
Install dependencies
pnpm install
-
Configure environment
cp .env.example .env.local
# Database DATABASE_URL="postgresql://user:pass@host:5432/zyro" # Clerk Authentication NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_..." CLERK_SECRET_KEY="sk_..." # E2B Sandbox E2B_API_KEY="e2b_..." # Inngest INNGEST_EVENT_KEY="..." INNGEST_SIGNING_KEY="..." # Encryption (generate with: openssl rand -hex 32) ENCRYPTION_KEY="..."
-
Initialize database
pnpm prisma migrate dev pnpm prisma generate
-
Start development server
pnpm dev
-
Start Inngest dev server (separate terminal)
npx inngest-cli@latest dev
Open http://localhost:3000 to start generating!
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 16.0.10 | React framework with App Router |
| React | 19.2.3 | UI library |
| TypeScript | 5.9.3 | Type safety |
| Technology | Purpose |
|---|---|
| Inngest Agent Kit | Multi-agent orchestration |
| E2B | Sandboxed code execution |
| Technology | Purpose |
|---|---|
| Prisma | ORM & migrations |
| PostgreSQL | Database |
| tRPC | Type-safe API |
| TanStack Query | Data fetching |
| Technology | Purpose |
|---|---|
| Tailwind CSS | Utility-first CSS |
| shadcn/ui | UI components |
| Radix UI | Accessible primitives |
| Lucide | Icons |
| Technology | Purpose |
|---|---|
| Clerk | Authentication |
| Inngest | Event-driven background jobs |
| Sonner | Toast notifications |
Try these prompts to see Zyro in action:
| Prompt | What You'll Get |
|---|---|
| "Create a todo app with dark mode" | Full CRUD todo list with theme toggle |
| "Build a weather dashboard with charts" | Dashboard layout with data visualization |
| "Make a portfolio website with contact form" | Multi-section portfolio with form validation |
| "Create a music player interface" | Audio player UI with playlist management |
| "Build a Kanban board like Trello" | Drag-and-drop task management |
| "Design a Twitter/X clone feed" | Social media feed with interactions |
- Encrypted API Keys: User API keys are encrypted with AES-256-GCM before storage
- Isolated Sandboxes: Each code generation runs in an isolated E2B sandbox
- Authentication: All routes protected with Clerk authentication
- Input Validation: Zod schemas validate all API inputs
| Command | Description |
|---|---|
pnpm dev |
Start dev server with Turbopack |
pnpm build |
Build for production |
pnpm start |
Start production server |
pnpm lint |
Run ESLint |
pnpm prisma studio |
Open Prisma database GUI |
pnpm prisma migrate dev |
Run database migrations |
Contributions are welcome! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.
Built with β€οΈ by riaz37