drupal / matrix_recipes
Drupal recipes for Matrix API integration demos and starter configurations.
Package info
git.drupalcode.org/project/matrix_recipes.git
Type:drupal-recipe
pkg:composer/drupal/matrix_recipes
Requires
- drupal/core: ^11.4
- drupal/matrix_api: ^3.0.0-beta2@beta
- drupal/token: ^1.17
- drupal/twig_tweak: ^3.4
Requires (Dev)
None
Suggests
- drupal/matrix_api_application_server: Required by the optional matrix_api_demo_oidc_as recipe.
- drupal/matrix_api_identity: Required by the identity/provider recipes. Needs matrix_mxid, verified-user switching and ensureSimpleOAuthConsumerStorage.
- e0ipso/simple_oauth_21: Required by matrix_oidc_provider for the simple_oauth_server_metadata discovery submodule (^1.13.1).
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-15 23:11:07 UTC
README
A collection of Drupal recipes for integrating Matrix with Drupal sites.
Built on top of the matrix_api module.
Requirements
- Drupal 11.4+
- A Matrix homeserver (e.g. meatball.zone running Synapse)
- A bot user account and access token
matrix_api3.0.0-beta2 or later.- For
matrix_identityandmatrix_api_demo_identity: amatrix_api_identityrelease providing thematrix_mxidbase field andmatrix_api_switch_verified_useraction.
Installation
composer require freelock/matrix_recipes
Then apply individual recipes as needed:
drush recipe vendor/freelock/matrix_recipes/matrix_api_demo
Available recipes
| Recipe | Description |
|---|---|
registration_code | Reusable public registration gate with an installation-supplied invitation code; approval/email policy remains site-owned |
matrix_api_demo | Node/comment ↔ Matrix thread sync on Article nodes |
matrix_poll_endpoint | ECA endpoint at /eca/matrix/poll for htmx-triggered polling |
matrix_identity | Module-owned Matrix identities and generic bot configuration |
matrix_oidc_provider | Drupal OIDC provider setup with explicit MAS (Element X) or native Synapse backend selection |
matrix_api_demo_identity | Optional: replaces the demo's inbound flow so replies are authored by the linked Drupal account (anonymous with the Matrix ID otherwise) |
matrix_api_demo_oidc_as | Optional: sends node and comment Matrix posts as the protected OIDC-provisioned Application Service identity for their Drupal author |
Checks
php tests/static-check.php --autoload=/path/to/drupal/vendor/autoload.php
The static check covers the matrix_identity, matrix_api_demo and
matrix_api_demo_identity recipes. tests/smoke/README.md describes the
runtime smoke test for a disposable site.
Development
Each recipe lives in its own directory at the repo root. To add a new recipe,
create a directory with a recipe.yml and optionally a config/ subdirectory
for config entities.
See Drupal recipe documentation for the recipe authoring guide.