Skip to content

jernejc/monaco-automerge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README.md

Logo

Collaborative Code Editing

A collaborative code editor built using Monaco Editor and Automerge. Supports multiple users editing the same document simultaneously, with features like real-time synchronization, offline editing, and cursor/selection sharing.

Editor Demo

Key Features

  • Real-time collaborative editing with multiple users.
  • Cursor and selection sharing between users.
  • Peer-to-peer and WebSocket-based synchronization.
  • Offline support with local changes synchronization once the connection is restored.
  • Revert to snapshot hash functionality.

Getting Started

Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Make sure you have Docker installed on your machine and running.

Installation

  1. Clone the repository:

    git clone git@github.com:jernejc/monaco-automerge.git
    cd monaco-automerge
  2. Start the application using Docker Compose:

    docker-compose up --build
    

This will start both the client and server containers.

Usage

  1. Open the application in your browser. By default, it will run on http://localhost:8080.
  2. Copy the URL and open it a new tab to start collaborating in real-time.
  3. Example url:
    [host]/automerge:336uk9sp24iLqxcgi5k7BvV48a9f
    
  4. Link to snapshot with undo/redo option:
    [host]/automerge:336uk9sp24iLqxcgi5k7BvV48a9f/[stateHash]
    

Run Tests

e2e tests

Make sure docker-compose is running all containers.

Run in tests folder:

npm run setup
npm run test

Client & Server specific tests

Make sure you have all depedencies installed.

Run unit and integration tests from the client or server folder:

npm install
npm run test

Relevant Projects

About

Collaborative code editing with Monaco and Automerge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published