Skip to content

beeweed/vibecoder

Repository files navigation

⚑ VibeCoder

AI-Powered Code Generation Platform

Next.js TypeScript TailwindCSS License

Build applications with AI-powered code generation. Describe what you want, and VibeCoder writes the code.

Demo Β· Report Bug Β· Request Feature


πŸ“– Overview

VibeCoder is an open-source AI coding agent that transforms natural language descriptions into production-ready code. Similar to platforms like Bolt.new, Lovable, and v0.dev, VibeCoder provides a complete in-browser development environment where you can:

  • πŸ’¬ Chat with AI to describe what you want to build
  • πŸ“ Generate complete file structures automatically
  • ✏️ Edit code with a Monaco-powered editor
  • πŸ”„ Iterate quickly with AI-assisted modifications
  • πŸ“¦ Export projects as ZIP files

✨ Features

πŸ€– Intelligent AI Agent

  • Two-Phase Processing: Thinking phase for understanding, then coding phase for execution
  • Agentic Loop: Separate LLM calls for each tool execution (read, create, update, delete)
  • Context-Aware: AI understands your entire project structure
  • Tool Execution: AI can read existing files before modifying them

🎨 Modern Code Editor

  • Monaco Editor: VS Code-like editing experience
  • Syntax Highlighting: Support for 20+ languages
  • Multi-Tab Support: Work on multiple files simultaneously
  • Real-Time Updates: See AI changes as they happen

πŸ“‚ Virtual File System

  • In-Browser Storage: No server needed for file management
  • Folder Structure: Organize files in directories
  • File Operations: Create, read, update operations (delete by AI only)
  • Export to ZIP: Download your entire project

πŸ”Œ Multi-Provider Support

Connect to 12+ AI providers with your own API keys:

Provider Models
OpenRouter Access to 100+ models
OpenAI GPT-4, GPT-4o, GPT-3.5
Anthropic Claude 3.5, Claude 3
Google Gemini Pro, Gemini Flash
Groq Llama 3, Mixtral (fast inference)
Mistral Mistral Large, Medium, Small
DeepSeek DeepSeek Coder, Chat
Cohere Command R+, Command R
Fireworks Various open models
Cerebras Fast inference models
Hugging Face Open source models
Together AI Open source models

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         VIBECODER ARCHITECTURE                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚   AI Panel   β”‚    β”‚   Explorer   β”‚    β”‚    Code Editor       β”‚   β”‚
β”‚  β”‚              β”‚    β”‚              β”‚    β”‚    (Monaco)          β”‚   β”‚
β”‚  β”‚  - Chat UI   β”‚    β”‚  - File Tree β”‚    β”‚                      β”‚   β”‚
β”‚  β”‚  - Thinking  β”‚    β”‚  - Folders   β”‚    β”‚  - Syntax Highlight  β”‚   β”‚
β”‚  β”‚  - Status    β”‚    β”‚  - Files     β”‚    β”‚  - Multi-tab         β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚         β”‚                   β”‚                       β”‚               β”‚
β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚
β”‚                             β”‚                                        β”‚
β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”                              β”‚
β”‚                    β”‚   Zustand Store β”‚                              β”‚
β”‚                    β”‚                 β”‚                              β”‚
β”‚                    β”‚  - chatStore    β”‚                              β”‚
β”‚                    β”‚  - fileSystem   β”‚                              β”‚
β”‚                    β”‚  - editorStore  β”‚                              β”‚
β”‚                    β”‚  - agentStore   β”‚                              β”‚
β”‚                    β”‚  - settings     β”‚                              β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜                              β”‚
β”‚                             β”‚                                        β”‚
β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                   β”‚
β”‚         β”‚                   β”‚                   β”‚                   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”            β”‚
β”‚  β”‚  /api/think β”‚    β”‚  /api/agent   β”‚   β”‚  /api/chat  β”‚            β”‚
β”‚  β”‚             β”‚    β”‚               β”‚   β”‚             β”‚            β”‚
β”‚  β”‚  Reasoning  β”‚    β”‚  Agent Loop   β”‚   β”‚  Streaming  β”‚            β”‚
β”‚  β”‚  Phase      β”‚    β”‚  + Tools      β”‚   β”‚  Response   β”‚            β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β”‚                                                                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Agent Loop Flow

User Message
     β”‚
     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ LLM Call #1 β”‚ ──► Contains tool calls?
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚
     β”œβ”€β”€ NO  ──► Done (final response)
     β”‚
     β”œβ”€β”€ YES ──► Execute tools (read_file, create, update, delete)
     β”‚              β”‚
     β”‚              β–Ό
     β”‚         Tool Results
     β”‚              β”‚
     β”‚              β–Ό
     β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β””β–Ί β”‚ LLM Call #2 β”‚ ──► More tool calls? (loop continues)
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             β”‚
             └── Until no more tool calls (max 10 iterations)

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ or Bun
  • API key from any supported provider

Installation

  1. Clone the repository

    git clone https://github.com/beeweed/vibecoder.git
    cd vibecoder
  2. Install dependencies

    npm install
    # or
    bun install
  3. Start the development server

    npm run dev
    # or
    bun dev
  4. Open your browser

    http://localhost:3000
    
  5. Add your API key

    • Click the βš™οΈ settings icon
    • Select your preferred provider
    • Enter your API key
    • Start coding!

πŸ“ Project Structure

vibecoder/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”‚   β”œβ”€β”€ agent/          # Agentic loop endpoint
β”‚   β”‚   β”‚   β”œβ”€β”€ chat/           # Streaming chat endpoint
β”‚   β”‚   β”‚   β”œβ”€β”€ think/          # Reasoning phase endpoint
β”‚   β”‚   β”‚   β”œβ”€β”€ models/         # Provider-specific endpoints
β”‚   β”‚   β”‚   └── tools/          # Tool execution endpoints
β”‚   β”‚   β”œβ”€β”€ layout.tsx
β”‚   β”‚   β”œβ”€β”€ page.tsx
β”‚   β”‚   └── globals.css
β”‚   β”‚
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ ai-panel/           # Chat interface
β”‚   β”‚   β”‚   β”œβ”€β”€ AIPanel.tsx
β”‚   β”‚   β”‚   └── ToolCallIndicator.tsx
β”‚   β”‚   β”œβ”€β”€ editor/             # Monaco code editor
β”‚   β”‚   β”‚   └── EditorPanel.tsx
β”‚   β”‚   β”œβ”€β”€ file-explorer/      # File tree
β”‚   β”‚   β”‚   └── FileExplorer.tsx
β”‚   β”‚   β”œβ”€β”€ layout/             # Header, navigation
β”‚   β”‚   β”‚   β”œβ”€β”€ Header.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ MobileNav.tsx
β”‚   β”‚   β”‚   └── ModelSelector.tsx
β”‚   β”‚   β”œβ”€β”€ modals/             # Settings modal
β”‚   β”‚   β”‚   └── SettingsModal.tsx
β”‚   β”‚   └── ui/                 # shadcn/ui components
β”‚   β”‚
β”‚   β”œβ”€β”€ stores/                 # Zustand state management
β”‚   β”‚   β”œβ”€β”€ agentStore.ts       # Agent status, activity log
β”‚   β”‚   β”œβ”€β”€ chatStore.ts        # Messages, generation state
β”‚   β”‚   β”œβ”€β”€ editorStore.ts      # Tabs, cursor position
β”‚   β”‚   β”œβ”€β”€ fileSystemStore.ts  # Virtual file system
β”‚   β”‚   └── settingsStore.ts    # API keys, preferences
β”‚   β”‚
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ fileIcons.ts        # File type icons
β”‚   β”‚   β”œβ”€β”€ parser.ts           # AI response parser
β”‚   β”‚   β”œβ”€β”€ systemPrompt.ts     # AI system prompts
β”‚   β”‚   └── utils.ts            # Utility functions
β”‚   β”‚
β”‚   └── types/
β”‚       β”œβ”€β”€ agent.ts            # Agent types
β”‚       β”œβ”€β”€ chat.ts             # Chat types
β”‚       β”œβ”€β”€ files.ts            # File system types
β”‚       β”œβ”€β”€ openrouter.ts       # API types
β”‚       └── tools.ts            # Tool types
β”‚
β”œβ”€β”€ public/
β”œβ”€β”€ package.json
β”œβ”€β”€ tailwind.config.ts
β”œβ”€β”€ tsconfig.json
└── README.md

πŸ› οΈ Tech Stack

Category Technology
Framework Next.js 15 (App Router)
Language TypeScript 5
Styling TailwindCSS 3.4
UI Components Radix UI (shadcn/ui)
State Management Zustand
Code Editor Monaco Editor
Animations Framer Motion
Icons Lucide React
Notifications Sonner
Linting Biome

πŸ”§ Configuration

Environment Variables (Optional)

Create a .env.local file for default settings:

# App URL (for OpenRouter referrer)
NEXT_PUBLIC_APP_URL=http://localhost:3000

Supported File Types

VibeCoder supports syntax highlighting for:

  • Web: .js, .jsx, .ts, .tsx, .html, .css, .scss
  • Data: .json, .yaml, .yml, .xml, .toml
  • Docs: .md, .mdx, .txt
  • Backend: .py, .go, .rs, .java, .rb, .php
  • Database: .sql, .prisma, .graphql
  • Config: .env, .gitignore, Dockerfile
  • And many more...

πŸ“ AI Response Format

VibeCoder uses special markers to parse AI responses:

File Operations

<<<FILE_CREATE: src/components/Button.tsx>>>
// Your code here
<<<FILE_END>>>

<<<FILE_UPDATE: src/components/Button.tsx>>>
// Updated code here
<<<FILE_END>>>

<<<FILE_DELETE: src/old-file.tsx>>>

Tool Calls

<<<TOOL_CALL: read_file>>>
{"path": "src/components/Button.tsx"}
<<<TOOL_END>>>

πŸ—ΊοΈ Roadmap

  • E2B Sandbox - Live code preview in sandboxed environment
  • Web Search - AI can search the web for documentation
  • Git Integration - Push/pull from GitHub repositories
  • Deploy - One-click deploy to Vercel/Netlify
  • File Upload - Upload images and files with prompts
  • Project Templates - Start with Next.js, Python, etc.
  • Sub-Agents - Specialized agents for different tasks
  • Collaboration - Real-time multiplayer editing

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments


⭐ Star this repo if you find it useful!

Made with ❀️ by beeweed

About

Open source vibecoder, like lovable, bolt, v0, other

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages