GithubHelp home page GithubHelp logo

shiroyk / cowork Goto Github PK

View Code? Open in Web Editor NEW
27.0 2.0 8.0 5.2 MB

Cowork is an online real-time collaborative editing system

HTML 0.36% CSS 1.66% Go 59.23% TypeScript 9.58% Makefile 1.48% Shell 3.95% Rust 23.74%
collaborative-editor crdt echo-framework gin kubernetes spring k8s

cowork's Introduction

Cowork

Cowork is an online real-time collaborative editing system, internal use of Yjs CRDT algorithm.

Architecture

graph TB
classDef pod fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
client([client]) --> ingress
subgraph ingress
    ingress-pod(ingress-pod):::pod
end
subgraph cowork
    subgraph Deployment
        subgraph auth-service
            auth-pod(user-pod):::pod
        end
        subgraph user-service
            user-pod(user-pod):::pod
        end
        subgraph doc-service
            doc-pod(doc-pod):::pod
        end
        subgraph collab-service
            collab-pod(collab-pod):::pod
        end
        subgraph frontend-service
            frontend-pod(frontend-pod):::pod
        end
    end
    subgraph StatefulSet
        subgraph redis-service
            redis-pod(redis-pod):::pod
        end
        subgraph nats-service
            nats-pod(nats-pod):::pod
        end
        subgraph user-db-service
            user-db-pod(user-db-pod):::pod
        end
        subgraph doc-db-service
            doc-db-pod(doc-db-pod):::pod
        end
    end
    user-service --> user-db-service
    auth-service --> user-service
    collab-service --> user-service
    doc-service --> doc-db-service
    collab-service --> doc-service
    doc-service --> nats-service
    auth-service --> redis-service
    collab-service --> redis-service
    collab-service --> nats-service
end
ingress -- api.cowork.local/auth --> auth-service
ingress -- api.cowork.local/users --> user-service
ingress -- api.cowork.local/docs --> doc-service
ingress -- api.cowork.local/collab --> collab-service
ingress -- app.cowork.local --> frontend-service
Loading

Usage

Install dependencies docker, docker-buildx, minikube, kubectl, make and start the minikube

  • build the image
chmod +x ./scripts/*
make
  • start
./scripts/start.sh
  • update hosts, need permission to modify the hosts file.
export INGRESS_IP=$(kubectl get svc -n ingress-nginx ingress-nginx-controller -o=jsonpath='{.spec.clusterIP}')
sudo cat << EOF >> /etc/hosts
$INGRESS_IP api.cowork.local
$INGRESS_IP app.cowork.local
$INGRESS_IP dashboard.cowork.local
EOF
  • waiting all pods start, execute to view the pods status
kubectl get pods -n cowork

open the page

Reference

cowork's People

Contributors

shiroyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cowork's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.