Bringing institutions and people closer together

The Barcelona City Council decided to bet on participatory democracy to
consolidate democratic culture and strengthen the social fabric of one
of the fastest growing tech hubs in Europe.

In order to accomplish that, they looked at what the Madrid city council
had in place, and initially they wanted to adapt it to Barcelona. The
original developers of the Madrid platform recommended us to do the
project, and so it began.

After trying to adapt the original platform, we realized that there were
some architectural flaws that resulted in very low upgrade rate —every
new installation required forking the project, and ended up almost never
incorporating upstream changes and security updates. It had been a
project designed for a specific city council, and naturally it wasn't as
well suited to expansion to other councils and institutions.

And so we decided to go back to the drawing board: we built a new
platform from the ground up with maintainability, extensibility and
customization in mind. After releasing it under an open-source license,
we continue to lead the contributions of more than 50+ community
contributors. It has been now adopted by 30+ cities and 20+ other
regional institutions and federations all over the world, some of them
with customizations to better suit their own unique processes.

A free open-source participatory democracy for cities and organizations

The challenge: from one to many organizations

After trying to adapt the inherited Madrid platform to the Barcelona
City Council needs, we quickly realized there were some serious
challenges — practically every aspect was specifically tailored to the
Madrid City Council needs.

However, the major problem we saw wasn't in maintainability and
customization —it was in the process of porting to other councils and
organizations. It was a monolithic codebase that needed to be forked for
every new installation, as each organization required its own
modifications. In practice, any new code upstream would rarely end up in
every installation, as merging changes became more difficult and less
worthwhile —and so installations were gradually diverging.

The solution: not an application, but a framework

We chose to leverage the power of Rails engines to flip the problem on
its head —each installation would be its own application, using Decidim
as a gem that provided functionality. This way, each installation could
pick and choose which features they needed and implement independent
customizations in their own application. When a new update was released
upstream, they just needed to update the version and pull the new one.

By keeping Decidim as a library, the code contracts were much clearer
and easier to respect —it was impossible for an application to couple
themselves to non-public parts of the APIs we provided, and thus
upgrades became trivially safe.

"We chose to leverage the power of Rails engines to flip the problem on
its head —each installation would be its own application"

An open platform with international adoption

Even though it required a little bit more design and architectural work
upfront, we launched on time and under budget, and our extensible
architecture began to pay off immediately —more and more institutions
came on board, and the ecosystem continues to thrive today.

Decidim has become a very popular project, being in active use by more
than 30 city councils worldwide and 20 civil organizations.

We continue to lead the open-source project with more than 50+
contributors, performing code reviews and resolving community questions.

"We launched on time and under budget, and our extensible architecture
began to pay off immediately"