Skip to content

A collaborative rich text editor for you and your fellow devs!

Notifications You must be signed in to change notification settings

Saumya40-codes/CoDev

Repository files navigation

CoDev - Collaborative Code Editor

CoDev is a powerful, real-time collaborative code editor designed for seamless project development. It enables developers to create and manage files, invite team members, and work together in a dynamic coding environment.

🚀 Features

  • Real-time Collaboration: Multiple developers can work simultaneously on the same project with instant updates.
  • Project Management: Easily create and organize projects, files, and folders.
  • Team Invitations: Invite fellow developers to join your projects effortlessly.
  • Live Activity Tracking: Monitor who joins, leaves, or is currently editing in real-time.
  • Code Execution: Run your code and receive instant output or error feedback.
  • Multi-language Support: Write and execute code in JavaScript, TypeScript, C, C++, Java, Python, and Go.

⚠️ Deployment Note

The deployed version supports JavaScript/TypeScript code execution only. Other languages (C, C++, Java, Python, Go) require Docker, which is not available on the current hosting platform. These languages will work on local installations with Docker.

🎥 Demo

** Get Started **

Codev-kickstart.mp4
  1. Create a Project View Demo

  2. Create Multiple Files View Demo

  3. Collaborate with Other Developers View Demo

  4. Collaborative Work in Action View Demo

  5. Code Execution (JavaScript and Python) View Demo

🛠️ Tech Stack

  • Frontend: Next.js with TypeScript
  • State Management: Redux Toolkit, React-Redux
  • Backend: Node.js
  • Database: MySQL with Prisma ORM
  • Caching: Redis
  • Real-time Communication: Socket.io
  • Containerization: Docker

📋 Prerequisites

  • Node.js (v14 or later)
  • MySQL
  • Redis
  • Docker (for local execution of non-JS/TS languages)

🚀 Getting Started

  1. Clone the repository
    git clone https://github.com/Saumya40-codes/CoDev.git -b local
    cd CoDev
    
  2. Install dependencies
    npm install
    
  3. Set up environment variables Create a .env file in the root directory with the following:
     DATABASE_URL=mysql://username:password@localhost:3306/database_name
     GOOGLE_CLIENT_ID=your_google_client_id
     GOOGLE_CLIENT_SECRET=your_google_client_secret
     NEXTAUTH_URL=http://localhost:3000
     NEXTAUTH_SECRET=your_nextauth_secret
     REDIS_HOST=your_redis_host
     REDIS_PORT=your_redis_port
     REDIS_PASSWORD=your_redis_password
     HOST_ENV=dev
     ENDPOINT=http://localhost:5000
    
  4. Run Prisma migrations
    npx prisma generate
    npx prisma migrate dev --name init --create-only
    npx prisma migrate deploy
    
  5. Start the development server
    npm run dev
    
  6. Open http://localhost:3000 in your browser.

Running server 💻

  1. cd server
    
  2. npm install
    
  3. NEXT_API_ENDPOINT=http://localhost:3000/api #(might be different if you changed client endpoint)
    
  4. npm run dev

Releases

No releases published

Packages

No packages published