vizhub-core / vzcode

Mob Programming Code Editor
MIT License
55 stars 13 forks source link

VZCode: Mob Programming Code Editor

VZCode offers a multiplayer code editing environment that caters to a real-time collaborative development experience. It's the code editor component of VizHub, and can also be used independently from VizHub.

VZCode Interface

Table of Contents

Usage

You can use VZCode as an editor for your current directory if you install it globally with:

npm install -g vzcode

To open it, navigate to the directory of your choice in the terminal, then run

vzcode

A new browser window should automatically pop open with the files in that directory exposed for interactive multiplayer editing.

Note: A known shortcoming of VZCode is that it does not (yet) watch for changes from the file system. VZCode assumes that no other programs are modifying the same files. If another program does modify the same files at the same time, each VZCode auto-save will clobber the changes made by the other program.

To invite others to edit with you in real time, share your IP in your LAN with them to access. You can also expose your VZCode instance publicly using a tunneling service such as NGrok. In fact, if you set your NGROK_TOKEN environment variable, VZCode will automatically connect and log the public URL when it starts.

Development

cd vzcode
npm install
npm run test-interactive

If you're on Windows, you'll also need to do this additional step:

npm install @rollup/rollup-win32-x64-msvc

For local development with hot reloading (for client-side changes only), keep the server running, started by npm run test-interactive, and also in a separate terminal run this:

npm run dev

This will expose http://localhost:5173/ and proxy the requests for data to the server (running on port 3030).

You can also use npm link to set up the vzcode NPM package in another project to point to your clone of the repository. This can be useful when testing out how vzcode functions as a dependency.

Features

Use Cases

Stack

Built using technologies such as:

Goals

The project aims to:

Prior Work

VZCode is inspired by VizHub v2. VizHub V2's code editor supports real-time collaboration using older versions of libraries such as CodeMirror 5 and JSON0 OT. For VZCode, the aim is to leverage the latest technologies to deliver a more streamlined experience.

Prior Work Image

Spaces