All Projects → xuwaters → editor.sh

xuwaters / editor.sh

Licence: MIT license
Yet another live programming environment for collaborative code editing and running.

Programming Languages

typescript
32286 projects
rust
11053 projects
perl
6916 projects
go
31211 projects - #10 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to editor.sh

Actix-Blog
A personal blog powered by rust-lang and actix-web
Stars: ✭ 42 (+44.83%)
Mutual labels:  diesel, actix-web
Webapp.rs
A web application completely written in Rust. 🌍
Stars: ✭ 1,888 (+6410.34%)
Mutual labels:  diesel, actix-web
partner
partner
Stars: ✭ 16 (-44.83%)
Mutual labels:  diesel, actix-web
rust cms
使用Rust编写一个CMS(内容管理系统)可以做为个人博客,公司网站
Stars: ✭ 32 (+10.34%)
Mutual labels:  diesel, actix-web
Operational-Transformation
A collection of Algorithms to Synchronise changes across multiple clients using Operational Transformation
Stars: ✭ 25 (-13.79%)
Mutual labels:  monaco-editor, collaborative-editing
kyte
A single-command CLI for sharing and collaboratively editing a file in real-time
Stars: ✭ 33 (+13.79%)
Mutual labels:  collaborative-editing
go-todo-app
Go + Angular Todo App
Stars: ✭ 21 (-27.59%)
Mutual labels:  gin-gonic
fakerfactory
伪造数据的API服务
Stars: ✭ 53 (+82.76%)
Mutual labels:  gin-gonic
community-events-angular
Community Events App built with ❤️ using Angular, NgRx, Rxjs to do thrill in #hacktoberfest21
Stars: ✭ 20 (-31.03%)
Mutual labels:  ngrx
kanban-project-management
Web Application to manage software development projects.
Stars: ✭ 39 (+34.48%)
Mutual labels:  ngrx
angular-cli-ngrx
Sample Blog app using Angular CLI, Ngrx and Ngrx/Effects
Stars: ✭ 30 (+3.45%)
Mutual labels:  ngrx
geo-smart-system
Open Source Realtime Tracking System
Stars: ✭ 36 (+24.14%)
Mutual labels:  gin-gonic
shellbin
The source code of https://rshell.dev
Stars: ✭ 22 (-24.14%)
Mutual labels:  xterm-js
mech
🦾 Main repository for the Mech programming language. Start here!
Stars: ✭ 135 (+365.52%)
Mutual labels:  live-programming
ngrx-best-practice
No description or website provided.
Stars: ✭ 21 (-27.59%)
Mutual labels:  ngrx
ionic4-ngrx-firebase
A basic application for Ionic 4 with firebase & ngrx actions, reducers and effects
Stars: ✭ 17 (-41.38%)
Mutual labels:  ngrx
website
Official website and document for Gin
Stars: ✭ 88 (+203.45%)
Mutual labels:  gin-gonic
dalted
Image processing web-app for color blindness
Stars: ✭ 17 (-41.38%)
Mutual labels:  actix-web
electron-angular-ngrx
An Angular (6x) Electron seed featuring @angular/cli, @ngrx/platform, and Typescript. Complete with HMR workflow
Stars: ✭ 39 (+34.48%)
Mutual labels:  ngrx
textbus
Textbus 是一个组件化的、数据驱动的富文本框架,支持在线协同编辑,同时也可以作为一个开箱即用的富文本编辑器,拥有非常好的扩展性和可定制性,是构建复杂富文本的不二之选!
Stars: ✭ 642 (+2113.79%)
Mutual labels:  collaborative-editing

YEditor

Yet another live programming environment for collaborative code editing and running.

A complete runnable example about Angular, NgRx, Monaco Editor, Xterm.js, actix-web, Diesel, GraphQL, Gin, Docker.

For a live preview: https://editor.sh

Demo ScreenShots

Collaborative Editing

Database Operation

Bird's-eye View


+--------------+
|    CLIENT    +----------------+
+------+-------+                |
       |                        |
       |                        |
       |                        |
       |                        |
       |                        |
+------v-------+        +-------v-------+                  +-----------------+
|              |        |               |                  |                 |
|  API SERVER  |        |  ROOM SERVER  +------------------>  RUNNER SERVER  |
|              |        |               |                  |                 |
+------+-------+        +-------+-------+                  +--------+--------+
       |                        |                                   |
       |                        |                                   |
       |                        |                                   |
       |                        |                                   |
       +------+                 |                                   |
              |                 |                                   |
              |                 |                                   |
        +-----v------+          |                        +----------v----------+
        |            |          |                        |                     |
        |  DATABASE  <----------+                        |  DOCKER CONTAINERS  |
        |            |                                   |                     |
        +------------+                                   +---------------------+

CLIENT (yeditor_client): Single page application implemented in Angular.

API SERVER (yeditor): Responsible for login, authorization and business logic.

ROOM SERVER (yeditor): Responsible for hosting a live room, synchronizing editing operations and terminal operations among room members.

RUNNER SERVER (yrunner-go): Stateless server for running commands and interactive shell in an isolated environment.

YSCRIPT (yscript): Entrypoint of each docker image, providing a unifined interface for running any language.

How to run

  • Start Client
cd yeditor_client && yarn && yarn start
  • Start Database
# data folder
mkdir -p ./var/database/postgres

# start db
docker run --detach --rm --name postgres \
       -e POSTGRES_PASSWORD=postgres \
       -p 127.0.0.1:5432:5432 \
       -v `pwd`/var/database/postgres:/var/lib/postgresql/data \
       postgres:latest


# create db

echo "create database yeditor;" | \
  docker exec -i -e POSTGRES_PASSWORD=postgres postgres psql -Upostgres

  • Prepare for Building
cargo install diesel_cli
  • Migrate database
cd yeditor && cargo run -- --migration && cd ..

# insert demo pad

echo "insert into pads values (1, 'demo', 1, 'demo', 'unused', '', 'typescript');" | \
  docker exec -i -e POSTGRES_PASSWORD=postgres postgres psql -Upostgres yeditor

  • Build Containers
cd containers && make build && cd ..
  • Start Servers
# start API SERVER
cd yeditor && cargo run

# start RUNNER SERVER
cd yrunner-go && go build -o bin/yrunner && ./bin/yrunner service --config config.yaml --debug

  • Open browser
open http://127.0.0.1:4200/demo

Supported Languages

bash
c
csharp
cpp
clojure
coffeescript
crystal
elixir
erlang
fsharp
go
haskell
java
javascript
kotlin
markdown
mysql
ocaml
objc
php
perl
perl6
plaintext
postgres
python2
python3
r
ruby
rust
scala
swift
typescript
vb

Roadmap

  • Implement CRDT algorithm for collaborative code editing.
  • Separate room server and api server, add a load balancer in front of room server, routing by room_hash.
  • Make room server stateless.
  • Add cache layer for database.
  • Language server integration.

Contribution

Welcome for contributions!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].