Ruby HTML CSS JavaScript
Latest commit a53276b Feb 19, 2017 @josepjaume josepjaume committed on GitHub Processes ending soon should be "active processes" instead (#975)
* Processes ending soon should be "active processes" instead

* Normalize translations
Permalink
Failed to load latest commit information.
.github Better issue template (#876) Feb 9, 2017
bin Fix rubocop issues Sep 14, 2016
decidim-admin Reorder remaining steps after step deletion (#990) Feb 16, 2017
decidim-api Move all GraphQL code to lib (#946) Feb 14, 2017
decidim-budgets New Crowdin translations (#988) Feb 16, 2017
decidim-comments Fix optimistic ui for comments (#987) Feb 16, 2017
decidim-core Processes ending soon should be "active processes" instead (#975) Feb 19, 2017
decidim-dev Raise exception on translation missing (#960) Feb 15, 2017
decidim-meetings Allow nil values to contribution_count and hide them from template in… Feb 16, 2017
decidim-pages Refactor how HTML and meta titles work (#981) Feb 16, 2017
decidim-proposals New Crowdin translations (#988) Feb 16, 2017
decidim-results New Crowdin translations (#988) Feb 16, 2017
decidim-system Update i18n-tasks (#892) Feb 13, 2017
docs Remove turbolinks (#616) Jan 26, 2017
lib Add specs and move initializer from templates to feature Feb 10, 2017
spec Changes for migration (#659) Jan 30, 2017
.babelrc Use webpack 2 (#337) Dec 13, 2016
.codeclimate.yml Fix rubocop rules (#533) Jan 18, 2017
.csslintrc Add CodeClimate config Sep 14, 2016
.dockerignore Add project files for using as a standalone image Sep 27, 2016
.eslintignore Remove relative references from `decidim-dev` (#371) Dec 24, 2016
.eslintrc.json Update dependencies (#895) Feb 13, 2017
.gitattributes Add basic comments module (#250) Dec 12, 2016
.gitignore Upgrade to webpack 2.2.0-rc.3 (#468) Jan 10, 2017
.hound.yml Add an API documentation endpoint (#181) Nov 10, 2016
.inch.yml Add inch CI for tracking inline code docs (#472) Jan 10, 2017
.mention-bot Improve mention bot settings (#894) Feb 13, 2017
.rubocop.yml Fix rubocop rules (#533) Jan 18, 2017
.ruby-version Update ruby to 2.4.0 (#440) Jan 5, 2017
.travis.yml Upgrade to webpack-2.2.0 (#538) Feb 3, 2017
.yardopts Add yardopts (#996) Feb 17, 2017
CODE_OF_CONDUCT.md Cache bundler dependencies on TravisCI (#167) Nov 2, 2016
Dockerfile Add Decidim Budgets feature (#643) Feb 1, 2017
Gemfile Use foundation rails helper rc (#505) Jan 14, 2017
Gemfile.lock Version bump Feb 17, 2017
LICENSE-AGPLv3.txt Improve and rename license (#200) Nov 11, 2016
README.md Add more badges (#997) Feb 17, 2017
Rakefile Add budgets and results to the release list Feb 2, 2017
codecov.yml Ignore `.bundle/` folder in COdecov (#498) Jan 12, 2017
crowdin.yaml Revert "Update Crowdin configuration file" Feb 14, 2017
decidim.gemspec Add Decidim Budgets feature (#643) Feb 1, 2017
docker-compose.yml Fix database configuration for generated apps Sep 28, 2016
jsconfig.json Add basic comments module (#250) Dec 12, 2016
karma.conf.js Add proposal filters (#474) Jan 13, 2017
package.json Update node dependencies (#959) Feb 14, 2017
run_ci.sh Cache node_modules and run yarn tests for GEM . only (#350) Dec 14, 2016
webpack.config.js Upgrade to webpack 2.2.0-rc.3 (#468) Jan 10, 2017
yarn.lock Update node dependencies (#959) Feb 14, 2017

README.md

Decidim Gem Gem GitHub contributors License: AGPL v3

Demo Yard Docs Gitter

Code quality

Build Status Code Climate codecov Dependency Status Crowdin Inline docs

Project management [See on Waffle.io]

Stories in Discussion Stories in Ready Bugs In Progress In Review


What do you need to do?


Installation instructions

First of all, you need to install the decidim gem, which currently is in a prerelease status.

$ gem install decidim decidim-core --pre

Afterwards, you can create an application with the nice decidim executable:

$ decidim decidim_application
$ cd decidim_application

Note: These steps will be replaced by a simple gem install decidim && decidim decidim_application once the gem is released.

You should now setup your database:

$ rails db:setup

This will also create some default data so you can start testing the app:

  • A Decidim::System::Admin with email system@decidim.org and password decidim123456, to log in at /system.
  • A Decidim::Organization named Decidim Staging. You probably want to change its name and hostname to match your needs.
  • A Decidim::User acting as an admin for the organization, with email admin@decidim.org and password decidim123456.
  • A Decidim::User that also belongs to the organization but it's a regular user, with email user@decidim.org and password decidim123456.

This data won't be created in production environments, if you still want to do it, run:

$ SEED=true rails db:setup

You can now start your server!

$ rails s

Upgrade instructions

$ bundle update decidim

And don't forget to run the upgrade script:

$ rails decidim:upgrade

If new migrations appear, remember to:

$ rails db:migrate

Docker instructions

You can use Docker instead of installing the gems yourself. Run docker-compose build and then you can generate a new decidim application using docker-compose run --rm decidim bundle exec bin/decidim <app-name>.

Also you can run it as a standalone container like this: docker run --rm -v $(pwd):/tmp -it codegram/decidim bundle exec bin/decidim /tmp/<app-name>

Now you have a new Decidim app created at <app-name> 🎉

How to contribute

In order to develop on decidim, you'll need:

  • PostgreSQL 9.4+
  • Ruby 2.4.0
  • NodeJS with yarn (JavaScript dependency manager, can be installed with npm install yarn)
  • ImageMagick
  • PhantomJS

The easiest way to work on decidim is to clone decidim's repository and install its dependencies

$ git clone git@github.com:AjuntamentdeBarcelona/decidim.git
$ cd decidim
$ bundle install
$ yarn install

You have several rake tasks available for you:

  • bundle exec rake development_app: Creates a development app inside decidim_development which you can use to run an application with the gems in your path.
  • bundle exec rake test_all: Generates a test app for every engine and runs their tests.
  • bundle exec rake generate_all: Generates all the tests apps but doesn't run the tests - this is useful is you want to run them manually afterwards.
  • cd <component> and do bundle exec rspec spec to run those particular tests.

Browse Decidim

After you create a development app (bundle exec rake development_app):

  • cd development_app
  • bundle exec rails s
  • Go to 'http://localhost:3000'

Optionally, you can log in as: user@decidim.org | decidim123456

Also, if you want to verify yourself against the default authorization handler use a document number ended with "X".

Browse Admin Interface

After you create a development app (bundle exec rake development_app):

  • cd development_app
  • bundle exec rails s
  • Go to 'http://localhost:3000/admin'
  • Login data: admin@decidim.org | decidim123456

Components

Component Description
Admin This library adds an administration dashboard so users can manage their organization, participatory processes and all other entities.
API This library exposes a GraphQL API to programatically interact with the Decidim platform via HTTP
Comments The Comments module adds the ability to include comments to any resource which can be commentable by users.
Core The basics of Decidim: users, participatory processes, etc. This is the only required engine to run Decidim, all the others are optional.
Dev This gem aids the local development of Decidim's features.
Meeting The Meeeting module adds meeting to any participatory process. It adds a CRUD engine to the admin and public view scoped inside the participatory process.
Pages The Pages module adds static page capabilities to any participatory process. It basically provides an interface to include arbitrary HTML content to any step.
Proposals The Proposals module adds one of the main features of Decidim: allows users to contribute to a participatory process by creating proposals.
System Multitenant Admin to manage multiple organizations in a single installation

Further configuration

Technical tradeoffs

Turbolinks

Decidim doesn't support turbolinks so it isn't included on our generated apps and it's removed for existing Rails applications which install the Decidim engine.

The main reason for this is we are injecting some scripts into the body for some individual pages and Turbolinks loads the scripts in parallel. For some libraries like leaflet it's very inconvenient because its plugins extend an existing global object.

The support of Turbolinks was dropped in d8c7d9f. If you're interested in bringing turbolinks back, further discussion is welcome.

TODO: Improve guide.