Reorganized Docs. In Progress.

This commit is contained in:
Lauri Ojansivu 2024-06-27 11:08:43 +03:00
parent 1961e22cbd
commit ce89ff4833
202 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,91 @@
# Also see Snap Developer Docs
[Snap Developer Docs](https://github.com/wekan/wekan-snap/wiki/Snap-Developer-Docs)
# When adding settings to code you or somebody else wrote
Add all necessary settings that you find on code.
After doing all changes, [fix lint errors](Developer-Documentation#preventing-travis-ci-lint-errors-before-submitting-pull-requests) and if possible warnings too. You can silence errors if you really can't find solution.
Submit pull request to Wekan edge branch https://github.com/wekan/wekan/tree/edge
# Changes to server code
To use environment variables in your serverside code, use:
```
process.env.YOURSETTING
```
Example: [wekan/server/policy.js](https://github.com/wekan/wekan/blob/edge/server/policy.js)
# Changes to [config](https://github.com/wekan/wekan/blob/edge/snap-src/bin/config)
## 1) Add to beginning
At beginning there is this line:
```
# list of supported keys
keys="MONGODB_BIND_UNIX_SOCKET MONGODB_BIND_IP ..."
```
To the end of it, add name of new setting. For example:
```
keys="... AWESOME_FEATURE_ENABLED"
```
## 2) Add to bottom
Example 1: Set features not enabled as default.
```
DESCRIPTION_LDAP_ENABLED="LDAP enabled. Default: false"
DEFAULT_LDAP_ENABLED="false"
KEY_LDAP_ENABLED="ldap-enabled"
```
Example 2: If setting is different for every server, leave it empty.
```
DESCRIPTION_OAUTH2_TOKEN_ENDPOINT="OAuth2 token endpoint. Example: /oauth/token"
DEFAULT_OAUTH2_TOKEN_ENDPOINT=""
KEY_OAUTH2_TOKEN_ENDPOINT="oauth2-token-endpoint"
```
Example 3: If there is same for every server, set it to general setting.
```
DESCRIPTION_LDAP_SEARCH_FILTER="LDAP search filter. Default: (&(objectCategory=person)(objectClass=user)(!(cn=andy)))"
DEFAULT_LDAP_SEARCH_FILTER="(&(objectCategory=person)(objectClass=user)(!(cn=andy)))"
KEY_LDAP_ENABLED="ldap-enabled"
```
Example 4: If you don't know example, leave it without example.
```
DESCRIPTION_TURBO_FILTER="Turbo filter. Default: ''"
DEFAULT_TURBO_FILTER=""
KEY_TURBO_FILTER="turbo-filter"
```
# Changes to [Snap help](https://github.com/wekan/wekan/blob/edge/snap-src/bin/wekan-help)
## 1) How to quote examples
Snap settings need to be lowercase, and inside single quotes. For example:
```
snap set wekan ldap-user-search-filter='(&(objectCategory=person)(objectClass=user)(!(cn=andy)))'
```
The setting inside single quotes is the actual setting.
Actual settings can include double quotes, spaces, etc, but not single quotes. For example:
```
snap set wekan ldap-user-search-filter='"(&(objectCategory=person)(objectClass=user)(!(cn=andy)))"'
```
## 2) What to add as setting to Wekan help
Example 1:
```
echo -e "OAuth2 Token Endpoint. Example: /oauth/token"
echo -e "To enable the OAuth2 Token Endpoint of Wekan:"
echo -e "\t$ snap set $SNAP_NAME OAUTH2_TOKEN_ENDPOINT='/oauth/token'"
echo -e "\t-Disable the OAuth2 Token Endpoint of Wekan:"
echo -e "\t$ snap set $SNAP_NAME OAUTH2_TOKEN_ENDPOINT=''"
echo -e "\n"
```
So all you add need to be above of this line:
```
# parse config file for supported settings keys
```

View file

@ -0,0 +1,3 @@
- https://www.sitepoint.com/javascript-async-await/
- https://www.freecodecamp.org/news/javascript-async-await-tutorial-learn-callbacks-promises-async-await-by-making-icecream/
- https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous

View file

@ -0,0 +1,115 @@
## Maximum Call Stack Size Exceeded
https://github.com/wekan/wekan/issues?q=is%3Aissue+maximum+call+stack+is%3Aclosed
https://stackoverflow.com/questions/75869629/ios-websocket-close-and-error-events-not-firing
This can happen, when there is too much or incompatible code at browserside, for example at iOS Safari.
To fix it:
1. Move ExcelJS from browserside to run at serverside https://github.com/wekan/wekan/pull/3871
2. Use Bundle Visualizer to see what is the size of dependencies, and try what can be moved to serverside like at step 1, that bundle visualizer is used in this script https://github.com/wekan/wekan/blob/main/rebuild-wekan.sh
```
meteor run --exclude-archs web.browser.legacy,web.cordova --port 4000 --extra-packages bundle-visualizer --production 2>&1 | tee ../log.txt
```
3. Make dependencies smaller. For example, use only required files, and do not include all dependencies: https://github.com/wekan/wekan/commit/23e5e1e3bd081699ce39ce5887db7e612616014d . In that commit, package was forked to packages directory, then renamed, and added with `meteor add packagename`, where package name does not have character `:`
4. Use Browserstack.com to see errors at browser / inspect / console, or use iOS or other device emulators, to see error messages. Testing at real device is more important, because they could work differently than emulators, emulators sometimes do not emulate all same features. Those error messages have file where error happened, and line number, like `something.js:301` . From there, scroll up a little, look at what function or what package dependency it is where it happened. If possible, try to move that package serverside, like at step 1. Or alternatively, look is it possible to remove or change to some other compatible dependency.
5. See what are the dependencies at your Meteor based software, compared to WeKan dependencies that are usually already upgraded to newest Meteor, is there any differences where changing to correct dependencies could help you to upgrade to newest Meteor:
- https://github.com/wekan/wekan/blob/main/package.json
- https://github.com/wekan/wekan/blob/main/.meteor/packages
- https://github.com/wekan/wekan/blob/main/.meteor/versions
- https://github.com/wekan/wekan/blob/main/.meteor/release
5. If you get some errors, search are those same already fixed in WeKan/Meteor/RocketChat, could you fix them same way:
- https://github.com/wekan/wekan/blob/main/CHANGELOG.md
- https://github.com/wekan/wekan/issues
- https://github.com/wekan/wekan/issues?q=is%3Aissue+is%3Aclosed
- https://github.com/meteor/meteor/issues
- https://github.com/meteor/meteor/issues?q=is%3Aissue+is%3Aclosed
- https://github.com/RocketChat/Rocket.Chat/issues
- https://github.com/RocketChat/Rocket.Chat/issues?q=is%3Aissue+is%3Aclosed
6. If you have some webserver providing SSL/TLS, check that you have websockets enabled:
- https://github.com/wekan/wekan/wiki/Caddy-Webserver-Config
- https://github.com/wekan/wekan/wiki/Nginx-Webserver-Config
- https://github.com/wekan/wekan/wiki/Apache
- OpenLiteSpeed https://github.com/wekan/wekan/issues/3334#issuecomment-723651328
- https://github.com/wekan/wekan/wiki/Local-self-signed-TLS
- https://github.com/wekan/wekan/wiki/Traefik-and-self-signed-SSL-certs
## OLD: TODO
[Quote from advise](https://github.com/meteor/meteor/issues/9796#issuecomment-443520767):
> Identify the core service your app is providing and make sure it is running independently. Put everything non-critical, including reporting, on some other system.
[Look at scaling tips here](https://github.com/meteor/meteor/issues/9796#issuecomment-411373831), quote:
> smeijer commented 25 days ago
> Just wanted to let know that I haven't experienced this issue anymore since I've replaced a lot of `meteor publications` with `apollo/graphql requests`.
>
> The reactivity is thereby lost, but in my case a 30sec poll is also fine. On the places that I do require reactivity, I only `publish` a single `timestamp`. This timestamp is passed through to `apollo`, which triggers a `refetch` when the timestamp is changed.
>
> The [discussion here](https://forums.meteor.com/t/implementing-livedocument-as-an-alternative-to-livequery-discussion/40152) has also been helpfull to improve performance here and there.
[Rocket.Chat scaling tips](https://rocket.chat/docs/installation/manual-installation/multiple-instances-to-improve-performance/)
## Kadira
- https://github.com/edemaine/kadira-compose
- https://github.com/meteor/meteor-apm-agent
- https://github.com/kadira-open/kadira-server
- https://www.gethappyboards.com/2017/07/rolling-out-your-own-instance-of-kadira/
## Finding memory leaks
**[Collect a heap profile and then analyze it](https://github.com/v8/sampling-heap-profiler)**
[Older article: How to Self Detect a Memory Leak in Node](https://www.nearform.com/blog/self-detect-memory-leak-node/)
## 100% CPU usage
1) Increase ulimit system wide to 100 000 in systemd config.
2) Wekan Javascript code has [increaded fiber poolsize](https://github.com/wekan/wekan/blob/main/server/authentication.js#L5-L9).
3) There is [on-going 100% CPU usage Meteor issue](https://github.com/meteor/meteor/issues/9796#issuecomment-400079380) and hopefully [fixes to Node.js will land in Node v8.12](https://github.com/nodejs/node/pull/21593#issuecomment-403636667) sometime. Node 8.12 is now released and official version included at Wekan.
## Scaling to thousands of users
[Production setup at AWS](AWS)
## Current versions of dependencies
[Dockerfile](https://github.com/wekan/wekan/blob/main/Dockerfile), versions of Meteor.js, Node etc listed at beginning.
[Included Meteor packages](https://github.com/wekan/wekan/blob/main/.meteor/packages)
[Included Meteor package versions](https://github.com/wekan/wekan/blob/main/.meteor/versions)
[Added packages at package.json](https://github.com/wekan/wekan/blob/main/package.json)
## Build from source
Wekan:
- On any x64 hardware that has Ubuntu 14.04 or Debian 9 or newer installed directly or in VM:
[Build from source scripts](https://github.com/wekan/wekan-maintainer/tree/master/virtualbox)
Wekan for Sandstorm:
- Install above Wekan from source
- Install [Sandstorm locally](https://sandstorm.io/install) with `curl https://install.sandstorm.io | bash`, select dev install
- Install [meteor-spk](https://github.com/sandstorm-io/meteor-spk)
- Get 100% CPU issue fibers fixed node, and copy it to spk directory:<br />
`wget https://releases.wekan.team/node`<br />
`chmod +x node`<br />
`mv node ~/projects/meteor-spk/meteor-spk-0.4.0/meteor-spk.deps/bin/`
- Add to your /home/username/.bashrc : <br /> `export PATH=$PATH:$HOME/projects/meteor-spk/meteor-spk-0.4.0`
- Close and open your terminal, or read settings from .bashrc with<br />`source ~/.bashrc`
- `cd wekan && meteor-spk dev`
- Then Wekan will be visible at local sandstorm at http://local.sandstorm.io:6080/
- Sandstorm commands: `sudo sandstorm`. [Release scripts](https://github.com/wekan/wekan-maintainer/tree/master/releases). Official releases require publishing key that only xet7 has.
Docker:
- `git clone https://github.com/wekan/wekan`
- `cd wekan`
- Edit docker-compose.yml script ROOT_URL etc like documented at https://github.com/wekan/wekan-mongodb docker-compose.yml script
- `docker-compose up -d --build`

View file

@ -0,0 +1,136 @@
## WeKan Interview 2023-12-08 starts at 22min 22sec
https://www.youtube.com/watch?v=ke-mbnZM3zE
## Screenshot of Meteor WeKan
<img src="https://wekan.github.io/wekan-dark-mode.png" width="100%" alt="Meteor WeKan screenshot" />
## Description of Meteor WeKan
- WeKan Open Source kanban with MIT license.
- Translated to 70+ languages https://explore.transifex.com/wekan/wekan/
- Used in most countries of the world https://snapcraft.io/wekan
- Biggest user have about 30k users, using many pods at Kubernetes
- Changelog https://github.com/wekan/wekan/blob/main/CHANGELOG.md
- Commercial Support at https://wekan.team/commercial-support/ . Currently looking who could sponsor more of maintenance and development.
## How much effort to create Meteor WeKan, in COCOMO model
- WeKan 134k lines of code: 34 years of effort, 316 contributors https://openhub.net/p/wekan
- Meteor.js, 224k lines of code: 59 years of effort, 819 contributors https://openhub.net/p/meteor-js
- Since December 2016, WeKan maintainer https://github.com/xet7 :
- has added and removed about 4M lines of code https://github.com/wekan/wekan/graphs/contributors
- https://openhub.net/accounts/xet7
## Meteor WeKan Browser support
- Javascript enabled Desktop and Mobile Safari/Chromium/Firefox based browsers
- Apps at Play Store, Windows Microsoft Store, Ubuntu Touch OpenStore https://github.com/wekan/wekan/wiki/Browser-compatibility-matrix
- Alternatively, for self-hosted WeKan, create PWA icon https://github.com/wekan/wekan/wiki/PWA
- Using WeKan with big touchscreen https://github.com/wekan/wekan/wiki/Touch-Screen-support
## Meteor WeKan Server
- Meteor.js 2.x, Node.js 14.x https://github.com/wekan/node-v14-esm/releases/tag/v14.21.4 , MongoDB 6.x
- CPU: amd64, arm64, s390x, Source Bundle at https://github.com/wekan/wekan/wiki/Raspberry-Pi
- Windows On-Premise: https://github.com/wekan/wekan/wiki/Offline
- Mac: Docker, or at https://github.com/wekan/wekan/wiki/Mac
- Newest at platforms: Source Bundle, Snap Candidate, Docker, Kubernetes https://wekan.github.io
- Platforms that will be updated to be up-to-date: Snap Stable, Sandstorm, UCS https://wekan.github.io
## Meteor WeKan Features
- [WeKan Design Principles](https://github.com/wekan/wekan/wiki/Design-Principles)
- Realtime UI. When someone makes change, like drag card or add text, everyone will see changes immediately. This is because Meteor listens to MongoDB change stream, and updates UI. For some rare cases, there needs to be reload of page, those need to be fixed.
- Whitelabel: Change product name and product image at login screen and board left top corner. Not changing favicon, because there are 100+ favicons for different devices.
- Drag Drop at Desktop and Mobile:
- Board Icons, Swimlanes, Lists, Cards, Checklists, Checklist Items
- Drag handles, per screen https://github.com/wekan/wekan/wiki/Drag-Drop
- Some features similar to Trello and Jira. Some features not in Trello and Jira.
- IFTTT Rules like Trello Butler https://github.com/wekan/wekan/wiki/IFTTT , translated to all supported languages. Trello Butler is only In English.
- Many Assignees like in Jira.
- Change background image and Card Cover. Change Theme. Change color of Boards, Swimlane, List, Card, Label.
- Markdown at: Board name and description, Swimlane, List, Card title and description, Checklist and Checklist Item, Subtask title, https://github.com/wekan/wekan/wiki/Wekan-Markdown
- Emoji https://github.com/wekan/wekan/wiki/Emoji
- MathML
- Preview card attachment image and PDF
- Show Start at End Dates of card at Calendar of Swimlanes/Lists/Calendar dropdown menu
- Custom Fields https://github.com/wekan/wekan/wiki/Custom-Fields
- Subtasks https://github.com/wekan/wekan/wiki/Subtasks
- Planning Poker / Scrum Poker at Card https://github.com/wekan/wekan/wiki/Planning-Poker . No other card games yet ;)
- For board actions, like move card etc, Per Board and Global Outgoing and 2-way webhooks to Chat (RocketChat, Slack, Discord etc), NodeRED, or PHP webhook receiver like https://github.com/wekan/webhook
- At top right username menu:
- Search All Boards, with search options
- Public Boards. Board can be set private or public. At Admin Panel is option to disable public boards, so all boards are private.
- Change Language
- My Cards and Due Cards: Show cards where you are member or assignee, from all boards
- At top of current board:
- Filter cards, by user etc
- Multi-Selection, checkmark and drag many cards at once
- Sort current board
- Python and PHP based additional features https://github.com/wekan/wekan/wiki/Python
- Admin Panel:
- Organizations/Teams/People. Impersonate User, logged to database when someone uses that feature.
- Customize Translations https://github.com/wekan/wekan/wiki/Customize-Translations
## Technical details
- Reactive Cache
- mfilser tested speed improvement for half a year, and finally made huge PR to WeKan v7.00 to make all of WeKan use Reactive cache https://github.com/wekan/wekan/pull/5014
- Reactive Cache Repo https://github.com/wekan/meteor-reactive-cache , xet7 updated dependencies
- Big performance improvements https://github.com/wekan/wekan/issues/5000
- Using same style of API for client and serverside
- Use more ReactiveCache than MiniMongo
- Optimizing and Debugging Meteor, reducing size, links to WeKan dependencies https://github.com/wekan/wekan/wiki/Debugging
- Custom OIDC/OAuth2 login
- Repo https://github.com/wekan/wekan/tree/main/packages/wekan-oidc
- Features:
- At Admin Panel, you can change text of login page button `Login with OIDC`
- Auth0 https://github.com/wekan/wekan/wiki/OAuth2#auth0 . This did take about half year to implement by xet7, was not available anywhere else for Meteor.
- Oracle OIM. https://github.com/wekan/wekan/wiki/Oracle-OIM . For this, customer provided some code. xet7 added fix to make login work even when some login field was missing data, by taking data from other field, all this while xet7 did not have access to customers Oracle OIM, just guessing about what code to add, and it worked.
- GitLab https://github.com/wekan/wekan/wiki/OAuth2#gitlab-providing-oauth2-login-to-wekan
- RocketChat https://github.com/wekan/wekan/wiki/OAuth2#rocketchat-providing-oauth2-login-to-wekan
- Nextcloud https://github.com/wekan/wekan/wiki/Nextcloud
- ADFS 4.0 using OAuth2 and OpenID https://github.com/wekan/wekan/wiki/ADFS
- Azure https://github.com/wekan/wekan/wiki/Azure
- Keycloak https://github.com/wekan/wekan/wiki/Keycloak
- Google login https://github.com/wekan/wekan/wiki/Google-login
- Custom LDAP
- LDAP https://github.com/wekan/wekan/wiki/LDAP
- LDAP AD Simple Auth https://github.com/wekan/wekan/wiki/LDAP-AD-Simple-Auth
- Default board for users https://github.com/wekan/wekan/pull/5098
- Brute Force Accounts Lockout https://github.com/wekan/wekan/wiki/Accounts-Lockout
- Markdown, Emoji, MathML, sanitizing https://github.com/wekan/wekan/blob/main/packages/markdown/src/template-integration.js
- Many security fixes from Responsible Disclosure https://wekan.github.io/hall-of-fame/
## Upcoming Features
- CAS https://github.com/wekan/wekan/wiki/CAS
- SAML https://github.com/wekan/wekan/wiki/SAML
## Video
- Creator of WeKan, mquandalle (Maxime Quandalle) https://www.youtube.com/watch?v=N3iMLwCNOro
- https://github.com/wekan/wekan/wiki/FAQ#what-was-wekan-fork--wefork
- Maintainer of WeKan since December 2016, xet7 (Lauri Ojansivu), about WeKan Multiverse at EU NGI Dapsi https://www.youtube.com/watch?v=BPPjiZHVeyM . More about Multiverse at https://github.com/wekan/wekan/wiki/WeKan-Multiverse-Roadmap
## Maybe?
- https://github.com/frozeman/meteor-persistent-minimongo2
## Upcoming upgrades to Meteor 3.0
- This Week in MeteorJS: 22 September 2023 https://www.youtube.com/watch?v=UWVL1xUP9r0
- There Jan Dvorak IV https://github.com/StorytellerCZ commented chat: "We should do deep dive into WeKan!"
- So here is The Deep Dive!
- Questions for upcoming "This Week in MeteorJS", some already mentioned to be upcoming:
- How to upgrade dependencies to Meteor 3.0 ? Some answer was to mention Meteor version at package dependency:
<img src="https://wekan.github.io/upgrade-meteor3-new.png" width="100%" alt="Meteor 3.0 upgrading dependencies" />
- But what if adding dependency adds some more error messages? Probably that depends on error message, like here when
trying to upgrade to Meteor 3.0 alpha 15: https://github.com/wekan/wekan/issues/5142
- https://forums.meteor.com/t/my-journey-towards-meteor-3-0/60001/23
- https://github.com/bratelefant/Meteor-Files
- https://github.com/bratelefant/meteor-roles
- https://github.com/bratelefant/meteor-multitenancy

View file

@ -0,0 +1,23 @@
## WeKan Design Principles
- Prevent messing up something https://github.com/wekan/wekan/wiki/Monkey-Proof-Software
- Original WeKan Design, that WeKan currently has: Intuitive, easy to figure out, polished UI/UX, menu options are there where you would expect then to be. Try to fix anything unexpected. New features added there where it makes most sense. And not so many duplicate menus and texts like Trello.
- Not the exact design of Trello https://github.com/wekan/wekan/wiki/FAQ#why-does-wekan-look-so-different-now-compared-to--v09 . Also not the exact design of any other software. But note that design of all software changes often, when they are in active development.
- Some features like Trello:
- Import from Trello
- Shortcuts https://github.com/wekan/wekan/issues/1878
- IFTTT Rules like Trello Butler https://github.com/wekan/wekan/wiki/IFTTT
- Progress bar of checklist
- Some features like Jira:
- Multiple assignees
- Some features not in Trello, like:
- FOSS with MIT license
- Self-hosting
- Swimlanes
- All the use cases of WeKan feature/fix contributors
- Cross-platform. Support many CPU/OS/Browsers for Desktop and Mobile. Add support for more.
- https://github.com/wekan/wekan/wiki/Browser-compatibility-matrix
- https://github.com/wekan/wekan/wiki/PWA
- https://github.com/wekan/wekan/wiki/Offline
- https://github.com/wekan/wekan/wiki/Mac
- https://github.com/wekan/wekan/wiki/Raspberry-Pi

View file

@ -0,0 +1,106 @@
# Style guide
We follow the [meteor style guide](https://guide.meteor.com/code-style.html#javascript).
Please read the meteor style guide before making any significant contribution.
# Stories about how Wekan works, and developing Wekan
- https://www.mongodb.com/docs/drivers/node/v3.7/fundamentals/promises/
- [Do not use code formatters like Prettier and ESLint](https://github.com/wekan/wekan/pull/4633#issuecomment-1214214591)
- [How realtime board updates work](https://github.com/wekan/wekan/issues/3788#issuecomment-834649553)
- [Mobile Web interface](https://github.com/wekan/wekan/issues/3566#issuecomment-778700604)
- [How to add RTL support](https://github.com/wekan/wekan/issues/3376#issuecomment-766092425)
- [How to code Part 1](https://blog.wekan.team/2019/04/howto-code-part-1-learning-to-learn/)
- [First time Wekan contributor easily figures out Wekan and develops big features](https://blog.wekan.team/2018/05/wekan-v1-00-released/)
- [Benefits of contributing your features to upstream Wekan](https://blog.wekan.team/2018/02/benefits-of-contributing-your-features-to-upstream-wekan/)
- [Excellent example how pull requests are improved and integrated, and not needed commits removed](https://github.com/wekan/wekan/pull/1470)
- [How to add dependency](https://github.com/wekan/wekan/discussions/5235)
- [How to add set default view feature](https://github.com/wekan/wekan/discussions/5233)
- [Adding SVG image](https://github.com/wekan/wekan/discussions/5211#discussioncomment-7765365)
## Building code and submitting pull request
- [Building code and submitting pull request](emoji#how-you-could-add-another-plugin)
- When you start `meteor` command, it watches for changes to files in wekan directory and subdirectories, and if it detects changed code, it starts rebuilding bundle and then reloads webbrowser after that automatically
- Also look at meteor changelog mentioned new feature `hot reload` how that could make reloading faster
## VSCode / VSCodium
- I use [VSCodium](https://vscodium.com) that has MS tracking code removed
- Plugin Prettier for right click format javascript code with prettier
- There could be other plugins for Meteor, Jade, Stylus, Dockerfile, etc
## Finding code
There is find.sh script that ignores generated directories, finds code in subdirectories, and paginates with less. For example, finding how search cards is implemented:
```
cd wekan
./find.sh js-search
```
When you run this, you see .jade template files where is search input box, and .js files where is the search code. CSS is in .styl files.
## Getting Started
- Currently Wekan development is done mainly at Ubuntu 20.10 64bit, but building Wekan does work on any Debian, Ubuntu, WSL Ubuntu 20.04, [Mac](Mac). Sametime maybe on [Windows](Windows) with `choco install -y meteor` and installing packages it then asks for with `meteor add ...` or `meteor npm install --save ...` and then running meteor again.
- Look through old [pull requests](https://github.com/wekan/wekan/pulls)
- Read Wekan source code, you can use some git history viewer GUI like gitk
- Read [Meteor documentation](https://docs.meteor.com/) for [Meteor version](https://github.com/wekan/wekan/blob/main/.meteor/release) in use, other versions mentioned at [Dockerfile](https://github.com/wekan/wekan/blob/main/Dockerfile)
- Docker up-to-date way: You can clone wekan/wekan repo and update docker-compose.yml file ROOT_URL etc as documented at https://github.com/wekan/wekan-mongodb commented docker-compose.yml file, install docker, and build from source with docker with "docker-compose up -d --build"
- Docker not up-to-date way: [Docker environment for Wekan development](https://github.com/wekan/wekan-dev).
## Pull Request Workflow (Please read before submitting PR's)
- If package is available on meteor https://atmospherejs.com `meteor add packagename` or https://www.npmjs.com `meteor npm install packagename` then it's enough to add package that way, and there is no need to clone repo in [rebuild-wekan.sh](https://github.com/wekan/wekan-maintainer/tree/master/releases) script.
- When doing pull requests, only add additions and changes to English at wekan/i18n/en.i18n.json . Other translations are done at [https://app.transifex.com/wekan/](https://app.transifex.com/wekan/).
- If you have fix to some existing pull request, add your fix as comment. Do not post new pull request.
- For new features add new pull request, if there is none already.
- remove all console.log statements
- [Here is how to remove commits from pull request](https://stackoverflow.com/questions/36168839/how-to-remove-commits-from-pull-request)
## Preventing Travis CI lint errors before submitting pull requests
- NOTE: Travis is currently broken and always shows warnings and errors like variables not defined or not used, so if your code works, ignore Travis.
- Eslint for linting. To prevent Travis CI lint errors, you can test for lint errors by installing `npm install eslint` and running it with `npm run lint` and trying automatic fixing with `eslint --fix filename.js`
- There is also probably not-currently-working as of 2018-05-05 [jsbeautifer website](http://jsbeautifier.org) with settings Indent with 2 spaces (topmost dropdown), [X] Space before conditional: "if(x)" / "if (x)", [X] Use JSLint-happy formatting tweaks.
## Choosing issues to work on
- You are free to select what feature to work on.
- Leave a comment on an issue saying that you're working on it, and give updates as needed.
- Work and concentrate on one issue at a time and finish it, before moving to other issue.
- Keep list of your contributions on your personal website.
- Keep track of time it takes to implement each part of a feature, so you can estimate what time it would take to implement similar feature. After implementing feature, review your estimate was it correct, make improvements to your process and estimates, also keeping enough time allocated in estimate if something is harder to implement. Employers look for coders with proven track record.
- You can ask for comments from others, but usually those feature requests are clearly defined how they should work. You can place those Settings options there where it seems most logical for you.
Main point is to be friendly to those commenting of your code, and incorporate those suggestions that make most sense.
# Build Pipeline
- Templates are written in [JADE](https://naltatis.github.io/jade-syntax-docs/) instead of plain HTML. Also see [HTML to JADE converter](http://html2jade.org/).
- CSS is written in the [Stylus](http://stylus-lang.com/) precompiler - see [Stylus to CSS converter](https://mikethedj4.github.io/Stylus2CSS/), and
- Meteor templates are created as BlazeLayout templates.
- Instead of the allow/deny paradigm a lot of the `collections` defined in the project use `mutations` to define what kinds of operations are allowed.
For further details look for the 'feature summaries' in the Wiki (still in progress) otherwise go through the git history and see how old features were built. Might I suggest the Start and Due date feature [wefork#26](https://github.com/wefork/wekan/pull/26)
# Translations
If adding new features, please also support the internationalization features built in. Refer to the [[Translations]] wiki page.
# Export From Trello
It's possible to import your existing boards from Trello. Instructions [[here|migrating-from-trello]]
# Directory Structure Details
[Directory Structure](Directory-Structure)
# Chat
[![Wekan chat][vanila_badge]][vanila_chat]
[rocket_chat]: https://chat.indie.host/channel/wekan
[vanila_badge]: https://vanila.io/img/join-chat-button2.png
[vanila_chat]: https://community.vanila.io/wekan

View file

@ -0,0 +1,187 @@
# Routing
We're using [FlowRouter](https://github.com/kadirahq/flow-router) client side router inside **[config/router.js](https://github.com/wekan/wekan/tree/main/config/router.js)**.
For accounts there is [AccountsTemplates](https://github.com/meteor-useraccounts) configured in **[config/accounts.js](https://github.com/wekan/wekan/tree/main/config/accounts.js)**.
# Client
## public
Files in this directory are served by meteor as-is to the client. It hosts some (fav)icons and fonts.
**[wekan-manifest.json](https://github.com/wekan/wekan/tree/main/wekan-manifest.json)**: goes into `link rel="manifest"` in the header of the generated page and is a [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest).
## components
* **[activities](https://github.com/wekan/wekan/tree/main/client/components/activities)**:
* **[activities.jade](https://github.com/wekan/wekan/tree/main/client/components/activities/activities.jade)**: `activities` template for the list of activities placed inside a `sidebar-content`; uses `boardActivities` or `cardActivities` depending on `mode`; <span style="color:red">*XXX: does this mean that sidebar should be visible in board list mode? when does the `board` activity gets shown?*</span>
* **[comments.jade](https://github.com/wekan/wekan/tree/main/client/components/activities/comments.jade)**: `commentForm` template used in `card-details-canvas` for adding comments;
* **[boards](https://github.com/wekan/wekan/tree/main/client/components/boards)**:
* **[boardArchive.jade](https://github.com/wekan/wekan/tree/main/client/components/boards/boardArchive.jade)**: `archivedBoards` template for the modal dialog showing the list of archived boards that might be restored;
* **[boardBody.jade](https://github.com/wekan/wekan/tree/main/client/components/boards/boardBody.jade)**: top level template for presenting a board is `board` and, based on screen size and current state, it uses either `cardDetails` or `boardBody` templates; `boardBody` is the one including the `sidebar`, each `list`, `cardDetails` for larger screens when a card is selected and the `addListForm` for adding a new list (also defined in this file);
* **[boardHeader.jade](https://github.com/wekan/wekan/tree/main/client/components/boards/boardHeader.jade)**: `boardHeaderBar`, `boardMenuPopup`, `boardVisibilityList`, `boardChangeVisibilityPopup`, `boardChangeWatchPopup`, `boardChangeColorPopup`, `createBoard`, `chooseBoardSource`, `boardChangeTitlePopup`, `archiveBoardPopup`, `outgoingWebhooksPopup`;
* **[boardsList.jade](https://github.com/wekan/wekan/tree/main/client/components/boards/boardsList.jade)**: `boardList` and `boardListHeaderBar` for the list of boards in the initial screen;
* **[cards](https://github.com/wekan/wekan/tree/main/client/components/cards)**:
* **[attachments.jade](https://github.com/wekan/wekan/tree/main/client/components/cards/attachments.jade)**: `cardAttachmentsPopup`, `previewClipboardImagePopup`, `previewAttachedImagePopup`, `attachmentDeletePopup`, `attachmentsGalery`;
* **[cardDate.jade](https://github.com/wekan/wekan/tree/main/client/components/cards/cardDate.jade)**: `editCardDate` and `dateBadge` templates;
* **[cardDetails.jade](https://github.com/wekan/wekan/tree/main/client/components/cards/cardDetails.jade)**: `boardsAndLists` is the usual layout for a board display with `boardLists` being used in sandstorm where each board is independent;`cardDetails`, `editCardTitleForm`, `cardDetailsActionsPopup`, `moveCardPopup`, `copyCardPopup`,`cardMembersPopup`,`cardMorePopup`, `cardDeletePopup`;
* **[cardTime.jade](https://github.com/wekan/wekan/tree/main/client/components/cards/cardTime.jade)**: `editCardSpentTime` and `timeBadge` templates;
* **[checklists.jade](https://github.com/wekan/wekan/tree/main/client/components/cards/checklists.jade)**: `checklists`, `checklistDetail`, `checklistDeleteDialog`, `addChecklistItemForm`, `editChecklistItemForm`, `checklistItems`, `itemDetail`;
* **[labels.jade](https://github.com/wekan/wekan/tree/main/client/components/cards/labels.jade)**: `formLabel`, `createLabelPopup`, `editLabelPopup`, `deleteLabelPopup`, `cardLabelsPopup`;
* **[minicard.jade](https://github.com/wekan/wekan/tree/main/client/components/cards/minicard.jade)**: has the `minicard` template
* **[forms](https://github.com/wekan/wekan/tree/main/client/components/forms)**: **[inlinedform.jade](https://github.com/wekan/wekan/tree/main/client/components/forms/inlinedform.jade)** has the`inlinedForm` template;
* **[import](https://github.com/wekan/wekan/tree/main/client/components/import)**:
* **[import.jade](https://github.com/wekan/wekan/tree/main/client/components/import/import.jade)**: `importHeaderBar`, `import`, `importTextarea`, `importMapMembers`, `importMapMembersAddPopup` are all templates used for importing Trello (via **[trelloMembersMapper.js](https://github.com/wekan/wekan/tree/main/client/components/import/trelloMembersMapper.js)**) and Wekan (via **[wekanMembersMapper.js](https://github.com/wekan/wekan/tree/main/client/components/import/wekanMembersMapper.js)**) boards;
* **[lists](https://github.com/wekan/wekan/tree/main/client/components/lists)**:
* **[list.jade](https://github.com/wekan/wekan/tree/main/client/components/lists/list.jade)**: `list` is the simple, main template for lists;
* **[listBody.jade](https://github.com/wekan/wekan/tree/main/client/components/lists/listBody.jade)**: `listBody`, `addCardForm`, `autocompleteLabelLine` templates;
* **[listHeader.jade](https://github.com/wekan/wekan/tree/main/client/components/lists/listHeader.jade)**: `listHeader`, `editListTitleForm`, `listActionPopup`, `boardLists`, `listMorePopup`, `listDeletePopup`, `setWipLimitPopup`, `wipLimitErrorPopup` templates;
* **[main](https://github.com/wekan/wekan/tree/main/client/components/main)**:
* **[editor.jade](https://github.com/wekan/wekan/tree/main/client/components/main/editor.jade)**: `editor` and `viewer` templates;
* **[header.jade](https://github.com/wekan/wekan/tree/main/client/components/main/header.jade)**: `header` and `offlineWarning` templates; if the user is connected we display a small "quick-access" top bar that list all starred boards with a link to go there (this is inspired by the Reddit "subreddit" bar); the first link goes to the boards page;
* **[keyboardShortcuts.jade](https://github.com/wekan/wekan/tree/main/client/components/main/keyboardShortcuts.jade)**: `shortcutsHeaderBar`, `shortcutsModalTitle`, `keyboardShortcuts` - all for the shortcuts that are presented when you press `?`re implemented inhere;
* **[layouts.jade](https://github.com/wekan/wekan/tree/main/client/components/main/layouts.jade)**: has the template for head portion of the html page and other general purpose templates: `userFormsLayout`, `defaultLayout`, `notFound`, `message`;
* **[popup.tpl.jade](https://github.com/wekan/wekan/tree/main/client/components/main/popup.tpl.jade)**: tpl files only define a single template so there's no need to wrap content in a template tag; the name of the template is the base name of the file (`popup` in this case);
* **[spinner.tpl.jade](https://github.com/wekan/wekan/tree/main/client/components/main/spinner.tpl.jade)**: is the template for a "waiting" dialog;
* **[settings](https://github.com/wekan/wekan/tree/main/client/components/settings)**:
* **[informationBody.jade](https://github.com/wekan/wekan/tree/main/client/components/settings/informationBody.jade)**: `information`, `statistics` templates;
* **[invitationCode.jade](https://github.com/wekan/wekan/tree/main/client/components/settings/invitationCode.jade)**: `invitationCode` template;
* **[peopleBody.jade](https://github.com/wekan/wekan/tree/main/client/components/settings/peopleBody.jade)**: `people`, `peopleGeneral`, `peopleRow`, `editUserPopup`;
* **[settingBody.jade](https://github.com/wekan/wekan/tree/main/client/components/settings/settingBody.jade)**: `setting`, `general`, `email`, `accountSettings`, `announcementSettings`
* **[settingHeader.jade](https://github.com/wekan/wekan/tree/main/client/components/settings/settingHeader.jade)**: `settingHeaderBar` template;
* **[sidebar](https://github.com/wekan/wekan/tree/main/client/components/sidebar)**:
* **[sidebar.jade](https://github.com/wekan/wekan/tree/main/client/components/sidebar/sidebar.jade)**: `sidebar`, `homeSidebar`, `membersWidget`, `labelsWidget`, `memberPopup`, `removeMemberPopup`, `leaveBoardPopup`, `addMemberPopup`, `changePermissionsPopup`
* **[sidebarArchives.jade](https://github.com/wekan/wekan/tree/main/client/components/sidebar/sidebarArchives.jade)**: `archivesSidebar`
* **[sidebarFilters.jade](https://github.com/wekan/wekan/tree/main/client/components/sidebar/sidebarFilters.jade)**: `filterSidebar`, `multiselectionSidebar`, `disambiguateMultiLabelPopup`, `disambiguateMultiMemberPopup`, `moveSelectionPopup`;
* **[users](https://github.com/wekan/wekan/tree/main/client/components/users)**:
* **[userAvatar.jade](https://github.com/wekan/wekan/tree/main/client/components/users/userAvatar.jade)**: `userAvatar`, `userAvatarInitials`, `userPopup`, `memberName`, `changeAvatarPopup`, `cardMemberPopup`
* **[userHeader.jade](https://github.com/wekan/wekan/tree/main/client/components/users/userHeader.jade)**: `headerUserBar`, `memberMenuPopup`, `editProfilePopup`, `editNotificationPopup`, `changePasswordPopup`, `changeLanguagePopup`, `changeSettingsPopup`;
* **[mixins](https://github.com/wekan/wekan/tree/main/client/components/mixins)**: [extends](http://www.meteorpedia.com/read/Infinite_Scrolling) **[infiniteScrolling.js](https://github.com/wekan/wekan/tree/main/client/components/mixins/infiniteScrolling.js)** for card details, sidebar and also extends **[perfectScrollbar.js](https://github.com/wekan/wekan/tree/main/client/components/mixins/perfectScrollbar.js)**;
## config
* **[blazeHelpers.js](https://github.com/wekan/wekan/tree/main/client/config/blazeHelpers.js)**: following [Blaze](http://blazejs.org/) helpers are registered here:`currentBoard()`, `currentCard()`, `getUser()` and `concat()`;
* **[gecko-fix.js](https://github.com/wekan/wekan/tree/main/client/config/gecko-fix.js)**: removes [deprecated](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch)`watch` and `unwatch` from Firefox prior to version 58;
* **[presence.js](https://github.com/wekan/wekan/tree/main/client/config/presence.js)**: custom state function for [Presence](https://github.com/dburles/meteor-presence) that keeps track of current board;
* **[reactiveTabs.js](https://github.com/wekan/wekan/tree/main/client/config/reactiveTabs.js)**: [ReactiveTabs](https://github.com/meteortemplates/tabs) are configured to use `basicTabs` template.
## lib
* **[accessibility.js](https://github.com/wekan/wekan/tree/main/client/lib/accessibility.js)**: define a set of DOM transformations that are specifically intended for blind screen readers;
* **[cssEvents.js](https://github.com/wekan/wekan/tree/main/client/lib/cssEvents.js)**: the `CSSEvents`object has methods that select the name of the event based on the specific transitions and animations;
* **[pasteImage.js](https://github.com/wekan/wekan/tree/main/client/lib/pasteImage.js)** and **[dropImage.js](https://github.com/wekan/wekan/tree/main/client/lib/dropImage.js)**: utility for pasting and dropping images on a web app; <span style="color:red">*XXX: add comments; not same style as the rest of the code*</span>
* **[emoji-values.js](https://github.com/wekan/wekan/tree/main/client/lib/emoji-values.js)**: sets Emoji.values;
* **[escapeActions.js](https://github.com/wekan/wekan/tree/main/client/lib/escapeActions.js)**: defines the behavior (mostly canceling current edit) for escape keyboard key;
* **[i18n.js](https://github.com/wekan/wekan/tree/main/client/lib/i18n.js)**: at startup we choose the language for the ui based on user profile or browser language;
* **[inlinedform.js](https://github.com/wekan/wekan/tree/main/client/lib/inlinedform.js)**: forms for editing a single field (like adding a card); <span style="color:red">*XXX: comments in code suggest that a form that is not submitted will retain its value to prevent data loss using [unsavedEdits.js](https://github.com/wekan/wekan/tree/main/client/lib/unsavedEdits.js);bug?*</span>; <span style="color:red">*XXX: edit button to save and open*</span>;
* **[keyboard.js](https://github.com/wekan/wekan/tree/main/client/lib/keyboard.js)**: the shortcuts that are presented when you press `?`re implemented inhere;
* **[mixins.js](https://github.com/wekan/wekan/tree/main/client/lib/mixins.js)**: stub; no `Mixins` at this point; <span style="color:red">*XXX: what does `new class` do? exlint: missing () invoking a constructor*</span>
* **[popup.js](https://github.com/wekan/wekan/tree/main/client/lib/popup.js)**: defines `Popup` class for things likes electing a date; <span style="color:red">*XXX: not a Blaze helper?*</span>
* **[textComplete.js](https://github.com/wekan/wekan/tree/main/client/lib/textComplete.js)**: extends [jquery-textcomplete](https://yuku-t.com/jquery-textcomplete/) to integrate with the rest of the system (like escape actions, tab and enter key handling); <span style="color:red">*XXX: deprecated?*</span>
* **[utils.js](https://github.com/wekan/wekan/tree/main/client/lib/utils.js)**: various methods all over the place (resize, screen size, sort, capitalize, navigate to board and card);
* **Blaze helpers**:
* **[filter.js](https://github.com/wekan/wekan/tree/main/client/lib/filter.js)**: registers `Filter` [Blaze](http://blazejs.org/) helper to support filtering cards by labels and by members;
* **[modal.js](https://github.com/wekan/wekan/tree/main/client/lib/modal.js)**: registers `Modal` [Blaze](http://blazejs.org/) helper to support showing modal windows like the one for archived boards;
* **[multiSelection.js](https://github.com/wekan/wekan/tree/main/client/lib/multiSelection.js)**: registers `Modal` [Blaze](http://blazejs.org/) helper to support multiple selection mode;
* **[unsavedEdits.js](https://github.com/wekan/wekan/tree/main/client/lib/unsavedEdits.js)**: registers `getUnsavedValue` and `hasUnsavedValue` [Blaze](http://blazejs.org/) helpers to preserve content entered in fields but not saved;
# Server
.js files in this directory are not available to the client.
* **[statistics.js](https://github.com/wekan/wekan/tree/main/server/statistics.js)** implements a Meteor server-only [method](https://guide.meteor.com/methods.html) for general-purpose information such as OS, memory, CPUs, PID of the process and so on.
* **[migrations.js](https://github.com/wekan/wekan/tree/main/server/migrations.js)** is where code that update sold databases to new schema is located. Anytime the schema of one of the collection changes in a non-backward compatible way a migration needs to be written in this file.
* **[authentication.js](https://github.com/wekan/wekan/tree/main/server/authentication.js)** add the `Authentication`object to Meteor that provides methods for checking access rights.
* **[lib/utils.js](https://github.com/wekan/wekan/tree/main/server/lib/utils.js)** defines some checks used by [checklists.js](https://github.com/wekan/wekan/tree/main/models/checklists.js)** model. <span style="color:red">*XXX: these methods are defined in server-only code by are used in models, which are visible by the client (in Checklists.allow)?*</span>
* **[notifications](https://github.com/wekan/wekan/tree/main/server/notifications)**
* **[notifications.js](https://github.com/wekan/wekan/tree/main/server/notifications/notifications.js)**: defines the `Notifications` object that supports [Activities](models/activities.js) and holds a list of functions to call when its `notify()` method is called along with convenience methods to subscribe, unsubscribe and a way to filter recipients according to user settings for notification;
* **[email.js](https://github.com/wekan/wekan/tree/main/server/notifications/email.js)**: makes use of the notification system to send an email to a user;
* **[profile.js](https://github.com/wekan/wekan/tree/main/server/notifications/profile.js)**: *stub*; will allow associating notifications with user ids to be consumed by mobile apps;
* **[notifications.js](https://github.com/wekan/wekan/tree/main/server/notifications/notifications.js)**: adds the `watch()` Meteor server-only [method](https://guide.meteor.com/methods.html) that may watch boards, lists or cards using [models/watchable.js](https://github.com/wekan/wekan/tree/main/models/watchable.js);
* **[outgoing.js](https://github.com/wekan/wekan/tree/main/server/notifications/outgoing.js)**: adds the `outgoingWebhooks()` Meteor server-only [method](https://guide.meteor.com/methods.html) that can call external API <span style="color:red">*XXX: I guess*</span>
* **[publications](https://github.com/wekan/wekan/tree/main/server/publications)** defines sets of records that are [published](https://docs.meteor.com/api/pubsub.html#Meteor-publish) by the server and how clients can subscribe to those:
* **[accountSettings.js](https://github.com/wekan/wekan/tree/main/server/publications/accountSettings.js)**: [AccountSettings](models/accountSettings.js) collection;
* **[activities.js](https://github.com/wekan/wekan/tree/main/server/publications/activities.js)**: [Activities](models/activities.js) collection filtered and paginated;
* **[announcements.js](https://github.com/wekan/wekan/tree/main/server/publications/announcements.js)**: [Announcements](models/announcements.js) collection;
* **[avatars.js](https://github.com/wekan/wekan/tree/main/server/publications/avatars.js)**: [Avatars](models/avatars.js) collection for current user;
* **[boards.js](https://github.com/wekan/wekan/tree/main/server/publications/boards.js)**: [Boards](models/boards.js) collection for current user, archived boards collection and individual board as a [relation](https://atmospherejs.com/cottz/publish-relations);
* **[cards.js](https://github.com/wekan/wekan/tree/main/server/publications/cards.js)**: a [Card](https://github.com/wekan/wekan/tree/main/models/cards.js) by its id;
* **[fast-render.js](https://github.com/wekan/wekan/tree/main/server/publications/fast-render.js)**: configures [FastRender](https://github.com/kadirahq/fast-render) to use the board data; <span style="color:red">*XXX: FastRender docs say "Make sure you're using Meteor.subscribe and not this.subscribe"*</span>
* **[people.js](https://github.com/wekan/wekan/tree/main/server/publications/people.js)**: [Users](models/users.js) collection;
* **[settings.js](https://github.com/wekan/wekan/tree/main/server/publications/settings.js)**: [Settings](models/settings.js) collection and, separately, the mail server;
* **[unsavedEdits.js](https://github.com/wekan/wekan/tree/main/server/publications/unsavedEdits.js)**: [UnsavedEdits](models/unsavedEdits.js) collection;
* **[users.js](https://github.com/wekan/wekan/tree/main/server/publications/users.js)**: provides a "mini-profile" for individual users and a [way](https://docs.meteor.com/api/collections.html#fieldspecifiers) to check if current user is admin.
# Models
The files in **[models](https://github.com/wekan/wekan/tree/main/models)** directory mainly define collections; most of them have [aldeed SimpleSchema](https://atmospherejs.com/aldeed/simple-schema) for automatic validation of insert and update of collections. This is also where helpers, mutations, methods, hooks and bootstrap code is to be found. [Server side code](https://docs.meteor.com/api/core.html#Meteor-isServer) also implements json REST API.
Collections (mostly `Mongo.Collection` except as noted) are defined in:
* **[accountSettings.js](https://github.com/wekan/wekan/tree/main/models/accountSettings.js)**;
* **[activities.js](https://github.com/wekan/wekan/tree/main/models/activities.js)**: does not have a SimpleSchema;
* **[announcements.js](https://github.com/wekan/wekan/tree/main/models/announcements.js)**;
* **[attachments.js](https://github.com/wekan/wekan/tree/main/models/attachments.js)**: file-system collection;
* **[avatars.js](https://github.com/wekan/wekan/tree/main/models/avatars.js)**: file-system collection;
* **[boards.js](https://github.com/wekan/wekan/tree/main/models/boards.js)**;
* **[cardComments.js](https://github.com/wekan/wekan/tree/main/models/cardComments.js)**;
* **[cards.js](https://github.com/wekan/wekan/tree/main/models/cards.js)**;
* **[checklists.js](https://github.com/wekan/wekan/tree/main/models/checklists.js)**;
* **[integrations.js](https://github.com/wekan/wekan/tree/main/models/integrations.js)**;
* **[invitationCodes.js](https://github.com/wekan/wekan/tree/main/models/invitationCodes.js)**;
* **[lists.js](https://github.com/wekan/wekan/tree/main/models/lists.js)**;
* **[settings.js](https://github.com/wekan/wekan/tree/main/models/settings.js)**;
* **[unsavedEdits.js](https://github.com/wekan/wekan/tree/main/models/unsavedEdits.js)**;
* **[users.js](https://github.com/wekan/wekan/tree/main/models/users.js)**: extends the `Meteor.users` collection.
Other files:
* **[watchable.js](https://github.com/wekan/wekan/tree/main/models/watchable.js)**: extends the schema, helpers and mutations of `Boards`, `Lists` and `Cards`.
* **[export.js](https://github.com/wekan/wekan/tree/main/models/export.js)**: has some code to support the REST API.
* **[import.js](https://github.com/wekan/wekan/tree/main/models/import.js)**: implements `importBoard()` method so that Trello (in **[trelloCreator.js](https://github.com/wekan/wekan/tree/main/models/trelloCreator.js)**) and Wekan (in **[wekanCreator.js](https://github.com/wekan/wekan/tree/main/models/wekanCreator.js)**) boards can be imported. <span style="color:red">*XXX: Solid candidates for a directory of their own.*</span>
# Tools
* Git:
* **.git**;
* **[.gitignore](https://github.com/wekan/wekan/tree/main/.gitignore)**;
* Docker:
* **[docker-compose.yml](https://github.com/wekan/wekan/tree/main/docker-compose.yml)**: the compose file is a YAML file defining services, networks and volumes;
* **[Dockerfile](https://github.com/wekan/wekan/tree/main/Dockerfile)**;
* Snap:
* **[snapcraft.yaml](https://github.com/wekan/wekan/tree/main/snapcraft.yaml)**: [Snapcraft](https://snapcraft.io/) packages any app for every Linux desktop, server, cloud or device, and deliver updates directly;
* **[snap](https://github.com/wekan/wekan/tree/main/snap)**;
* **[snap-src](https://github.com/wekan/wekan/tree/main/snap-src)**;
* Sandstorm:
* **[sandstorm.js](https://github.com/wekan/wekan/tree/main/sandstorm.js)**: [Sandstorm](https://sandstorm.io/) specific code;
* **[sandstorm-pkgdef.capnp](https://github.com/wekan/wekan/tree/main/sandstorm-pkgdef.capnp)**: used the meteor-spk tool to generate a sandstorm package;
* Node:
* **[package.json](https://github.com/wekan/wekan/tree/main/package.json)**;
* **node_modules**
* **[app.json](https://github.com/wekan/wekan/tree/main/app.json)**: is a manifest format for describing web apps (build requirements, environment variables, addons, and other information);
* **[app.env](https://github.com/wekan/wekan/tree/main/app.env)**: environment variables;
* Meteor: is a full-stack JavaScript platform for developing modern web and mobile applications.
* **[.meteor](https://github.com/wekan/wekan/tree/main/.meteor)**;
* Translation:
* **[i18n](https://github.com/wekan/wekan/tree/main/i18n)** directory has one .json file for each supported language
* **[.tx](https://github.com/wekan/wekan/tree/main/.tx)**: configuration for [Transifex](https://app.transifex.com/wekan/) tool used to manage translation;
* Text editors:
* **[.vscode](https://github.com/wekan/wekan/tree/main/.vscode)**: [Visual Studio Code Editor](https://code.visualstudio.com/docs/getstarted/settings);
* **[.editorconfig](https://github.com/wekan/wekan/tree/main/.editorconfig)**: [EditorConfig](http://EditorConfig.org) provides consistent coding styles between different editors and IDEs;
* **[.github](https://github.com/wekan/wekan/tree/main/.github)**: hosts the issues template;
* **[.eslintrc.json](https://github.com/wekan/wekan/tree/main/.eslintrc.json)**: [ESLint](https://eslint.org/docs/user-guide/configuring) configuration;
* **[.travis.yml](https://github.com/wekan/wekan/tree/main/.travis.yml)**: configuration for [Travis CI](https://travis-ci.org/);
* **[scalingo.json](https://github.com/wekan/wekan/tree/main/scalingo.json)**: [Scalingo](https://scalingo.com/) is a deploy solution;
* **[fix-download-unicode](https://github.com/wekan/wekan/tree/main/fix-download-unicode)**: `cfs_access-point.txt` from this folder is copied to `bundle/programs/server/packages/cfs_access-point.js` in Docker build and in snapcraft build; this is a monkey patch fix for [downloading files that have unicode in filename](https://github.com/wekan/wekan/issues/784).
# Info
* **[meta](https://github.com/wekan/wekan/tree/main/meta)**: binary signatures, project description, icons, screenshots and, oui, a French change-log;
* **[CHANGELOG.md](https://github.com/wekan/wekan/tree/main/CHANGELOG.md)**;
* **[Contributing.md](https://github.com/wekan/wekan/tree/main/Contributing.md)**;
* **[LICENSE](https://github.com/wekan/wekan/tree/main/LICENSE)**;
* **[README.md](https://github.com/wekan/wekan/tree/main/README.md)**.
---
# Contributions to this page
This documentation was contributed by [TNick](https://github.com/TNick) and [xet7](https://github.com/xet7) while Wekan was at commit [e2f768c](https://github.com/wekan/wekan/tree/e2f768c6a0f913b7c5f07695dce8cec692037255).
Please add new files, fixes, updates, etc directly to this page.

204
docs/DeveloperDocs/Emoji.md Normal file
View file

@ -0,0 +1,204 @@
## About markdown changes
Wekan v4.29 changes markdown rendering from [marked](https://github.com/markedjs/marked) to [markdown-it](https://github.com/markdown-it/markdown-it).
## About emoji
With markdown-it, also [markdown-it-emoji](https://github.com/markdown-it/markdown-it-emoji) plugin has been added, supporting [full list of GitHub emojis](https://github.com/markdown-it/markdown-it-emoji/blob/master/lib/data/full.json).
Example emoji code, that you can add for example to card name, card description etc:
```
:rainbow: :thumbsup: :100:
```
That shows emojis :rainbow: :thumbsup: :100:
## About other markdown-it plugins
For markdown-it, there are also other [syntax extensions](https://github.com/markdown-it/markdown-it#syntax-extensions) where some are listed at that markdown-it page, and [others at npmjs.com](https://www.npmjs.org/browse/keyword/markdown-it-plugin).
For example, how to get some [mermaid plugin](https://www.npmjs.com/search?q=markdown-it-mermaid) working so that some syntax works for https://mermaid-js.github.io/mermaid/ ?
## How you could add another plugin
Using newest Ubuntu amd64:
# Meteor 2
### 1. Install git and configure it
```
sudo apt -y install git
git config --global user.name "Yourfirstname Yourlastname"
git config --global user.email email-address-you-use-at-github@example.com
git config --global push.default simple
nano .ssh/config
```
There add your User (GitHub username) and IdentityFile (Your ssh private key. Not public key that has .pub).
For indentation, use one tab.
```
Host *
IdentitiesOnly=yes
Host github.com
Hostname github.com
User xet7
IdentityFile ~/.ssh/id_xet7ed
```
Save and Exit with Ctrl-o Enter Ctrl-x Enter
If you do not have ssh key, create it:
```
ssh-keygen
```
And press Enter about 3 times, until you have private key at `~/.ssh/id_rsa` and public key at `~/.ssh/id_rsa.pub`
Add public key `.pub` to your github account web interface.
Add path to Meteor:
```
nano .bashrc
```
There at bottom add:
```
export PATH=~/.meteor:$PATH
```
Save and Exit with Ctrl-o Enter Ctrl-x Enter
### 2. Create fork of `https://github.com/wekan/wekan` at GitHub web page
```
mkdir repos
cd repos
git clone git@github.com:YourGithubUsername/wekan.git
cd wekan
```
### 3. Select option 1 to install dependencies, and then Enter.
```
./rebuild-wekan.sh
1
./rebuild-wekan.sh
2
./rebuild-wekan.sh
3
```
That does: 1 install dependencies, 2 builds wekan, 3 starts wekan in development mode with command `meteor`, so it can detect if some file changes and try to rebuild automatically and reload webbroser. But, still sometimes, it may need stopping with Ctrl-c and full build with option 2.
And then [register and login](Adding-users) at http://localhost:4000
### OPTIONAL, NOT NEEDED: 5. Add new plugin package
```
meteor npm install markdown-it-something --save
```
Edit file `wekan/packages/markdown/src-integration.js` and add using that new package, using code example from that new plugin page, or similar like emoji plugin was added.
### 7. Test
Test does that new plugin syntax work, for example in card title, card description etc on other input fields.
### 8. If it works, create pull request
If normal markdown, emoji, and your new added plugin syntax all work, commit your changes:
```
git add --all
git commit -m "Added plugin markdown-it-something."
git push
```
And then at your GitHub for `https://github.com/YOUR-GITHUB-USERNAME/wekan` click `Create pull request`.
# Meteor 3
At 2024-06-26, it looks like from https://nodejs.org/en that Node.js LTS version is 20.15.0 , so change to newest Node.js LTS, delete old Meteor:
```
sudo n 20.15.0
sudo npm -g install npm
cd
rm -rf .meteor
```
Check how to install newest Meteor from Meteor 3 PR at https://github.com/meteor/meteor/pull/13163 , for example:
```
npx meteor@rc
```
Check what branches there are:
```
cd repos/wekan
git branch -a
```
Change to Meteor 3 branch:
```
git checkout feature-meteor3
```
Build wekan:
```
./rebuild-wekan.sh
2
```
If there are errors, try to fix them.
Or try to run wekan:
```
./rebuild-wekan.sh
3
```
# Updating
There are usually updates both for npm packages and Meteor
Updating npm packages:
```
npm update
```
Checking for vulnerable packages:
```
npm audit
```
Fixing vulnerable npm packages by updating to newer packages:
```
npm audit fix
```
If that did not help, use force:
```
npm audit fix --force
```
If that did not help, read links from that `npm audit` command did show, remove deprecated dependencies, update to other maintained dependencies.
Updating to next Meteor release:
```
meteor update
```
Updating to specific Meteor release:
```
meteor update --release METEOR@3.0-rc.4
```
Trying to update all Meteor packages:
```
meteor update --release METEOR@3.0-rc.4 --all-packages
```
Allowing incompatible updates, that may sometime work:
```
meteor update --release METEOR@3.0-rc.4 --all-packages --allow-incompatible-update
```
If you are changing Meteor and Node.js versions, you may need to reset Meteor:
```
meteor reset
```
Or alternatively, delete wekan repo (if you did not need any changes you made), and clone wekan repo again, and then build etc.

View file

@ -0,0 +1,13 @@
- Read [Wekan new release ChangeLog](https://github.com/wekan/wekan/blob/main/CHANGELOG.md)
- [Install Meteor.js](https://www.meteor.com/install). Note: Windows install is very slow, please use other option at [Windows wiki page](Windows)
- Download newest bundle from https://releases.wekan.team
- Unarchive bundle .tar.gz file: `tar -zxvf wekan-VERSION.tar.gz`
- `cd bundle`
- `meteor`
- Browse with webbrowser like Firefox to http://localhost:3000
[Wekan for Meteor.js bundle bug reports and feature requests](https://github.com/wekan/wekan/issues)
[Build Meteor bundle from source](Source)
[Install from source without root](Install-from-source-without-root)

View file

@ -0,0 +1,18 @@
## Upgrading Meteor
- Disclaimer:
- These are opinions about upgrading, from xet7, maintainer of WeKan Open Source kanban https://wekan.github.io
- xet7 thinks, that it is good to keep using current frontend and backend frameworks, upgrade them when possible. If there is any problems, ask at https://forums.meteor.com
- xet7 thinks, that upgrading to newest Meteor 2 and Meteor 3 is being made more easier all the time, when new dependencies become available, any bugs are fixed, etc. So it is good to make all possible upgrading steps available.
- Upgrade to newest 2.14 https://guide.meteor.com/2.14-migration . Currently xet7 is using newest 2.14.1-beta.0 in production release of WeKan https://forums.meteor.com/t/meteor-v2-14-1-beta-0-is-out/61142
- Prepare for 3.0 https://guide.meteor.com/3.0-migration
- Migrate Async
- Helper tool https://forums.meteor.com/t/blaze-async-migration-helper-babel-plugin-tracker-async-enhance-for-the-client-side-released/60842
- https://guide.meteor.com/prepare-meteor-3.0
- Look at progress of migrated packages https://forums.meteor.com/t/looking-for-help-migrating-packages-to-meteor-3-0/60985
- Add Eslint 3 and fix anything found
- https://youtu.be/rFjNNNc_7-E
- https://github.com/quavedev/eslint-plugin
- https://github.com/quavedev/meteor-template/pull/8
- Watch Meteor Dispatches etc Podcasts https://www.youtube.com/@meteorjscommunity/playlists
- Some recent also had info, how to make dependencies compatible with both Meteor 2 and Meteor 3

View file

@ -0,0 +1,75 @@
## 1. What is Monkey Proof Software?
Someone told xet7, that WeKan is Monkey Proof Software. Jira is not Monkey Proof Software. Here we are exploring what it means.
## 2. Proofing
a) Monkey Proof testing of laptop https://www.youtube.com/watch?v=QxCV0bZGE00 . There are also some info at Internet how to make sure monkeys do not mess up apartments, trashcans etc.
b) https://en.wikipedia.org/wiki/Proofing
> Proofing may refer to:
>
> - [Proofing (armour)](https://en.wikipedia.org/wiki/Proofing_(armour)), the testing of armour for its defensive ability
> - [Proofing (baking technique)](https://en.wikipedia.org/wiki/Proofing_(baking_technique)), a rest period during the fermentation of bread dough
> - [Proofing (prepress)](https://en.wikipedia.org/wiki/Prepress_proofing), a concept in print production
> - [Proof testing](https://en.wikipedia.org/wiki/Proof_test), a form of stress test to demonstrate the fitness of a load-bearing structure
c) https://nl.wikipedia.org/wiki/Foolproof mentions "De Engelse termen foolproof, idiot proof, monkey proof"
d) https://en.wikipedia.org/wiki/Idiot-proof
> In modern [English](https://en.wikipedia.org/wiki/English_language) usage, the informal term idiot-proof or foolproof describes designs that cannot be misused either inherently, or by use of [defensive design](https://en.wikipedia.org/wiki/Defensive_design) principles. The implication is that the design is usable even by someone of low intelligence who would not use it properly.
## 3. Defensive design
Mentioned at https://en.wikipedia.org/wiki/Defensive_design
> Defensive design is the practice of planning for [contingencies](https://en.wikipedia.org/wiki/Contingency_plan) in the [design](https://en.wikipedia.org/wiki/Design) stage of a project or undertaking. Essentially, it is the practice of anticipating all possible ways that an end-user could misuse a device, and designing the device so as to make such misuse impossible, or to minimize the negative consequences. For example, if it is important that a plug is inserted into a socket in a particular orientation, the socket and plug should be designed so that it is physically impossible to insert the plug incorrectly. Power sockets are often keyed in such a manner, to prevent the transposition of live and neutral. They are also recessed in the wall in a way that makes it impossible to touch connectors once they become live.
## 4. Defensive Design in Computer software
> Defensive design in [software engineering](https://en.wikipedia.org/wiki/Software_engineering) is called [defensive programming](https://en.wikipedia.org/wiki/Defensive_programming). [Murphy's law](https://en.wikipedia.org/wiki/Murphy%27s_law) is a well-known statement of the need for defensive design, and also of its ultimate limitations.
>
> [Software design](https://en.wikipedia.org/wiki/Software_design) entails many ways so that software can be designed to operate more safely.
>
> - Data entry screens can "sanitize" inputs, e.g. numeric fields contain only digits, signs and a single decimal point if appropriate.
>
> - Inputs can be sanity checked for legitimate values, e.g. for counts of workplace injuries (or number of people injured) the number can be 0 but can't be negative and must be a whole number; for number of hours worked in one week the amount for any specified employee can be 0, can be fractional, but can't be negative and can't be greater than 168, nor more than 24 times the number of days they were in attendance.
>
> - A word processor requested to load a saved document should scan it to ensure it is in good form and not corrupted. If it is corrupted, the program should say so, then either accept the partial document that was valid, or refuse the entire document. In either case it should remain running and not quit.
## 6. Monkey Testing
https://en.wikipedia.org/wiki/Monkey_testing
## 7. Why Custom CSS/Javascript is not Monkey Proof
@xet7 wrote at https://github.com/wekan/wekan/issues/4167#issuecomment-1151557772 to this comment
> Wekan functions better on pretty much all fronts except for customization options given that one can directly change kanboard CSS to fit their needs.
From @xet7
Custom CSS and Javascript is very dangerous: https://github.com/wekan/wekan/issues/3086#issuecomment-627615017
> I had to previously find a way [how to fix Custom Javascript in RocketChat](https://forums.rocket.chat/t/big-issue-with-custom-javascript/261/4?u=xet7) because it broke my RocketChat install.
>
> Also, previously I had to [fix XSS bug](https://github.com/wekan/wekan/blob/main/CHANGELOG.md#v385-2020-03-23-wekan-release) because adding Javascript to input fields did run that Javascript code.
>
> I'll try to find is there a safe way to do this.
Correct solution is to add setting like here https://github.com/wekan/wekan/issues/4558
WeKan target group is those that call WeKan "Monkey Proof Software", so that WeKan is easy to figure out, user friendly, polished enough. Jira is not "Monkey Proof Software".
If someone is asking for "Custom CSS", that means they are programmers, and should be sending PRs to WeKan with fixes to UI, new settings, etc, so that WeKan works safely without "Custom CSS", for normal non-programmer people.
## 6. Towards more Monkey Proof Software
In Progress:
- Optimizing speed
- Minimize frontend and backend code
- Fixing bugs

View file

@ -0,0 +1,329 @@
## Prototype Strategy
- Try building many prototypes, see what works
- https://en.wiktionary.org/wiki/throw_things_at_the_wall_and_see_what_sticks
## Future
- Will this happen? With what tech? See https://github.com/wekan/wekan/blob/main/FUTURE.md
- You can comment at https://github.com/wekan/wekan/issues/4578
- You can help by sending PR to any prototype repo mentioned below
## Wishes to all web frameworks
- Documentation about how to upgrade, all required steps. Or alternatively, a script that does changes required to upgrade.
- Using parts of frameworks as separate packages, like:
- Authentication, like OAuth2, Gmail, etc
- Option to not use websockets, because at some corporate networks do not allow them.
- Option to not have Javascript at frontend, having SSR only. Working with and without Javascript at frontend, like ufront did.
- https://github.com/ufront/ufront
- https://jasono.co/2020/10/03/im-going-to-write-a-web-app-framework-again-maybe-well-see/
- Please do not discontinue HTML (no Javascript) version https://news.ycombinator.com/item?id=37558372
- Storing session to database, for round robin
- https://github.com/wekan/wekan/issues/5120
- https://stackoverflow.com/questions/65547266/how-to-store-my-session-mysql-with-express-mysql-session
- Not having build step:
- Keep all files at directories they currently are, with understandable directory structure naming, like:
- Feature name
- Feature part name 1
- Feature part name 2
- Only use file from it's location on page where it is needed
- Cache dependencies. Make possible coding offline.
- Do not uglify
- https://world.hey.com/dhh/you-can-t-get-faster-than-no-build-7a44131c
- Rails World Opening Keynote by DHH
- https://www.youtube.com/watch?v=iqXjGiQ_D-A
- https://news.ycombinator.com/item?id=37843951
- https://news.ycombinator.com/item?id=37897921
- I merged all branches to one main branch, because merging between branches did take a lot of time.
- Do not use linters like eslint and prettier. What I did, is I removed all linters, like eslint, prettier etc, because they did disagree about syntax. Point is to make to code minimal change, that fixes something, or adds some feature. Not that most commits would be about fixing syntax.
- https://matt-rickard.com/why-is-the-frontend-stack-so-complicated
- https://news.ycombinator.com/item?id=37895164
- https://deno.com/blog/node-config-hell
- How to not become slow and unresponsive after a week https://github.com/wekan/wekan/issues/5140
- Run code like CGI, release all memory
- Looking for most cross-platform web frameworks, supporting many different CPU, OS and database.
- Both On-Premise AND MultiCloud possible
- https://github.com/serverless/multicloud
- https://github.com/xet7/multicloud
- License: MIT and other https://copyfree.org
## List of realtime web frameworks
- Meteor
- https://www.meteor.com
- https://github.com/meteor/meteor
- Helene
- Forum Post https://forums.meteor.com/t/helene-a-lightweight-real-time-web-framework-for-node-js-and-bun/60626
- Repo https://github.com/leonardoventurini/helene
- Discussions https://github.com/leonardoventurini/helene/discussions
- NPM package https://www.npmjs.com/package/helene
- Discord https://discord.com/invite/PbY36PU75C
- Any others?
## Screenshot
Supporting many more webbrowsers:
<img src="https://wekan.github.io/manybrowser.png" width="100%" alt="Multiverse WeKan screenshot" />
## Talks
- Maintainer of WeKan since December 2016, xet7 (Lauri Ojansivu), about WeKan Multiverse at EU NGI Dapsi https://www.youtube.com/watch?v=BPPjiZHVeyM
- https://dapsi.ngi.eu/20-new-solutions-to-bring-the-power-of-data-back-to-peoples-hands/
- https://dapsi.ngi.eu/hall-of-fame/multiverse/
- WeKan Open Source kanban: add multiple Import/Export/Sync options and UI Designer, making it possible to create any app.
## Roadmap
From https://github.com/wekan/wekan/issues/4578#issuecomment-1407769397
## Standards
- Web Sustainability Guidelines (WSG) 1.0 at a Glance
- https://w3c.github.io/sustyweb/glance.html
- Minimize size, support all devices https://w3c.github.io/sustyweb/#benefits-90
- Other standards? https://news.ycombinator.com/item?id=36675451
## Browsers developed for therapy reasons
Are you fed up? Need some therapy? Write a webbrowser!
- Gosub
- https://adayinthelifeof.nl/2023/09/22/browsers.html
- Repo https://github.com/jaytaph/gosub-browser
- https://codemusings.nl/@jaytaph/p/MQpHToAx8c1KXyU98Auip4
- https://news.ycombinator.com/item?id=37608580
- Ladybird
- https://www.ladybird.dev
- Repo https://github.com/SerenityOS/serenity/tree/master/Ladybird
## Browsers that have Javascript
- Use Javascript to add drag-drop etc Javascript features, and hide UI elements like buttons etc that are for non-Javascript
## Browsers without using Websockets
- Maybe with long poll. Or no live update, require webpage reload.
- For internal corporate networks where websockets are not allowed
## Browsers that do not support Javascript
or have Javascript disabled for security reasons.
- Netsurf https://www.netsurf-browser.org/downloads/ , Development Builds https://ci.netsurf-browser.org/builds/
- RISC OS https://www.riscosopen.org/content/downloads , https://www.riscosdev.com/direct/
- ReactOS https://reactos.org , https://github.com/howinfo/howinfo/wiki/ReactOS
- Redox OS https://www.redox-os.org
- Haiku, Linux, Windows, Amiga, Atari etc
- Amiga: AWeb, iBrowse
- Dillo Webbrowser at FreeDOS https://github.com/wekan/wekan/issues/4578#issuecomment-1248525591
- Netscape, IE, etc all browsers at all OS/CPU
- FreeDOS: Dillo, Arachne
- Text based browsers: Lynx, Links, w3m (sudo apt-get install w3m w3m-img)
- Ancient browsers:
- http://9p.sdf.org/who/tweedy/ancient_browsers/
- https://news.ycombinator.com/item?id=34981257
## Browsers that are programmable
- Nyxt
- https://github.com/atlas-engineer/nyxt
## Support more databases
- SQLite
- PostgreSQL
- Migrations between databases
- Using many databases at the same time
- Offline or Local-First
- https://news.ycombinator.com/item?id=37584049
- https://news.ycombinator.com/item?id=37488034
## Graphics
- Raphael JS, supports also many legacy browsers, with VML and SVG graphics https://dmitrybaranovskiy.github.io/raphael/
- Related forked repos for various graphics at https://github.com/raphaeljsorg
- Or alternatively, just use HTML4, images, imagemaps etc to be compatible to non-Javascript browsers
## Programming language alternatives
- Optionally, use some transpiler:
- https://en.wikipedia.org/wiki/Source-to-source_compiler
- Haxe https://haxe.org , with HaxeUI [GUI/WebUI](http://haxeui.org/) and [TUI](https://github.com/haxeui/haxeui-pdcurses)
- Wax https://github.com/xet7/wax
- Nim https://nim-lang.org
- V https://vlang.io
- Maybe transpiling UI to/from HaxeUI XML, HTML4, HTML5, Gopher, Gemini, Lazarus, Gambas, Godot, MUI/ZUI Amiga/AROS
- Cross-platform:
- C89 code for 30+ OS/CPU like at https://github.com/xet7/darkesthour
- Pascal code with TRSE https://lemonspawn.com/turbo-rascal-syntax-error-expected-but-begin/
- Embedded webserver, for example:
- C https://github.com/wekan/hx/blob/main/prototypes/code/webserver/works/c/server.c
- Sandstorm https://sandstorm.io , https://github.com/sandstorm-io/sandstorm
- Rust https://github.com/dwrensha/sandstorm-rawapi-example-rust
- C++ https://github.com/dwrensha/sandstorm-rawapi-example
- Try to avoid strange NPM packages
- https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-6/
## Benchmarks
- For selecting programming language:
- https://github.com/wekan/hx/tree/main/prototypes/code/webserver
- https://forums.meteor.com/t/performance-tests-between-meteor-3-meteor-2-help-on-format/60458
- https://www.techempower.com/benchmarks/
- https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks
## Screenshot of Multiverse WeKan at FreeDOS Dillo
![freedos-dillo](https://user-images.githubusercontent.com/15545/190492967-f2770d0e-86a1-4822-93e7-68c65b23d6c4.png)
## Screenshot of Multiverse WeKan at Netsurf
### Group and count by first character of board names
From https://github.com/wekan/wekan/issues/4578#issuecomment-1250143726
When there is a lot of boards, it is very useful to group by first character of board (and after that click charater to see list of boards for that character, to be added later). I could not figure out how to do it with MongoDB aggregate query. Here is how I did it with SQLite, for type board. SQLite returns results immediately. Note that emojis, UTF-8 shows also on Netsurf browser. TODO is to figure out, could I get these visible also in FreeDOS Dillo browser.
```
SELECT _id, substr(title,1,1), COUNT(*), type from boards
WHERE type=:type GROUP BY substr(title,1,1) ORDER BY substr(title,1,1) ASC;
```
Actually, somewhere I saved answer from ChatGPT or Bing AI search, what this SQL query using MongoDB Javascript syntax. So maybe I should ask again.
https://github.com/wekan/php/blob/main/page/allboardschar.php
![wekan-allboardschar](https://user-images.githubusercontent.com/15545/190877008-ec8a035b-10d4-432a-b3cb-581983b5e24e.png)
## Prototypes
### Redbean
- Currently xet7 actively working with this prototype: https://github.com/wekan/wekanstudio
- https://redbean.dev
- Minimal kanban board drag drop example
- Repo https://github.com/wekan/hx/tree/main/prototypes/code/webserver/works/fullmoon
- Redbean amd64 binary works at Win/Mac/Linux/BSD/BIOS without any modifications, because it is based on Cosmopolitan https://github.com/jart/cosmopolitan
- Uses HTMX https://htmx.org at UI
- Saves to SQLite database
- Petclinic fork, using Blink to run at s390x https://github.com/wekan/wekan/wiki/s390x#petclinic-s390x
### PHP
- Repo https://github.com/wekan/php
- Features:
- Some webpages compatible with all browsers
- SQLite list all boards with first character, show board with some data
- MongoDB test for newer MongoDB
- upload file(s) with drag-drop, for upcoming feature https://github.com/wekan/wekan/issues/2936
- RTL https://github.com/wekan/wekan/issues/3376#issuecomment-1243922087
- Not yet: Login, Move card
### Gambas
- Repo https://github.com/wekan/hx/tree/main/prototypes/ui/gambas
- Features: Login, dropdown menu structure, SQLite database
- Not yet: Show board
- Problems: Gambas login page etc requires Javascript, does not work in Netsurf
### Meteor SSR
- https://github.com/wekan/we
- Features:
- Only serverside rendering. Javascript removed removed from frontend.
- Only test webpage. No actual features.
### Node.js 20, Bun and Deno
- Repo https://github.com/wekan/wekan-node20
- Features:
- main.js makes database queries to many databases
- Database drivers:
- MongoDB driver for Legacy MongoDB 3.2.x, using MongoDB from `sudo snap install wekan`
- MongoDB driver for newest MongoDB included, using MongoDB 6.x from rebuild-wekan.sh from https://github.com/wekan/wekan
- FerretDB proxy to PostgreSQL, from docker-compose.yml
- FerretDB proxy to SQLite, from docker-compose.yml
- Bun size is about 93 MB
- Deno size is usually about 350 MB https://github.com/wekan/wekan-node20/releases , but from source built Linux arm64 is 1.1 GB because of some bug somewhere.
- Deno also includes Node.js as Deno's Node.js compatibility layer.
- Node.js supports many CPU/OS
- Node.js is used in production and has traceability. https://changelog.com/jsparty/294
- https://github.com/wekan/wekan/wiki/s390x
- https://nodejs.org/dist/latest-v20.x/
- https://github.com/wekan/node-v14-esm/releases/tag/v14.21.4
### Haxe
- https://haxe.org
- Hello world example
- Repo https://github.com/wekan/hx/blob/main/prototypes/code/hello
- Transpiled with Haxe to many programming languages
- Tinkweb
- Repo https://github.com/wekan/hx/tree/main/prototypes/ui/tinkweb
- Has router and webpage
- Transpiles to PHP and Node.js
### FreePascal
- Repo https://github.com/wekan/hx/tree/main/prototypes/code/webserver/works/freepascal-router
- Router and some webpage
- Works at many retro and modern OS, but not at s390x that FreePascal does not support yet https://wiki.freepascal.org/ZSeries
### FreeDOS and Bash
- Repo https://github.com/wekan/wedos
- Features:
- DOS: .bat script, that shows menu, and uses SQLite DOS version to make queries to WeKan SQLite database
- Bash: .sh script, that shows menu, and uses SQLite CLI to make queris to WeKan SQLite database
### Minio
- Repo: https://github.com/wekan/minio-metadata
- Features:
- Uses Bash script and CLI binaries to migerate text data and attachments from MongoDB to SQLite and Minio
- There is Node.js, Go etc drivers for using Minio
### CloudFlare Workers
- Developing
- https://developers.cloudflare.com/pages/framework-guides/
- https://developers.cloudflare.com/pages/
- https://developers.cloudflare.com/workers/
- https://developers.cloudflare.com/pages/platform/language-support-and-tools/
- https://miniflare.dev
- https://blog.cloudflare.com/workers-playground/
- D1 SQLite
- https://developers.cloudflare.com/d1/platform/community-projects/#d1-adapter-for-kysely-orm
- https://blog.cloudflare.com/d1-open-beta-is-here/
- https://blog.cloudflare.com/introducing-d1/
- https://www.cloudflare.com/developer-platform/d1/
- https://blog.cloudflare.com/hyperdrive-making-regional-databases-feel-distributed/
- Northwind Traders example
- https://northwind.d1sql.com
- https://github.com/cloudflare/d1-northwind
- https://github.com/xet7/d1-northwind
- Kysely Query builder for D1 SQLite database
- https://codedamn.com/news/product/dont-use-prisma
- https://news.ycombinator.com/item?id=37804072
- https://kysely.dev
- https://github.com/kysely-org/kysely
- https://www.npmjs.com/package/kysely
- Awesome Kysely https://github.com/kysely-org/awesome-kysely
- Older database examples: https://github.com/cloudflare/db-connect
- Hono
- https://blog.yusu.ke/hono-htmx-cloudflare/
- https://news.ycombinator.com/item?id=37165054
- https://github.com/yusukebe/hono-htmx
- https://github.com/xet7/hono-htmx
- https://developers.cloudflare.com/pages/framework-guides/
- WebGPU
- https://blog.cloudflare.com/webgpu-in-workers/
- https://news.ycombinator.com/item?id=37673999
- CloudFlare TV https://cloudflare.tv
- CloudFlare https://cloudflare.com
- TODO example with KV https://github.com/wekan/cloudflare-workers-todos
### Swap microframework, vs HTMX
- https://github.com/josephernest/Swap
- https://news.ycombinator.com/item?id=35991783