A Rails engine for building community platforms: communities, membership, events, posts, pages, messaging and mutual aid exchanges, with privacy, safety and member data rights built in. You add the better_together gem to a Rails app (the host app) and it provides the platform; the host app supplies branding, deployment and any custom features.
A good fit if you want to:
- run a community, co-operative, non-profit or civic site where members sign in, join communities, attend events, post and message each other, and organizers moderate;
- host several organizations or sites from one install, each with its own domain, theme, members and storage (multi-tenant platforms);
- keep control of your data: self-hosted, Postgres-backed, with member data export and deletion, and optional federation with other platforms by consent;
- start from working social, content and governance features and extend them in a normal Rails app.
Probably not a fit if you:
- need a static brochure site or a blog only (a static site generator is simpler);
- are not using, or do not want to run, Rails, PostgreSQL with PostGIS and Redis;
- want a drop-in SaaS with no hosting or upgrade work: a host app needs maintenance, and each release has an upgrade guide.
- Communities and membership. Communities with public, private or request-to-join access, an organizer review queue, invitations, roles and permissions. See community management and the membership request workflow.
- Content. A page builder with many block types, posts, an uploads gallery and image library, navigation menus, short links, Markdown and rich text, and translatable content in English, French, Spanish and Ukrainian. See the content system and block system.
- Events. Events with recurrence, invitations, RSVPs and calendars. See the events system.
- Messaging and exchanges. Conversations with message requests, notifications, and Joatu offers and requests for mutual aid. See conversations and messaging and the Joatu docs.
- Multi-tenant platforms. Several platforms in one app, each with its own domains, theme, sign-in providers, storage and settings. See the multi-tenant runtime, theme settings and storage configuration.
- Federation. Optional, consent-based sharing of pages, posts and events between platforms, approved by stewards. See the federation system.
- Safety and privacy. Blocks enforced across messaging, events and exchanges, reporting, bot protection, rate limiting, content security scanning, agreements with an acceptance audit trail, and member data export and deletion. See the security and protection system, bot safety and security and privacy for organizers.
- Sign-in. Devise accounts, plus Google, Facebook and OpenID Connect providers configured per platform. See Google sign-in setup.
- APIs and tooling. A JSON:API and MCP surface for pages and posts, a seed packet format for moving content between platforms, and Postgres-native search. See the API docs and seed packet protocol.
- Extension gems. Elasticsearch, Sentry and Google Analytics are separate gems that plug into the engine: better_together-elasticsearch, better_together-sentry and better_together-google-analytics.
Version 0.11.0 is the current release. See the 0.11.0 release notes for what changed and the host upgrade guide if you are upgrading.
Adding the engine to a Rails app takes a few commands, but the details differ for a new app and an existing one, so they live in one guide:
Installing Community Engine in a Rails app covers requirements, the installer (rails g better_together:install), credentials and encryption keys, migrations and first run.
Related reading for people running a host app: migrations from the gem, deploying with Dokku, platform themes in host apps.
The documentation index is organized by role:
- Developers: the developer guide and the system docs (one per subsystem, with diagrams).
- Platform organizers: the platform organizer guide.
- Community organizers and members: the community organizer guide and end user guide.
- Everything: the table of contents.
Released under the GNU Lesser General Public License; see LICENSE.
This gem is developed using Docker and Docker Compose. To get the app running, complete the following steps:
Build the application image using the docker convenience scripts:
bin/dc buildBundle the gems:
bin/dc-run bundleSetup the database:
bin/dc-run rails db:setupRun the RSpec tests:
bin/dc-run rspecTroubleshooting:
bin/dc-run rails db:createonly creates the databases. It does not load schema or run migrations.- If you have already run
db:create, runbin/dc-run rails db:migrateorbin/dc-run rails db:setupbeforebin/dc-run rails db:seed. - Fresh worktrees may not include ignored files such as
spec/dummy/config/master.key, so local setup must not depend on that file being present.
We welcome contributions from the community.
- Guidelines: See CONTRIBUTING.md for how to report issues, propose changes, and submit pull requests.
- Code of Conduct: See CODE_OF_CONDUCT.md for expectations of behavior in our community.
Thank you for helping make Better Together better for everyone.
