Search by

drupal / matrix_recipes

Drupal-Infrastructure

Drupal recipes for Matrix API integration demos and starter configurations.

Package info

git.drupalcode.org/project/matrix_recipes.git

Homepage

Type:drupal-recipe

pkg:composer/drupal/matrix_recipes

Statistics

Installs: 23

Dependents: 0

Suggesters: 0

1.0.x-dev 2026-10-15 16:10 UTC

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_api 3.0.0-beta2 or later.
  • For matrix_identity and matrix_api_demo_identity: a matrix_api_identity release providing the matrix_mxid base field and matrix_api_switch_verified_user action.

Installation

composer require freelock/matrix_recipes

Then apply individual recipes as needed:

drush recipe vendor/freelock/matrix_recipes/matrix_api_demo

Available recipes

RecipeDescription
registration_codeReusable public registration gate with an installation-supplied invitation code; approval/email policy remains site-owned
matrix_api_demoNode/comment ↔ Matrix thread sync on Article nodes
matrix_poll_endpointECA endpoint at /eca/matrix/poll for htmx-triggered polling
matrix_identityModule-owned Matrix identities and generic bot configuration
matrix_oidc_providerDrupal OIDC provider setup with explicit MAS (Element X) or native Synapse backend selection
matrix_api_demo_identityOptional: 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_asOptional: 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.