{"id":13473728,"url":"https://github.com/d4l3k/WebSync","last_synced_at":"2025-03-26T19:34:38.423Z","repository":{"id":8957376,"uuid":"10695846","full_name":"d4l3k/WebSync","owner":"d4l3k","description":"WebSync is a document editing tool similar to Google Drive or Office 365.","archived":false,"fork":false,"pushed_at":"2018-04-03T23:58:10.000Z","size":45483,"stargazers_count":301,"open_issues_count":55,"forks_count":68,"subscribers_count":35,"default_branch":"master","last_synced_at":"2024-10-30T06:33:24.420Z","etag":null,"topics":["javascript","ruby","websync"],"latest_commit_sha":null,"homepage":"https://websyn.ca","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d4l3k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-14T19:07:04.000Z","updated_at":"2024-01-30T19:51:06.000Z","dependencies_parsed_at":"2022-09-01T13:50:48.012Z","dependency_job_id":null,"html_url":"https://github.com/d4l3k/WebSync","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4l3k%2FWebSync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4l3k%2FWebSync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4l3k%2FWebSync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4l3k%2FWebSync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d4l3k","download_url":"https://codeload.github.com/d4l3k/WebSync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245605728,"owners_count":20643030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","ruby","websync"],"created_at":"2024-07-31T16:01:06.280Z","updated_at":"2025-03-26T19:34:38.384Z","avatar_url":"https://github.com/d4l3k.png","language":"JavaScript","readme":"# [![WebSync](https://github.com/d4l3k/WebSync/raw/master/public/img/logo-github.png)](https://websyn.ca)\nWebSync is a document editing tool similar to Google Drive or Microsoft Skydrive.\n\n[![Priority Issues](https://badge.waffle.io/d4l3k/WebSync.png?label=ready\u0026title=Issues)](https://waffle.io/d4l3k/WebSync)\n[![Idea Issues](https://badge.waffle.io/d4l3k/WebSync.png?label=Low%20Priority\u0026title=Ideas)](https://waffle.io/d4l3k/WebSync)\n[![Build Status](https://travis-ci.org/d4l3k/WebSync.svg?branch=master)](https://travis-ci.org/d4l3k/WebSync)\n[![Gem Status](https://img.shields.io/gemnasium/d4l3k/WebSync.svg?style=flat)](https://gemnasium.com/d4l3k/WebSync)\n[![Code Climate](https://img.shields.io/codeclimate/github/d4l3k/WebSync.svg?style=flat)](https://codeclimate.com/github/d4l3k/WebSync)\n[![Codacy Badge](https://img.shields.io/codacy/3eb607d1abb0496ea3e28b898b267685.svg?style=flat)](https://www.codacy.com/public/rice/WebSync)\n[![Ruby Documentation Coverage](http://inch-ci.org/github/d4l3k/WebSync.svg?branch=master\u0026style=flat)](http://inch-ci.org/github/d4l3k/WebSync)\n[![Join the chat at https://gitter.im/d4l3k/WebSync](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/d4l3k/WebSync?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n\n# Features\n[WebSyn.ca](https://websyn.ca) has a more up to date list of features. These might be incomplete:\n\n* End-to-End Encryption powered by OpenPGP.\n* Multi-user editing\n* Notebook, Document, Spreadsheet, and Presentation editing and viewing.\n* Document sharing\n* Tables and Charts\n* Resizable Images \u0026 Tables\n* User support\n    - Icons and display names via Gravatar.\n* In document chat between users\n* Revert changes to edited documents\n* Persistent JSON object synced between clients\n* Open source\n* Self Hostable\n\n\n# Dependencies\n* WebSync requires Ruby, and Node.JS\n* WebSync uses PostgreSQL for datastorage and redis for temporary data \u0026 pub/sub capabilities.\n* Libre Office, unoconv and poppler is required for file upload \u0026 download.\n* You probably need Java for the Closure javascript compressor (send me a message if it works without it).\n\n[Ruby Version Manager](https://rvm.io/) is a great tool for handling multiple versions of Ruby. WebSync is automatically tested against Ruby 2.0.0 and Ruby 2.1.2.\n\nIn addition to the previously mentioned dependencies, some global dependencies are needed as well.\n```\ngem install rubygems-bundler\n\nsudo npm install -g bower\nsudo npm install -g grunt-cli\nsudo npm install -g pm2\n```\n\nTo install project local dependencies for Ruby, Node.JS and bower, just run:\n```\nbundle install\nnpm install\nbower install\n```\n\nSome things (like databases and initial javascript assets) can be configured in \"config.json\" but a majority will require source changes.\n\n# Development Instance\nOnce the dependencies are installed and running, you should be able to run a development server by running:\n```\nrackup\nbin/backend.js\n```\nThis launches the main site on port 9292 and the web socket server on 4568.\n\nTo add an admin type:\n```\nrake \"admin:add[sample@sample.com]\"\n```\nand to remove:\n```\nrake \"admin:remove[sample@sample.com]\"\n```\n\nOnce the site is running you need to go into the admin panel and configure the script groups. Most of these are preconfigured from `config.json`\n\n# Configuration\nThe configuration files are located in the `config` folder. Most of the configuration options are located in `config.json`. This configures the database connections and assets.\n\n## OAuth\nWebSync uses [OmniAuth](https://github.com/intridea/omniauth) for authenticating against other resources. OmniAuth provides an easy way to authenticate against dozens of outside services. The only ones that are packaged with WebSync are Facebook and Google, but it's fairly easy to add new ones. To use OAuth with any of these services you need to acquire API keys and add them on the command line. For example:\n```\nGPLUS_KEY=\"kasdlflasdfasdf.apps.googleusercontent.com\" GPLUS_SECRET=\"jfasdjl923n3n\" unicorn ...\n```\nThe built in options are `GPLUS_KEY`, `GPLUS_SECRET`, `FACEBOOK_KEY` and `FACEBOOK_SECRET`.\n\nThe OmniAuth providers are defined in `config/omniauth-providers.rb`. A list of available providers can be viewed on the [OmniAuth Wiki](https://github.com/intridea/omniauth/wiki/List-of-Strategies). To enable a provider you need to add the gem (eg. `omniauth-facebook`) to the `Gemfile` and configure in `config/omniauth-providers.rb` as follows. This is the Facebook provider configuration:\n\n```ruby\n# OmniAuth configuration:\nprovider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET']\n\n# WebSync styling:\n# style \u003cprovider\u003e, \u003cbutton color\u003e, \u003cbutton label\u003e\nstyle    :facebook, \"#3b5998\", \"Facebook\"\n\n```\n\n# Production\n## Docker\n[Docker](http://www.docker.io/) is a lightweight Linux container tool that allows for easy deployment. The first step is to install by following the instructions on Docker's site. I've had issues with the Ubuntu Docker image on Digital Ocean (for some reason you couldn't access /src) and because of it WebSyn.ca doesn't use it anymore. The Docker images on Digital Ocean are out of date.\n\nSecond, modify `WebSync/config/personal-docker/config.json` with the production database information. The WebSync container does not include any databases. You need to configure Redis and PostgreSQL seperately.\n\nThen you need to build the docker container with your changes. There are a few helper scripts in the `personal-docker` folder. To pull the `d4l3k/WebSync:latest` image and build your configuration:\n```\nsudo ./build.sh\n```\nYou can then launch WebSync by running:\n```\nsudo ./run.sh websync-start\n```\nOr, enter an interactive shell by running:\n```\nsudo ./run.sh bash\n```\n\n## Manual\nThe production environment is currently setup for use with https://websyn.ca but should be fairly straight forward to set up with anything else.\n\nIn production, WebSync loads static asset files and documentation. These need to be compiled by running the following. Warning: This may take a long time.\n```\nrake assets:precompile\n```\nTo clean them up:\n```\nrake assets:clean\n```\n### Front End\nYou have two options for the front end, Unicorn and Thin.\n\n##### Unicorn\nThe WebSync Docker container uses Unicorn because it's faster and uses Unix sockets so there is only one exposed port.\n\nYou can launch Unicorn on port 4569 by running:\n```\nunicorn -c config/unicorn.rb\n```\n\n##### Thin\nThe configuration for the front end is located in `thin.yaml` and by default launches 4 workers on ports 3000-3003. NOTE: There is no built in load balancer for the front end. You should use something like haproxy or nginx to balance between the worker threads.\n\nYou can launch the front end by running:\n```\nthin start -C config/thin.yaml\n```\n\n### Backend\nFor the backend, it's recommended you install [pm2](https://github.com/Unitech/pm2) (`npm install -g pm2`) and run the command:\n```\npm2 start bin/backend.js -i 4\n```\nwhich launches four worker threads that all listen on port 4568.\n\nIf you want to avoid pm2, you can just run `bin/backend.js` or `node node/backend.js` to get a single worker on port 4568.\n## Troubleshooting\n\n```\nrake aborted!\nLoadError: cannot load such file -- sprockets/sass/importer\n```\nIf you get the above error, or something similar, make sure you've installed the proper dependencies by running `bundle`. If the problem persists, try prefixing commands with `bundle exec ...`.\n\nTo make `bundle exec` unneeded please see https://rvm.io/integration/bundler\n\n# Contributing\n\n## TODO\nWebSync uses [Waffle.IO](https://waffle.io/d4l3k/WebSync) for issues. Waffle.IO is just a nice way of organizing the [GitHub issues](https://github.com/d4l3k/WebSync/issues) and you can just look at those instead.\n\n\n## Source Documentation\n[WebSync Annotated Source Documentation](https://websyn.ca/documentation)\n\n[JavaScript Documentation](https://websyn.ca/documentation/jsdoc/WebSync/0.1.0/index.html)\n\n[Ruby Documentation](https://websyn.ca/documentation/yard/frames.html)\n\nTo generate the documentation you can run `rake documentation` or `rake assets:precompile`. Every WebSync server has the documentation available at `http://\u003cserver\u003e:\u003cport\u003e/documentation`, assuming it has been generated. All production servers will have the documentation.\n\nHere's a pretty graph of the setup on WebSyn.ca that I made for a talk.\n![WebSync](https://i.imgur.com/eE3UNxS.png)\n\n\nLicense\n----\nCopyright (c) 2015 [Tristan Rice](https://fn.lc)\n\nWebSync is licensed under the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["JavaScript","javascript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd4l3k%2FWebSync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd4l3k%2FWebSync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd4l3k%2FWebSync/lists"}