Skip to content

Collaborative Code Editor where user can create, edit and view frontend and server side code snippets directly on your browser. Users can join room and collaborate to see realtime updates.

Notifications You must be signed in to change notification settings

MridulDhiman/code-shard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeShard: browser based collaborative code editor

Local Setup

  1. Clone the repository into your system.
git clone https://github.com/MridulDhiman/code-shard.git
  1. Install pnpm as a package manager globally in your systems, if you haven't installed it yet using this command:
npm install -g pnpm
  1. Install all packages and dev dependencies for your project.
pnpm install
  1. Setup environment variables inside of .env.local file.
## Replace with your values
AUTH_SECRET="<random-hash-value>"
MONGODB_URI="<your-mongodb-url-here>"
HOST_URL="http://localhost:3000"
NEXT_PUBLIC_BACKEND_URL="http://localhost:8080"

Overview

It is browser based collaborative code editor with built-in frontend templates support like React, Svelte, Vue, Angular, Solid etc. Each template provides multi-file support, and you can add new files, dependencies and dev dependencies. It executes the code within the browser itself, inside a separate iframe. User can Signup/Login using email and password. Even without login, one can try out all the editors and their code state would be saved permanently, even after closing the tab. After successful login, you can create new shards/playgrounds in your account, and it would be visible in your profile. You can change the visibility of particular shard from Public to Private and vice versa. User can like each other's posts and comment on them, and follow each other. Personalized Comment Thread for each post. User have a personalized github like feed, where he/she can she all the activities of the users he/she have followed. User can create collaborative rooms and shard room id, and they can collaborative on multiple files at the same time, without worrying about write conflicts, as they get synchronized automatically by CRDTs. For persisting the data inside of room, all the realtime code updates, are batched inside of Kafka, and kafka consumer picks up the latest event and saves that data to database after every 10s (can be optimized).

Demo

Image 1 Image 2 Image 3
Image 4 Image 5 Image 6
Image 7 Image 8

About

Collaborative Code Editor where user can create, edit and view frontend and server side code snippets directly on your browser. Users can join room and collaborate to see realtime updates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published