dote
A topic based voting system for open collaboration.
This solution is currently being used to decide the direction of Dojo 2 and is built upon Dojo 1.9 and NodeJS, so it is as much of "eat your own dog-food" as is possible. It is specifically designed to document and make clear decisions and allow a diverse community of contributors to collaborate.
The question of "why re-invent the wheel" when there are other solutions available out there. The biggest and most compelling reason is that the vast majority of them lacked robust e-mail integration. dote attempts, as far as possible to make interaction with the community as rich and flexible via e-mail as it does via the website. This allows each individual to participate fully without having to remember another login, or remind themselves to check another site.
A secondary issue was that most of the tools available out there were for users to demonstrate their support or lack of for "issues" or "features". The Dojo community needed something where the intent of the community was clear, that members could clearly document their thoughts, including rich mark-up and then the topic would be "owned" by an individual and decided upon. While other tools came close to this model, none of them were exactly the governance model that was used by the community.
Requirements
dote depends on the following projects:
- express - HTTP Server Framework
- jade - HTML Templating
- Stylus - CSS Templating
- Nib - CSS3 Enhancements for Stylus
- Font-Awesome - Font Based Icons
- Dojo Toolkit - JavaScript Framework
- setten - Dojo-style Modules for Node
- ComposeJS - JavaScript Object Composition
- Persevere - Storage Abstraction Layer
- Moment.js - Date Handling (including humanisation)
- marked - markdown Parser
- Highlight.js - Code Block Highlighting
- emailjs - NodeJS STMP Client
- node-imap - NodeJS IMAP Client
- mailparser - Mail Parsing Library
- feed - RSS and Atom generator
- node-mongodb-native - Node Native MongoDB Library
- juice - Inlining CSS into HTML
- ldapauth - LDAP Authorisation
- colors - Node Console Colors
- MongoDB - Persistent Document Store
You will need git and NodeJS including npm
to properly install dote. dote has been tested
on NodeJS 0.8.4 - 0.8.15 and 0.10.5.
Installation
-
Install MongoDB and have available.
-
Clone the repository recursively with
git
:$ git clone --recursive https://github.com/kitsonk/dote.git
-
Install NodeJS dependencies with
npm
:$ cd dote $ npm install
-
Edit the
config.json
in the root directory. -
Set the passwords in the environment:
$ export DOTE_LDAP_PWD="password" $ export DOTE_MAIL_PWD="password"
-
Start the server:
$ node server
-
Start the worker:
$ node worker
Optimised Client Build
dote allows you to utilise the Dojo Builder to optimise the client side JavaScript that is used. In order to utilise the optimised build, run the builder (which is not included):
$ path/to/dtk/util/buildScripts/build.sh --profile dote.profile.js
This will output an optimised build to ./lib/
. Then you need to point the instance at it by changing the base
parameter in the config.json
file:
{
"base": "lib"
}
And changing the _static/css/dote.styl
to point at the optimised CSS:
@import url("../../lib/dote-client/resources/client.css")
Notes
- dote respects the NODE_ENV and maps this appropriately to the configuration file, defaulting to
development
. - While the LDAP and mail password can be set in the
config.json
but they will be overridden by any environment variable. You generally shouldn't store clear text passwords in static files. - There are 3 types of authentication support (
auth
in the configuration). There isdefault
which simply means all passwords are set to "password", there isinternal
which stores passwords as a SHA512 digest with an added salt string and there isldap
which hands off authentication to the LDAP server configured in the files. - If using the internal password/authorization instead of LDAP, you should set the
NODE_SALT
environment variable to an appropriate salt. If not provided, the salt for the passwords defaults to the one stored in plain text in the code, which isn't advised. Of course if you change, or lose the salt for your environment, no passwords digest properly, which means no one will be able to log in.