{"id":13700101,"url":"https://github.com/esaracco/wopits","last_synced_at":"2025-05-04T18:34:18.446Z","repository":{"id":60861712,"uuid":"258698504","full_name":"esaracco/wopits","owner":"esaracco","description":"A app for managing projects online using sticky notes to share and collaborate. It uses Swoole as a WebSocket \u0026 Task server.","archived":false,"fork":false,"pushed_at":"2023-04-13T08:20:10.000Z","size":29894,"stargazers_count":16,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-13T06:33:01.488Z","etag":null,"topics":["brainstorming","collaborate","kanban-board","organize","organizer","planning","post-it","project-management","share","sticky-notes","swoole"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/esaracco.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-25T05:54:18.000Z","updated_at":"2024-08-09T05:58:50.000Z","dependencies_parsed_at":"2024-11-18T07:13:27.301Z","dependency_job_id":null,"html_url":"https://github.com/esaracco/wopits","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esaracco%2Fwopits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esaracco%2Fwopits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esaracco%2Fwopits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esaracco%2Fwopits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esaracco","download_url":"https://codeload.github.com/esaracco/wopits/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252382924,"owners_count":21739241,"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":["brainstorming","collaborate","kanban-board","organize","organizer","planning","post-it","project-management","share","sticky-notes","swoole"],"created_at":"2024-08-02T20:00:48.611Z","updated_at":"2025-05-04T18:34:13.402Z","avatar_url":"https://github.com/esaracco.png","language":"JavaScript","funding_links":[],"categories":["Web Applications"],"sub_categories":[],"readme":"wopits - _A world of post-its_\n==============================\n\n**A app for managing projects online using sticky notes to share and collaborate.**\n\nYou can edit several walls of notes at the same time, add attachments, insert images, create relationships etc.\nGroups management makes it possible to finely control the sharing of data, and a chat is available for each wall.\n\n*wopits uses [Swoole](https://www.swoole.co.uk) as a WebSocket \u0026 Task server.*\n\nDOCKER\n------------\nGo to the `docker/` directory, customize the `.env` file, take a look at `docker-compose.yml` and run `docker-compose build` \u0026 `docker-compose up`. Images are not on Docker Hub. The build of the 2 images `wopits_db` (MariaDB database) and `wopits_app` (Apache \u0026 Swoole services) can take a while... be patient :-)\nThe application needs to run on HTTPS. We use a self-signed certificate. Just ignore the browser warning.\n\n\u003e ***Emails will not be sent, and this docker is not intended for production use!***\n\nINSTALLATION\n------------\n\n\u003e You will need `PHP`, `Apache`, `MariaDB` or `PostgreSQL`, and `Swoole` to make it work. In order to retrieve external `JavaScript` and `PHP` modules, you also have to install `npm` and `composer`.\n\n### On the source host\n\nJust clone the Git:\n\n- `git clone git@github.com:esaracco/wopits.git`.\n\n### On the target host\n\nThe following actions have to be done on the machine that will host the wopits website. Which is not necessarily the source machine where you installed the Git repository.\n\n- Install [Swoole](https://github.com/swoole/swoole-src#2-install-from-source-recommended) from the [latest 4.8.x tag](https://github.com/swoole/swoole-src/tags) and activate it for both CLI and Apache. Then tweak `enable_preemptive_scheduler`:\n```ini\nswoole.enable_preemptive_scheduler=On\n```\n- Install `Apache` \u003e= 2.4, `MariaDB` \u003e= 10.3 or `PostgreSQL` \u003e= 11.7 and `PHP` \u003e= 7.3 (with `php-gettext`, `php-mysql`, `php-pgsql`, `php-imagick`, `php-zip` and optionally `php-ldap`). `php-ldap` will be required only if you intend to use LDAP authentication. Similarly, install `php-mysql` or `php-pgsql` depending on the SGBD you want to use.\n- Configure system locales by adding or uncommenting `en_US.UTF-8 UTF-8` and `fr_FR.UTF-8 UTF-8` to `/etc/locale.gen` and running `locale-gen`.\n- Configure Apache by customizing `/app/doc/apache/wopits.domain.com.conf`. Enable `mod_ssl`, `mod_rewrite`, `mod_headers`, `mod_proxy` and `mod_proxy_wstunnel` Apache modules.\n- Configure SSL using Let's Encrypt or whatever Certificate Authority.\n- Create a user and a database (using the `app/db/mysql/wopits-create_db.example.sql` (MariaDB) or `app/db/postgresql/wopits-create_db.example.sh` (PostgreSQL) file after having customize it according to your needs). Then create tables using `app/db/*/wopits-create_tables.sql`:\n\n- With **MariaDB**:\n\n```bash\n$ sudo -uroot mysql \u003c app/db/mysql/wopits-create_db.example.sql\n$ mysql wopits -uwopits -p \u003c app/db/mysql/wopits-create_tables.sql\n```\n- With **PostgreSQL**:\n\nEdit the `pg_hba.conf` like this:\n\n1. According to your need, update:\n\n```bash\n# \"local\" is for Unix domain socket connections only\nlocal   all             all                                     peer\n```\n\n2. to:\n\n```bash\n# \"local\" is for Unix domain socket connections only\nlocal   all             all                                     md5\n```\n\n3. then:\n\n```bash\n$ sudo -upostgres app/db/postgresql/wopits-create_db.example.sh\n$ psql wopits -Uwopits -W \u003c app/db/postgresql/wopits-create_tables.sql\n```\n- If you intend to use wopits Git repository \"as is\" as your Apache DocumentRoot, duplicate `site-config.template.php` in `site-config.php` and customize it.\n\n### Server optimization\n\nFirst of all, install wopits on a decently sized server with at least 16GB of RAM, good bandwidth and high-performance I/O disks.\n\n#### MariaDB / PostgreSQL\n\nIt is important to optimize the SGBD configuration as much as possible. Default settings will give poor results.\n\n#### PHP\n\nEdit PHP configuration file for apache and tweak the `post_max_size`:\n```ini\npost_max_size = 20M\n```\nEdit PHP configuration file for both apache and CLI and remove the memory limit allowed for scripts:\n```ini\nmemory_limit = -1\n```\nor increase it significantly depending on available RAM.\n\nEnable and customize PHP OPcache module for both **apache and CLI** (very important). Here is a common customization:\n\n```ini\nopcache.enable=1\nopcache.enable_cli=1\nopcache.validate_timestamps=0\nopcache.revalidate_freq=60\nopcache.save_comments=0\nopcache.enable_file_override=1\n```\n\nTo allow PHP to use more than 1024 file descriptors and to be more performant at network level, do the following:\n\n- http://socketo.me/docs/deploy#evented-io-extensions\n- https://github.com/andreybolonin/RatchetBundle/blob/master/README.md\n\n 1. Install the `ev` and `event` modules using `pecl`. You will need `libevent-dev`, `php-dev` and `php-pear` in order to install and compile those modules.\n 2. Add to `/etc/security/limits.d/local.conf`:\n```bash\n*               soft    nofile          1000000\n*               hard    nofile          1000000\n```\n 3. Add to `/etc/sysctl.d/local.conf`:\n```bash\nfs.file-max=1000000\n```\n\nBUILD \u0026 DEPLOYMENT\n------------------\n\n\u003e wopits can be used \"as is\" from the Git repository, without any deployment. However, we highly recommend to do this only if you want to contribute! **For production use it is better to deploy it** (local or remote, whatever).\n\n\u003e After each upgrade, check the `BREAKING_CHANGES.md` file.\n\n### WebSocket server\n\nIn order to run the WebSocket server as a daemon you must add it to the startup scripts. Depending on your system, the procedure may vary. We will describe here the basics for **systemd**:\n\n 1. Create a `/var/log/wopits/` directory and give the wopits user full rights on it.\n 2. Create `/etc/systemd/system/wopits-ws.service` (using the `app/doc/systemd/wopits-ws.service` template file).\n 3. Execute `systemctl start wopits-ws` and `systemctl enable wopits-ws`.\n 4. To see the daemon logs, use `journalctl -fu wopits-ws`. To see the WebSocket server logs, open `/var/log/wopits/server-ws.log`.\n\n**Make sure that the WebSocket server daemon's group can write to the `data/` directory** of the wopits DocumentRoot. **It must be the same as the wopits `data/` directory group** (which has been chmoded with 2770).\n\n### Task server\n\nIn order to run the task server as a daemon you must add it to the startup scripts. Depending on your system, the procedure may vary. We will describe here the basics for **systemd**:\n\n 1. Create a `/var/log/wopits/` directory and give the wopits user full rights on it.\n 2. Create `/etc/systemd/system/wopits-task.service` (using the `app/doc/systemd/wopits-task.service` template file).\n 3. Execute `systemctl start wopits-task` and `systemctl enable wopits-task`.\n 4. To see the daemon logs, use `journalctl -fu wopits-task`. To see the Task server logs, open `/var/log/wopits/server-task.log`.\n\n**Make sure that the task server daemon's group can write to the `data/` directory** of the wopits DocumentRoot. **It must be the same as the wopits `data/` directory group** (which has been chmoded with 2770).\n\n### From the Git repository\n\nIf you are using the Git repository as your Apache DocumentRoot without deployment:\n\n- Create a `data/` directory and give the Apache user all rights on it:\n```bash\n# mkdir -p data/{walls,users}\n# chown -R [wopitsUser]:[ApacheUserGroup] data\n# chmod 2770 data\n```\n- Install PHP and JavaScript external modules:\n```bash\n$ npm i --prefix=www/libs\n$ composer update -d app/libs\n```\n\n### Deployment\n\n- Move to `app/deploy/`.\n- Create a new file `config.php` in this directory by duplicating `config.example.php`, and customize it.\n- In order to minify JS, CSS or HTML, you will need to customize the `minifiers` section. Read `config.example.php` for more information.\n- Deploy the application by executing `./deploy -e[yourenv]`. `yourenv` should have been defined in the new `config.php` you just created previously. If the target is located on remote, the SSH user must have full rights on the remote DocumentRoot.\n- The very first time the deployment script has been executed, you will have to log as root and execute the following commands before creating a service for the wopits WebSocket daemon:\n```bash\n# chown -R [wopitsUser]:[wopitsUserGroup] /var/www/wopits.domain.com/\n# cd /var/www/wopits.domain.com/\n# mkdir -p data/{walls,users}\n# chown -R [ApacheUser]:[wopitsUserGroup] data\n# chmod 2770 data\n```\nRight after each deployment you must execute as soon as possible the following post-deployment script **as root**:\n```bash\n# /var/www/wopits.domain.com/app/deploy/bin/post-deploy.php\n```\n\n#### DKIM\n\n\u003e The use of DKIM for sending emails is not mandatory, but highly recommended if your SMTP server does not already manage it.\n\nThe wopits DKIM private key must be placed in `app/dkim/dkim.private`.\nYou can generate a pair of keys using:\n```bash\n$ openssl genrsa -out dkim.private 1024\n$ openssl rsa -in dkim.private -out dkim.public -pubout -outform PEM\n```\nIf you are using wopits as is, without depoyment, you must edit `site-config.php`:\n```php\ndefine ('WPT_USE_DKIM', true);\ndefine ('WPT_DKIM_DOMAIN', 'domain.com');\ndefine ('WPT_DKIM_SELECTOR', 'mail');\n```\nIf you plan to deploy wopits, edit `app/deploy/config.php` and customize the following lines before adding them into your deployment environment settings:\n```php\n'dkim' =\u003e [\n  'domain' =\u003e 'domain.com',\n  'selector' =\u003e 'mail'\n]\n```\n**The following is needed only after the very first deployment, or later if you update your key**:\nCopy your private key in `app/dkim/dkim.private` on the target. Then:\n```bash\n# cd /var/www/wopits.domain.com/\n# chown [ApacheUser]:[wopitsUserGroup] app/dkim/dkim.private\n# chmod 440 app/dkim/dkim.private\n```\n\n### LDAP\n\n\u003e ***Do not forget to install the PHP module `php-ldap`!***\n\nYou can tell wopits to use a LDAP directory for users authentication. In this case, users who are not in your directory will not be able to create a account on your wopits instance.\n\nEdit `app/deploy/config.php` and customize the following lines before adding them into your deployment environment settings:\n```php\n'ldap' =\u003e [\n  'host' =\u003e 'ldaps://ldap.domain.com:636',\n  'binddn' =\u003e 'uid=wopits,ou=sysaccounts,o=domain.com',\n  'bindpw' =\u003e 'ChangeMe',\n  'objectclass' =\u003e 'people',\n  'filter' =\u003e '(memberof=ou=admins,ou=sysaccounts,o=domain.com)',\n  'basedn' =\u003e 'o=domain.com'\n]\n```\n\n#### Synchronize your LDAP users\n\nSynchronization is not required in order to run wopits with LDAP, however it is recommended that you synchronized regularly all your LDAP users. Doing so, they will always be available in full for wall sharing.\n\nAfter deploying wopits, run the script `app/ldap/synchro.php` in order to synchronize LDAP users into the wopits database. The best way to keep your wopits database up to date is to cron this script.\n\n\u003e ***Only run the synchronization script after configuring and deploying wopits!***\n\n### Crons\n\n\u003e ***Do not forget to add wopits crons to crontab!***\n\nCreate a `/var/log/wopits/` directory and customize the following lines before adding them into the wopits user crontab:\n```bash\n1 0 * * * /var/www/wopits.domain.com/app/crons/cleanup.php \u003e\u003e /var/log/wopits/cleanup.log 2\u003e\u00261\n1 0 * * * /var/www/wopits.domain.com/app/crons/check-deadline.php \u003e\u003e /var/log/wopits/check-deadline.log 2\u003e\u00261\n*/15 * * * * /var/www/wopits.domain.com/app/crons/ping.php \u003e\u003e /var/log/wopits/ping.log 2\u003e\u00261\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesaracco%2Fwopits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesaracco%2Fwopits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesaracco%2Fwopits/lists"}