Skip to content

ayyush08/CuraVibe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

79 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

🧠 CuraVibe

A full-featured browser-based IDE built with Next.js and Prisma ORM, powered by Monaco Editor, WebContainers API, and optional AI Copilot-style code assistance powered by MonacoPilot.


🌟 Overview

CuraVibe is a full-stack, browser-based IDE that brings a professional development environment directly to your browser. Built with modern technologies, it enables developers to write, execute, and deploy code without leaving the browser window.

Key Capabilities:

  • πŸ“ Monaco Editor Integration β€” VS Code-level code editing experience
  • πŸš€ Multi-Framework Support β€” Pre-configured templates for React, Next.js, Express, Hono, Vue, and Angular
  • 🎯 Live Code Execution β€” Run and preview projects in real-time using WebContainers
  • πŸ’» Full Terminal Access β€” Integrated Xterm.js terminal for running build commands
  • πŸ€– AI Code Assistance β€” Copilot-style code suggestions via MonacoPilot
  • πŸ” User Authentication β€” OAuth integration with Google & GitHub via NextAuth
  • πŸ’Ύ Persistent Workspaces β€” Projects saved to MongoDB and restored on login
  • πŸŒ™ Dark Mode Support β€” Beautiful, accessible UI built with Tailwind CSS and custom components

🎨 Architecture Highlights

Full-Stack Implementation:

  • Frontend: Next.js 15 with React 19, TypeScript, and Tailwind CSS
  • Editor: Monaco Editor with custom extensions
  • Backend: Next.js API routes, Prisma ORM for data management
  • Database: MongoDB with comprehensive schema for users, projects, and collaboration
  • Real-time Runtime: WebContainers API for sandboxed code execution
  • Terminal: Xterm.js for interactive shell experience

πŸŽ₯ Demo

πŸ§ͺ GitHub repository contains working codebase with full source code walkthrough. Live demo deployment coming soon.

Current Status: Core functionality implemented and working. WebContainers integration documented in known limitations below.


✨ Core Features

  • πŸ” Secure Authentication β€” OAuth 2.0 using NextAuth with Google & GitHub providers
  • 🧠 AI Code Assistance β€” Real-time code suggestions and completions powered by MonacoPilot
  • ⚑ Live Preview β€” Instant code execution feedback (local preview works; see Known Limitations)
  • πŸ’Ύ Project Persistence β€” Workspaces automatically saved to MongoDB and restored on login
  • πŸ“¦ Multiple Framework Templates β€” Pre-configured & optimized for:
    • React
    • Next.js
    • Express.js
    • Hono
    • Vue.js
    • Angular
  • 🧩 Extensible Architecture β€” Modular design makes adding new templates straightforward
  • πŸ’¬ Integrated Terminal β€” Full-featured Xterm.js terminal for running build commands
  • 🎨 Professional UI β€” Dark mode support, responsive design, accessibility-first component library
  • πŸ”§ Developer Experience β€” Hot reload support, syntax highlighting, auto-completion, error detection

βš™οΈ Tech Stack

Layer Technology Purpose
Frontend Next.js 15, React 19, TypeScript UI framework & type safety
Editor Monaco Editor, MonacoPilot Code editing & AI suggestions
Styling Tailwind CSS, Radix UI Modern, accessible UI components
Backend Next.js API Routes, NextAuth 5 Server logic & authentication
Database MongoDB, Prisma ORM v6 Data persistence & schema management
Runtime WebContainers API v1.6 Sandboxed code execution
Terminal Xterm.js 5.5 Interactive shell experience
AI Google GenAI, MonacoPilot Code completion & suggestions

🧰 Installation & Setup

Prerequisites

  • Node.js 18+ and npm/yarn
  • MongoDB instance (local or cloud via MongoDB Atlas)
  • Git for cloning the repository
  • OAuth credentials (optional): Google and GitHub OAuth apps

Step-by-Step Installation

1. Clone the Repository

git clone https://github.com/ayyush08/CuraVibe.git
cd CuraVibe

2. Install Dependencies

npm install
# or
yarn install

3. Configure Environment Variables

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

# Database
DATABASE_URL="mongodb+srv://username:password@cluster.mongodb.net/curavibe"

# NextAuth Configuration
NEXTAUTH_SECRET="your-random-secret-key-here"
NEXTAUTH_URL="http://localhost:3000"

# OAuth Providers (Optional - for AI features & signup)
AUTH_GOOGLE_ID="your-google-oauth-id"
AUTH_GOOGLE_SECRET="your-google-oauth-secret"
AUTH_GITHUB_ID="your-github-oauth-id"
AUTH_GITHUB_SECRET="your-github-oauth-secret"

# AI Features (MonacoPilot)
NEXT_PUBLIC_GOOGLE_GENAI_KEY="your-google-genai-key"

Getting OAuth Credentials:

To generate NEXTAUTH_SECRET:

openssl rand -base64 32

4. Set Up the Database

Initialize Prisma and sync with MongoDB:

# Generate Prisma Client
npx prisma generate

# Push schema to MongoDB (creates/updates collections)
npx prisma db push

# (Optional) Open Prisma Studio for visual database management
npx prisma studio

5. Run the Development Server

npm run dev

The application will start at http://localhost:3000.


πŸ’‘ Usage Guide

Creating Your First Project

  1. Sign In β€” Use Google/GitHub OAuth or create an account
  2. New Playground β€” Click "Create New Playground"
  3. Select Template β€” Choose from React, Next.js, Express, etc.
  4. Start Coding β€” Edit files in the Monaco editor
  5. Run & Preview β€” Use the integrated terminal and preview panel
  6. Save Project β€” Automatically persisted to your account

Using AI Code Suggestions

With MonacoPilot enabled:

  • Press Ctrl+I (or Cmd+I on Mac) for inline suggestions
  • Editor will provide context-aware code completions
  • Accept suggestions with Tab or reject with Esc

Terminal Commands

# Install dependencies
npm install

# Start development server
npm start

# Build project
npm run build

# Run tests
npm test

πŸ—οΈ Project Structure

CuraVibe/
β”œβ”€β”€ app/                          # Next.js app directory
β”‚   β”œβ”€β”€ (auth)/                   # Authentication pages
β”‚   β”œβ”€β”€ (root)/                   # Main app layout
β”‚   β”œβ”€β”€ api/                      # API routes
β”‚   β”‚   β”œβ”€β”€ auth/                 # NextAuth endpoints
β”‚   β”‚   β”œβ”€β”€ chat/                 # AI chat endpoints
β”‚   β”‚   β”œβ”€β”€ code-completion/      # Code suggestion API
β”‚   β”‚   β”œβ”€β”€ template/             # Template management
β”‚   β”‚   └── get-repo/             # Repository utilities
β”‚   β”œβ”€β”€ dashboard/                # User dashboard
β”‚   β”œβ”€β”€ playground/               # Code editor & runtime
β”‚   └── remote-runner/            # WebContainer execution
β”‚
β”œβ”€β”€ components/                   # Reusable React components
β”‚   β”œβ”€β”€ ui/                       # UI component library (50+)
β”‚   β”œβ”€β”€ lightswind/               # Custom animations & effects
β”‚   └── providers/                # Context & theme providers
β”‚
β”œβ”€β”€ modules/                      # Feature modules
β”‚   β”œβ”€β”€ ai-chat/                  # AI chat integration
β”‚   β”œβ”€β”€ auth/                     # Authentication logic
β”‚   β”œβ”€β”€ dashboard/                # Dashboard features
β”‚   β”œβ”€β”€ home/                     # Landing page
β”‚   β”œβ”€β”€ playground/               # Editor interface
β”‚   β”œβ”€β”€ remote-runner/            # WebContainer management
β”‚   └── webcontainers/            # WebContainer utilities
β”‚
β”œβ”€β”€ lib/                          # Utility functions
β”‚   β”œβ”€β”€ db.ts                     # Database client
β”‚   β”œβ”€β”€ copilot.ts                # AI integration
β”‚   β”œβ”€β”€ template.ts               # Template utilities
β”‚   β”œβ”€β”€ build-template-from-repo.ts # Template builder
β”‚   └── generated/                # Prisma client (auto-generated)
β”‚
β”œβ”€β”€ hooks/                        # Custom React hooks
β”‚   β”œβ”€β”€ use-current-user.ts       # User context hook
β”‚   └── use-mobile.ts             # Mobile detection
β”‚
β”œβ”€β”€ prisma/                       # Database schema
β”‚   └── schema.prisma             # Prisma schema definitions
β”‚
└── public/                       # Static assets
    └── starters/                 # Template starters

⚠️ Known Limitations

WebContainers Performance

  • Issue: WebContainers API initialization can be slow in local development (15-30 seconds on first load)
  • Why: StackBlitz WebContainers requires downloading the entire containerized runtime
  • Current Status: Works correctly when properly initialized; slowness is primarily on first load
  • Workaround:
    • Deployed versions perform better due to edge caching
    • Subsequent loads in the same browser session are faster
    • Consider pre-warming containers during development

Framework Preview Limitations

  • Next.js & React frameworks: May require additional configuration in WebContainers environment
  • Recommendation: Test with simpler frameworks (Express, Hono) for fastest iteration during development

Local Development Quirks

  • File system sync between editor and WebContainers occasionally requires page refresh
  • Some npm packages with native dependencies may not work in WebContainers sandbox
  • Large projects (10,000+ lines) may experience editor lag

Deployment Notes

  • Not yet deployed to production β€” Project focuses on core functionality
  • Recommended hosting: Vercel (for Next.js optimization), Railway, or AWS
  • Database: Requires MongoDB Atlas or self-hosted MongoDB instance

πŸš€ Roadmap

Completed βœ…

  • Monaco Editor integration
  • Multi-framework template support
  • WebContainers API integration
  • Xterm.js terminal
  • NextAuth OAuth authentication
  • Prisma ORM database layer
  • MongoDB persistence
  • MonacoPilot AI suggestions
  • Dark mode theme support

In Progress πŸ”„

  • Performance optimization for WebContainers
  • Collaborative editing features (real-time sync)
  • Additional framework templates (Svelte, Remix)
  • Code snippet marketplace
  • Project sharing & public playgrounds

Planned 🎯

  • Production deployment
  • Advanced debugging tools
  • Version control integration (Git)
  • Team collaboration workspace
  • Custom plugin system
  • Mobile app (React Native)

🀝 Contributing

Contributions are highly appreciated! Whether you're fixing bugs, optimizing performance, or adding new features, your help makes CuraVibe better.

How to Contribute

  1. Fork the Repository

    git clone https://github.com/ayyush08/CuraVibe.git
    cd CuraVibe
  2. Create a Feature Branch

    git checkout -b feature/your-feature-name
  3. Make Your Changes

    • Follow the existing code style
    • Add tests when applicable
    • Update documentation if needed
  4. Commit & Push

    git commit -m "feat: describe your changes"
    git push origin feature/your-feature-name
  5. Open a Pull Request

    • Reference any related issues
    • Provide a clear description of changes
    • Ensure all checks pass

Good First Issues

  • Adding new framework templates
  • UI/UX improvements
  • Performance optimizations
  • Documentation updates
  • Bug fixes (see Issues tab)

See CONTRIBUTING.md for detailed guidelines.


πŸ“ License

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


πŸ™‹ Support & Questions


🎯 Project Status

Current Phase: Active Development

CuraVibe is in active development with core features implemented and tested. The project is production-ready for educational and experimental use cases. Full production deployment is planned for Q2 2026.

Last Updated: February 2026


Made with ❀️ by Ayyush

⭐ Star this project β€’ Report Bug β€’ Request Feature

About

Curavibe is a browser-based code editor built with Next.js, offering a full IDE experience in the browser with support for a set of tech-stack templates and optional AI-powered features like Copilot-style code suggestions.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages