Skip to content

varu63/Vibcoder-

Repository files navigation

πŸš€ Vibecode Playground

Vibecode Playground is a modern AI-powered browser IDE built using Next.js, Monaco Editor, WebContainers, and Ollama. It allows developers to write, edit, run, and manage projects directly inside the browser with real-time execution and AI-assisted coding.


✨ Features

  • πŸ” Authentication using Google & GitHub
  • 🎨 Modern UI with TailwindCSS + ShadCN
  • πŸŒ™ Dark / Light mode
  • πŸ“ Advanced file explorer
  • πŸ–ŠοΈ Monaco code editor integration
  • ⚑ Real-time code execution using WebContainers
  • πŸ’» Built-in terminal with xterm.js
  • πŸ€– AI-powered code suggestions using Ollama
  • πŸ“¦ Multiple starter templates
  • πŸ“± Responsive developer-focused interface

πŸ› οΈ Tech Stack

Technology Usage
Next.js 15 Frontend + Backend
TypeScript Type Safety
TailwindCSS Styling
ShadCN UI UI Components
Monaco Editor Code Editor
WebContainers Browser Runtime
xterm.js Terminal
NextAuth Authentication
MongoDB Database
Ollama AI Suggestions

πŸ“¦ Installation

1. Clone the Repository

git clone https://github.com/Aestheticsuraj234/vibecode-playground.git

2. Move into Project Folder

cd vibecode-playground

3. Install Dependencies

npm install

If dependencies fail:

npm install --legacy-peer-deps

πŸ”‘ Environment Variables

Create a .env.local file in the root directory.

AUTH_SECRET=your_auth_secret

AUTH_GOOGLE_ID=your_google_client_id
AUTH_GOOGLE_SECRET=your_google_secret

AUTH_GITHUB_ID=your_github_client_id
AUTH_GITHUB_SECRET=your_github_secret

DATABASE_URL=your_mongodb_url

NEXTAUTH_URL=http://localhost:3000

🧠 Setup Ollama (Required for AI Features)

Install Ollama

Download and install Ollama:

πŸ‘‰ https://ollama.com


Pull AI Model

ollama pull codellama

You can also use:

  • deepseek-coder
  • mistral
  • llama3
  • qwen2.5-coder

Start Ollama

ollama run codellama

If Ollama is not running, AI suggestions will not work.


▢️ Run the Project

Start the development server:

npm run dev

Open:

http://localhost:3000

πŸ§ͺ Production Build

Build Project

npm run build

Start Production Server

npm start

πŸ“‚ Project Structure

vibecode-playground/
β”‚
β”œβ”€β”€ app/                  # Next.js App Router
β”œβ”€β”€ components/           # Reusable UI components
β”œβ”€β”€ features/             # Feature modules
β”œβ”€β”€ hooks/                # Custom React hooks
β”œβ”€β”€ lib/                  # Utility functions
β”œβ”€β”€ prisma/               # Database configuration
β”œβ”€β”€ public/               # Static assets
β”œβ”€β”€ vibecode-starters/    # Starter templates
β”‚
β”œβ”€β”€ auth.ts
β”œβ”€β”€ middleware.ts
β”œβ”€β”€ next.config.ts
β”œβ”€β”€ package.json
└── README.md

⌨️ Keyboard Shortcuts

Shortcut Action
Ctrl + Space Trigger AI Suggestions
Double Enter Generate AI Completion
Tab Accept Suggestion

πŸ”₯ Main Functionalities

πŸ–ŠοΈ Monaco Editor

Advanced code editor with:

  • syntax highlighting
  • auto-completion
  • formatting
  • IntelliSense support

⚑ WebContainers

Run frontend/backend apps directly inside the browser without local setup.


πŸ€– AI Assistant

Integrated AI assistant powered by Ollama for:

  • code completion
  • debugging
  • refactoring
  • explanations

🚨 Common Issues

1. AI Suggestions Not Working

Make sure:

  • Ollama is installed
  • Ollama server is running
  • Model is downloaded

Run:

ollama run codellama

2. Authentication Error

Check:

  • Google OAuth credentials
  • GitHub OAuth credentials
  • NEXTAUTH_URL value

3. MongoDB Connection Failed

Verify:

  • DATABASE_URL is correct
  • MongoDB Atlas IP whitelist allows your IP

4. WebContainers Not Running

WebContainers require:

  • Chromium-based browser
  • HTTPS in production
  • modern browser support

Use:

  • Chrome
  • Edge
  • Brave

Avoid:

  • old Firefox versions

🌍 Deployment

You can deploy using:

  • Vercel
  • Netlify
  • Railway

Recommended: Vercel


πŸ“Έ Screenshots

Add screenshots here:

![Home Page](./public/home.png)
![Editor](./public/editor.png)

🀝 Contributing

Contributions are welcome.

Steps

  1. Fork the repository
  2. Create a new branch
git checkout -b feature-name
  1. Commit changes
git commit -m "Added new feature"
  1. Push branch
git push origin feature-name
  1. Create Pull Request

πŸ“„ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Author

Developed by Suraj Kumar Jha

GitHub: https://github.com/Aestheticsuraj234


⭐ Support

If you like this project:

  • Star the repository
  • Fork the project
  • Share it with developers

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages