Choosing between Decidim overrides and custom modules
An organization running Decidim often reaches a point where admin settings are not enough, but the change still has to survive the next supported minor release. The choice between overriding views, monkey patching and building a module is mainly an upgrade-cost decision. Each approach touches Decidim's code to a different depth, and that depth determines how much work each future upgrade will need. Decidim is built on Ruby on Rails and PostgreSQL and licensed under the AGPL-3.0, so any change you make to its code is something your team will carry forward, and the license terms should be reviewed with counsel before code is distributed to others.
A view override replaces or extends a specific template, so it touches only the markup for one screen. It is the narrowest option and usually the easiest to review. Monkey patching changes the behavior of existing Ruby classes or methods at runtime, which reaches further and breaks more quietly when Decidim's internals move. A custom module keeps your code in its own package with a defined boundary, which costs more to set up but gives a clearer record of what was changed. Ask your team to list every file and method each change touches, then check that list against the release notes of the version you plan to adopt next.
A sub-folder module is often a sensible first step when the change is real but its scope is still unclear. It groups your overrides in one place under version control, so you can see what you own and test it as a unit before committing to a full packaged module. Plan for upgrades from day one: move to the next minor version one step at a time, follow each release's upgrade instructions, and back up the database first, because some releases change database structures. Confirm with your implementation partner or internal team which of your changes survive each step, and budget the review time for each upgrade before the change goes live.
Which change approach fits which kind of change
This table compares view overrides, monkey patches, a sub-folder module and a packaged custom module on what they change, how they behave across upgrades, who maintains them and when each fits. Read each column as one option, and treat the upgrade row as the main cost signal before you choose.
| Aspect | View override | Monkey patch | Sub-folder module | Packaged custom module |
|---|---|---|---|---|
| What it changes | Mirrors a core view path so the template is replaced with your version | Alters a core class or method at load time | Adds code and views in a folder inside the application, kept separate from core | Adds code in its own gem with its own versioning and tests |
| How it survives an upgrade | Breaks silently if the upstream view changes, so each release needs a diff review | Most fragile, since changed core method signatures can fail without warning | Survives as long as hooks and APIs still exist, and upgrade notes can be checked file by file | Survives with the most control, since compatibility is declared and tested per release |
| Who maintains it | Team that edits HTML and templates, usually with frontend skills | Senior Rails developers who understand Decidim internals | Platform team, with ownership visible in the repository | Platform team with release discipline, often with tests in CI |
| Visibility of changes | Hidden in a copied file unless tracked in a register | Hidden inside load-time code, hardest to find during review | Listed in one folder that reviewers can read | Listed in a dependency file with a pinned version |
| When it fits | Small wording or layout changes to one view | Rarely justified, only as a short-term fix with a removal plan | A first step for branding, texts or small behavior changes owned by one team | Features reused across organizations or expected to outlive several releases |
| Confirm before you choose | Which view paths your change touches and how many copies you would maintain | Whether a method you patch is stable in your target release | Which hooks and extension points your release provides | Your release cycle, test coverage and who reviews upstream changes |
What each approach costs at upgrade time
Each approach to changing Decidim adds upgrade work, and the cost shows up at a different point. The cards below compare the cost of copied views, monkey patches and modules, and they all depend on the same upgrade discipline: one minor version at a time, with a database backup first.
Copied views drift from core markup
A copied view is a snapshot of a core template. Every later release that changes that template leaves your copy behind, so the markup can silently stop matching the new layout, labels or accessibility fixes. Before each upgrade, diff each copied file against the new core version and decide whether to re-apply your changes or retire the copy. Ask your team to keep a list of every overridden view so the review has a finite scope.
Updating DecidimMonkey patches break on signature changes
A monkey patch replaces or wraps a method on a core class at runtime. It works until core changes the method name, arguments or return value, and then it can fail quietly or fail at the wrong moment. Treat every patch as a dependency on a specific core method. During an upgrade, check each patched method against the new release and run the tests that exercise it, because a patch that loads without error can still behave differently.
Modules track their own compatibility
A custom module lives in its own code and declares which Decidim releases it supports. It avoids drift in core files, but it must be tested and updated whenever a supported release changes. Confirm which branches your module targets, currently 0.32.x and 0.31.x, and plan a test run against each one before you move the platform. The module is the approach most likely to need a version bump during an upgrade, so budget for that work explicitly.
One minor version at a time
The update guide asks you to move one minor version at a time, for example 0.29 to 0.30 before 0.31, and to follow each release's upgrade instructions because some change database structures. Every customization you carry has to be checked at each step, so the number of hops multiplies the upgrade effort. Ask your team to record which customizations were verified at each step, not only at the final version.
Update guideBack up the database first
The update guide says to back up the database before upgrading, and some release steps change database structures. A backup is the rollback point if a customization fails after a migration, so the recovery plan matters as much as the backup itself. Confirm that restores have been tested on a staging copy, and that custom database changes or data migrations are recorded so they can be replayed or reversed.
How to decide where a Decidim change belongs
Start with the cheapest option: check whether admin settings, locale files or existing configuration already cover the change. If they do not, ask whether a view or text change is enough. Only when core behavior must change does the path branch to an override, a monkey patch or a sub-folder module. Every branch ends at the same upgrade review, because each option adds code that must be re-checked before a minor version upgrade. Confirm the chosen option against the release you run.
Decision path from admin configuration to the upgrade review each custom change must pass.
Starting with a sub-folder module
This sequence turns a set of Decidim changes into a contained, reviewable module that can be checked against each supported release before it reaches production. It keeps the upgrade cost visible from the first change onward.
Inventory every requested change
The implementation lead lists each requested change as a single line item: the view, route, locale key, stylesheet, model behavior or job it touches. Items that need a core file to change are flagged separately, because they drive the upgrade cost most. The step is done when every change has an owner, a target file or area, and a flag for whether it needs a core edit. Some items may turn out to be settings in the admin panel and need no code at all.
Create the sub-folder module structure
The developer creates one module folder in the application that holds all custom code, with its own directory for views, locales, stylesheets and initializers. Nothing from the change list is written into core paths yet. The module is wired into the application through a single load point so it can be enabled or disabled as one unit. The step is done when the application boots with the empty module loaded and the core tree is unchanged in version control.
Move each change into the module
The developer implements each flagged change inside the module folder, using the extension points Decidim provides where they exist, and uses an override only where no extension point covers the change. Any monkey patch is placed in a dedicated file within the module with a comment naming the core file and method it changes. The step is done when every change lives inside the module and the list of core touches is limited to the ones the team has agreed to accept.
Record every core file touched
The developer keeps a register that names each core file, method or template the module overrides or patches, the Decidim version it was written against, and the reason for the change. The register is stored in the repository next to the module and reviewed whenever a version step is planned. The step is done when the register matches the code, confirmed by a search for every override and patch point.
Write checks that run on each supported release
The team writes automated specs for each custom behavior and for each overridden core point, then runs them against every release line the organization plans to support. Decidim supports only the last two minor versions with security updates, so the check matrix should follow the lines in use, which the team confirms in the Decidim security policy before choosing targets. The step is done when the checks pass on the current version and fail loudly on a deliberately broken override.
Confirm the module loads after each version step
Before any upgrade is attempted, the team runs the load check on the target version, which confirms the application boots, the module is registered, and every recorded override point still exists with the same signature. Decidim's update guide asks for one minor version at a time, so this check runs after each step, not only at the end. The step is done when the boot and load check passes at each intermediate version and any missing override point is logged as a blocking item.
Test the full module on a staging copy
The team restores a recent production database backup to a staging copy, deploys the module there and runs the functional checks along with a manual review of the changed pages in each supported locale. Backups should be taken before any database step, as the update guide requires. The step is done when the staging results are signed off by the business owner and the register and check results are attached to the release record.
Promote the module to production
The release is deployed to production with the module enabled, using the same artifact that passed staging, and the team watches error logs and key pages for the first working period. A rollback path is documented, including how to disable the module as one unit. The step is done when production runs the tested artifact, the rollback has been rehearsed, and the register is the reference for the next upgrade plan.
When a packaged module is worth the extra work
Packaging a change as a gem or shared module is worth the effort once the change stops being specific to one installation. The usual signals are a new verification handler that several organizations need, a component that appears in more than one platform, or logic that you want to version and test separately from your Decidim application. A one-off branding tweak or a single view adjustment rarely justifies this. Before committing, list every organization or environment that would load the code and ask whether each one would accept the same behavior. If the answer is no, keep the change as an override or a sub-folder module until the requirements settle. The build steps for a new component or verification handler are covered in the component scaffolding topic, so this section focuses on the decision and its ongoing cost.
The main cost of packaging is ownership. Once code lives in its own gem, your team is responsible for confirming it still works each time you move to a supported Decidim release, and for keeping its dependencies and interfaces aligned with the core. Decidim supports only its last two minor versions with security updates until version 1.0, so you should plan to retest the package against each release you adopt, not only the one you started with. Ask who will run that compatibility testing, how often, and what happens when a core change breaks the package during an upgrade. Confirm the release branches you plan to support, and agree whether the package will be published, shared with other organizations, or kept private, because each choice changes who reviews and maintains it.
A practical test is to run the change as a sub-folder module for at least one full upgrade cycle before packaging it. If it survives that cycle with few fixes, its interfaces are probably stable enough to justify a gem. If it needs constant edits, the feature is still changing and the packaging overhead will land on a moving target. Record which upgrade steps required touching the module, because that log becomes the evidence you need when deciding whether a second organization should adopt it. Review the decision again whenever the module gains a new consumer, since each additional consumer raises the cost of breaking changes.
Questions buyers ask before choosing an approach
What drives the cost of an override compared with a custom module?
The main driver is how many Decidim files you change and how often those files change upstream. An override copies a core view or partial into your application, so every upstream change to that file has to be reviewed and merged by hand. A custom module keeps your code in its own namespace and hooks into Decidim through its documented extension points, so the cost moves toward building and testing the module once and then keeping its interfaces compatible. Initial build effort is often lower for an override, but recurring effort at each upgrade can be higher. Ask any partner to split the quote into one-time build work, testing, and the recurring review each minor upgrade will trigger, and to name the files each option touches.
How long does an upgrade review take when many core files are touched?
Review time grows with the number of core files you have changed, because each one needs a diff against the new release and a decision about whether your version still fits. Decidim's update guide asks you to move one minor version at a time and follow each release's upgrade instructions, because some releases change database structures. That means every upgrade step includes the core-file review plus the database work and a full regression pass. The guide and the release notes for your target version are the authority on what has changed, so ask a partner to list the overridden files, check each against the target release, and give you a duration only after that inventory exists.
What does the work need from our own team?
Your team supplies decisions, access and review, and the partner or your developers supply the code. Expect to provide a named owner for requirements and text changes, staging and production access for your environment, the identity, SMTP and storage details the platform depends on, and a reviewer who understands your organization's branding and legal wording. Someone also has to own the database backup before each upgrade, since the update guide makes that step mandatory. Confirm these responsibilities in the written scope so that a missing approval or environment does not become an unplanned cost.
Can an internal developer maintain a sub-folder module?
Yes, if that developer knows Ruby on Rails and is comfortable reading Decidim's code, and if the module is kept small and clearly separated from core. A sub-folder module sits inside your application's own directory structure, which makes it easy to find, test and version with the rest of your code. The risks are key-person dependency and drift: when one developer leaves, the knowledge leaves too, and an unreviewed module can fall behind the supported release line. Ask your team to document each extension point the module uses, keep it under version control, and schedule a compatibility check with every supported minor version.
Which Decidim versions are still supported for security fixes?
Until version 1.0, Decidim supports only the last two minor versions with security updates. At the time this page was prepared, that means the 0.32.x and 0.31.x branches, and older branches such as 0.30.x are not supported. Decidim's security policy also gives implementers a grace period to apply patches before details are disclosed: two months for standard vulnerabilities and four months for critical ones. Any approach you choose should keep you on a supported branch, because an override or module built against an unsupported release inherits its risks. Check the security policy for the current branch list before you commit to a plan.
When should we bring in an outside partner instead of doing it ourselves?
Bring in a partner when the change touches many core files, when the upgrade calendar is tight, or when no one on your team can own the code after launch. A partner is also useful for a first review of whether an override is safer than a module for a given change. Look for a written, fixed scope that lists the overridden files, the module boundaries, the test plan, the upgrade procedure and the handover. Ongoing upgrades and testing can be handled through a retainer, and the scope should say which upgrades it covers. DeployOpen implements, customizes, hardens, backs up, upgrades, documents and supports self-hosted platforms inside your own infrastructure, and it does this under a written scope agreed before work starts.
What is the safest first step if we are not sure which approach fits?
A sub-folder module is usually the safest first step for changes that need code, because it keeps your work separate from Decidim's core files and makes the upgrade impact visible. Start by listing each requested change, the core file or extension point it depends on, and whether the change can be done with admin settings or locale overrides instead. Changes that only alter text or appearance often need neither an override nor a module. Use a staging copy to test the first version against the next supported minor release before you deploy it, and record the list of touched files so the next upgrade review has a starting point.
Security and operational risks of custom code
Every override, monkey patch or custom module becomes part of your Decidim security surface. The cards below cover the patching, disclosure and tracking risks that custom code adds on top of the core platform.
Custom code inherits patching duties
Decidim's security policy covers the core framework, but any override or monkey patch you add is code your team owns. When a vulnerability is fixed upstream, you must check whether your custom changes touch the affected files and whether the fix still applies to them. Treat every patched method as your own security liability. Ask your team to list which core files are overridden so that a security notice can be checked against them quickly.
Decidim security policyTwo-month and four-month patch windows
Decidim gives implementers a grace period of 2 months to apply patches for standard vulnerabilities and 4 months for critical ones before details are disclosed. These windows are short enough that a custom change blocking a core patch can leave you exposed after disclosure. The clock starts when the patch is published, not when your team starts testing. Confirm internally who owns each deadline and how long a review of your custom code typically takes.
Read the disclosure timelineCustom changes can block core patches
An override copies a core view or method at a point in time, so an upstream security fix to that code will not reach your instance until you reconcile the two. If the override is wide, a clean patch may conflict with it and force a rewrite under time pressure. Prefer small, isolated changes that can be reapplied in minutes over large copies of core files. Test a core patch against your overrides in staging before the deadline arrives.
Supported versions limit your options
Decidim supports only the last two minor versions with security updates until version 1.0, which currently means 0.32.x and 0.31.x. An installation pinned to an older branch to keep custom code working receives no security fixes at all. Custom code that only works on one old release is a security decision, not just a technical one. Ask whether your design can move forward with each supported minor release.
Decidim release historyReporting vulnerabilities in your code
Security reports about Decidim go to security@decidim.org or through GitHub Security Advisories. Vulnerabilities in your own overrides or modules do not go there, so your team needs its own intake and disclosure route for them. Define who triages issues in custom code before an incident, not during one. Confirm the contact points with your security team and document them alongside your deployment runbook.
Security reporting contactsVersion control and release review
Custom code kept only on a server, or in a copied tree with no history, cannot be diffed against the core version it was built for. Without that history, you cannot tell which change caused a regression or whether a security fix was applied. Track all overrides and modules in version control and review them at every Decidim release. Ask for a written list of each custom file, the core version it targets and the owner who signs off on each upgrade.
Setting up a change safely in a Decidim codebase
This sequence gives a team a repeatable way to add an override or module to Decidim, prove it works on a supported release, and leave a record that makes the next minor upgrade cheaper. Each step ends with a check that must pass before the team moves on.
Confirm the supported release and target version
Before touching code, record the Decidim minor version the platform runs and confirm it is one of the two lines that still receive security updates. Security support covers the last two minor versions until version 1.0, so the team should check the current release notes and the project's SECURITY.md before choosing a target. Also note the Ruby and Node versions the release requires. Done when the team has a written note of the current version, the target version, and the runtime versions, and the owner has signed it off.
Build a staging copy from a production backup
Restore a recent production database backup into a staging environment that matches production's Rails, PostgreSQL, file storage and background job configuration as closely as possible. Take the database backup first, because the update guidance treats a backup as a precondition for any structural change. Use anonymized data where personal information is involved, and confirm that the staging copy does not send real email or social login callbacks. Done when staging boots, a sample of processes, proposals and users loads, and the backup restore is recorded with its date and source.
Choose the change mechanism and document the decision
Decide whether the change belongs in a view override, a monkey patch, or a sub-folder module, and write one sentence on why. A sub-folder module is often the sensible first step because it keeps custom code separate from the core and is easier to review and remove later. Record the requirement, the files or classes affected, and the owner. Done when the decision record exists and a second engineer has read it and agrees the mechanism is the least invasive option that meets the requirement.
Implement the change in a sub-folder module
Add the change in the chosen location, keeping custom code out of the Decidim core where possible. Limit overrides to the smallest set of views or methods needed, and avoid patching behavior that another component depends on. Commit the change with a message that names the requirement it serves. Done when the code builds, the application starts on staging, and a reviewer can see every file the change touches in a single diff.
Run the test suite and manual checks
Run the project's automated test suite against the custom code and the supported release, then add tests for the changed behavior where the suite does not already cover it. Follow with manual checks on staging for the affected pages, roles, languages and any admin screens that the change touches. Include a logged-out visitor, a participant, and an administrator. Done when the suite passes, the new tests fail when the change is reverted, and the manual checklist is signed with dates and tester names.
Document each core touchpoint
List every core file, view partial, helper, locale key or configuration setting that the change depends on or overrides. For each touchpoint, record the Decidim version it was read from, the reason it is touched, and the test that exercises it. This list becomes the first thing an upgrader reads when a core file changes. Done when the touchpoint register is stored with the code and each entry links to its test or check.
Turn the register into an upgrade checklist
Convert the touchpoint register into a checklist for the next minor upgrade. For each item, the checklist should say what to compare in the new release's changes, which tests to rerun, and who approves the result. Include the database backup, the staging rebuild and the review of the upgrade instructions for that release, since they can change database structures. Done when the checklist is attached to the project, the owner has walked through it once, and it is scheduled to be used at the next upgrade.
How DeployOpen scopes Decidim customization work
DeployOpen starts every Decidim change by testing the requirement against what the platform already offers without code. Before any override or module is discussed, the team checks the admin-panel settings, the organization-level texts, the component configuration and the appearance options that a Decidim administrator can change directly. Many requests about wording, colors or which steps a participant sees can be met this way, and that answer is the cheapest one to maintain. The review records each requirement, the admin option that was checked, and the gap that remains, so the client can see why a code change is needed at all.
Where a gap remains, DeployOpen chooses the least invasive technical route that meets it. The team compares a view override, a stylesheet change, a locale override and a custom module against the files each one touches and how often those files change between releases. Monkey patching is treated as the option of last resort because it alters framework behavior that a later Decidim version may change without notice. For each candidate, the scope document states which files or classes are touched, which Decidim releases were checked, and what the upgrade check will need to cover. Clients should confirm with DeployOpen which upgrade path their own release schedule requires, since the Decidim update guide requires moving one minor version at a time.
Once the approach is chosen, the scope is fixed in writing before work starts. The written scope lists the in-scope changes, the named customization files, the test cases that prove each change, the upgrade impact notes, and the items that are out of scope, such as new component types or verification handlers. Clients should ask for each of these items in any quote, and should check that the document states who keeps the customized code current after go-live. A scope written this way makes later changes visible as scope changes rather than as silent drift in a shared codebase.
How DeployOpen works on this
DeployOpen plans, implements, customizes, documents and supports self-hosted open-source platforms inside your own infrastructure, including Decidim. For Decidim changes, we decide between overrides, monkey patches and a module against the upgrade path you need to keep, then build and hand over only what the written scope covers.
How we scope
- We list every requested change to views, texts, registration and behavior, and note which Decidim version each one targets.
- We classify each change as an override, a patch or a module, with the upgrade effort each choice creates.
- Engagements are fixed-scope, so deliverables, timelines and acceptance criteria are agreed in writing before build starts.
How we build
- We build sub-folder modules first where possible, keeping custom code separate from Decidim's core files.
- We record every override or patch with its file path, reason and the release it was checked against.
- We test changes on a staging copy of your installation before anything reaches production.
How we hand over
- You receive the code repository, a change register and step-by-step notes for the next minor version upgrade.
- We walk your technical team through the decision record so they can judge future requests themselves.
- Database backup and restore steps for the customizations are documented alongside the code.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- Retainer work can cover re-checking overrides and patches against each new Decidim release before you upgrade.
- Ask us to confirm the support scope, response expectations and upgrade effort in the written quote before you commit.

