GithubHelp home page GithubHelp logo

Lack in documentation about whitebophir HOT 6 CLOSED

lovasoa avatar lovasoa commented on May 23, 2024
Lack in documentation

from whitebophir.

Comments (6)

lovasoa avatar lovasoa commented on May 23, 2024

Oh, yes, I would love a contribution to the documentation !

Here are the answers to your questions:

How does the data get stored?

The data is stored in json files (one file per board) in the server-data directory

How to delete the whiteboards once created ?

This is currently not possible, on purpose: since there is no user permissions, we don't want a single person to be able to delete the whole whiteboard.
If you have access to the server, you can simply delete the board's json file in server-data/.

Is there an API can access to make changes ?

The communication protocol is socket.io, it is quite simple, but I haven't documented it. The messages are simple json messages in the form :

{
    "board": "board name",
    "data": ...
}

And the data is specific to each tool. For instance, for a rectangle, it is :

{
    "type": "rect",
    "id": "unique id",
    "color": "#71AF32",
    "size": 3,
    "opacity": 0.3,
    "x": x,
    "y": y,
    "x2": x,
    "y2": y
}

You can find the specific format used in each tool directory.

If you have more questions, let me know ! If you want to contribute, you are very welcome !

from whitebophir.

fineman avatar fineman commented on May 23, 2024

So am I right in thinking to deploy this to our own server we should clone the rep, then build a docker image and deploy that to a container? Linux presumably? Happy to contribute some notes on how to do that if I get a few pointers - new to Docker.

from whitebophir.

lovasoa avatar lovasoa commented on May 23, 2024

I should be really simple, when using docker compose.

Clone the repository

git clone [email protected]:lovasoa/whitebophir.git
cd whitebophir

Running the code in a container (safer)

Choose where to persist the data (optional)

You can edit docker-compose.ymlto choose where you want to persist the data

    volumes:
      - /home/ophir/whitebophir/server-data:/opt/app/server-data

Here, I chose to persist the data in /home/ophir/whitebophir/server-data (the directory where I cloned the repo)

Start the service

sudo docker-compose up

This will start wbo on port 80. (You can change the port number in docker-compose.yaml if you want)

from whitebophir.

lovasoa avatar lovasoa commented on May 23, 2024

Running the code without a container

You can alternatively run the code with node directly, without docker :

npm install
npm start

If you do that, the code is running directly on your machine, without any isolation from the other services. Make sure you do not run another sensitive service on the same host.

from whitebophir.

lovasoa avatar lovasoa commented on May 23, 2024

I also pushed the WBO docker image on docker hub for easier usage:
https://hub.docker.com/repository/docker/lovasoa/wbo

from whitebophir.

lovasoa avatar lovasoa commented on May 23, 2024

@petrk94 I would love if you could give feedback on the documentation I wrote in the README. If you see possible improvements, do not hesitate to suggest them !

from whitebophir.

Related Issues (20)

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.