Underground CRM

Underground CRM is an open-source Django application that provides the core functionality for a grassroots movement:
- A database of members and their activity (CRM)
- Rich-text editing for web pages (CMS)
- Bulk emails using SMTP2Go
The Fusion Party has signed up as the flagship client for the software, and has now seen its biggest operating expense go from $300 / month to $23.86 / month, a cost reduction of 92%.
During the migration, all payments were successfully migrated from NationBuilder to a new Stripe account without donors needing to recreate their monthly commitments.
All pages were migrated and most were reconstructed using Wagtail blocks, so even Fusion's most customised HTML can now be edited with rich text and accurate, canonical previews for how it will look on mobile, tablet and desktop:
Since users couldn't be migrated with their passwords, it could have been a lot of friction for users to reset their passwords, but by building on top of Django, we could use OAuth and provide three common options.
Offering users the option of OAuth also meant we could get a profile picture, which is very handy for remembering who's who when reaching out to our members.
Notice too that the admin panels support internationalisation − I don't wish for the spread of this software to be limited to English-speaking places.
Although the application currently seems very similar to NationBuilder, it should be mentioned that design decisions are already supporting the option of running things in a federated way, so that a grassroots movement might have cells around a country, with each only holding a subset of member records.
Most of our objects use UUIDs, so that merging two cells together is unlikely to result in conflicts. We are also supporting the notion of Feed Pages that normally render as HTML, but which are also available as RSS feeds. Underground CRM instances can then subscribe to the RSS feed from another instance and publish those events or blog posts alongside its own.
For organisations worried about having their membership disrupted, it's also worth mentioning that the system has been designed to be minimally reliant on Big Tech. The Fusion Party's application is running on a single EC2 instance in AWS, although considering that this t4g.medium instance only has 4GiB of memory and 2 vCPUs, it could realistically be replaced by a Raspberry Pi with a static IP address or a Cloudflare Tunnel.
The Fusion Party installation is using Cloudflare for its CDN and its object storage (R2), but these services are not strictly necessary, they just result in performance improvements. If we had a static IP address and a self-hosted web application, the objects (images, JavaScript etc) could be served from the local file system, and the lack of a CDN would just mean that the pages take a bit longer to load. If the delay was deemed unacceptable, the public-facing pages for a political party are rarely changed, so they could realistically be pre-built as static pages using wagtail-bakery.
Framing the public pages as potentially static is how I achieved the loading times of ~13ms (LCP) for the Fusion website − I'm using React Islands, a pattern where the pages have placeholder islands that are rendered lazily on the client side, each with its own React root.
You'll notice that these islands don't appear in the underground-crmrepository − that repository holds all the logic for generic political parties, then the idea is that each specific organisation will have their own repository that implements a style and a deployment setup. For the Fusion Party, this is my private repository fusion-underground.
Where Underground CRM is Suitable
Targeting political organisations has a few impacts on the design of the application:
We use Django's Jinja2 templates and rely on them being committed to the repository rather than edited online. It's presumed that templates would change rarely and there might be multiple templates being changed at the same time, to revise the site-wide style.
Your organisation might be more accustomed to JSX components as opposed to Jinja2 templates − professional front-end engineers would probably lean towards components, whereas back-end engineers or non-engineers would probably find template files more intuitive.
- We carry out geocoding for a person's address. This is only necessary if you need to see it on a map or if you want to calculate distances.
- Political groups have a blurry line between fans, members and staff. This means that underground-crm is getting a permission model that allows a user to see only specific user records, or to modify only specific web pages. Permissions would typically apply to all records orall pages, so you might not need the extra complexity here.
- The application has been architected around keeping costs very low. For instance, we're running our own Addressr instance for geocoding, and updating it every 3 months when the government releases new postal address data.
The application is suitable for self-hosting as much as possible. If you are worried about being locked in by your cloud provider; rug-pulled by your cloud provider; or shut down by a government; then Underground CRM is for you.
If you're not worried about a big subscription fee or you don't think you'll ever have powerful enemies, then you have more options for your CRM, some of which have fancy AI built in.
- We don't have a style library − the project has initially been aimed at replacing the Fusion Party's reliance on NationBuilder, so we simply migrated the existing styling into Django. You'll see we've implemented plenty of tools for migrating away from NationBuilder, but if you're getting started on Underground CRM as the first CRM for your organisation, then you'll have to define your own CSS to make the site look respectable.
- You need to sort out your own deployment; we do not offer hosting. That said, I am available for contracting and I am willing to work on retainer, jumping in to perform maintenance or bug fixes when needed. I am not going to limit my services just to allies of the Fusion Party.