[The Recipes Initiative] is a great example of making it easy for people to be part of Drupal and the open web." - Dries Buytaert, Driesnote, DrupalCon Prague

The Problem

Distributions and Recipes Initiative logo

Drupal is a highly flexible framework, but provides only basic configuration, requiring lots of adjustments for developing web applications. If site builders had the option to choose from predefined 'recipes' that assembled Drupal functionality for specific needs (e.g: blog site, news site, e-commerce site, etc) that would be a significant improvement to getting started with Drupal. 

Historically this functionality has been served by install profiles and distributions, but both of those iterations of the problem have some flaws: 

  • They are difficult to keep updated
  • They cannot be added after starting your project
  • They can't be removed easily
  • They can't be mixed and matched with other sets of functionality. 

Who are we building this for?

Site-builders, maintainers of many similar sites (such as educational users), existing distribution maintainers, and developers who build for many different audiences can greatly benefit from the improvements to be provided by the recipes initiative.. 

The Approach

The approach is to create a new feature in Drupal called a “recipe” that can be installed at any point in the lifecycle of a Drupal application. This includes during installation through the Project Browser, which overlaps with the selection of distributions in a Drupal application. 

Recipes will be declarative, not functional. Architecturally, recipes will harness a new capability called Config Actions to define the recipe. Recipes will have the ability to require dependent modules for functionality. Recipes can build on other recipes to create larger Recipes.

Phase 1: Complete

The change record can be found here.

The Recipe Initiative APIs have been added to core as experimental. The new APIs allow ambitious site builders and developers to apply functionality at any point in the lifecycle of a Drupal application, including during installation.

There are 4 new APIs:

  • Drupal\Core\Config\Action
  • Drupal\Core\Config\Checkpoint
  • Drupal\Core\Recipe
  • Drupal\Core\DefaultContent

The Recipe API depends on DefaultContent, Action, and Checkpoint. The other new APIs have no interdependencies.

Phase 2: Main aim: to refine and improve the recipe system to be used in Starshot.

Details can be found in [Meta] Recipes Phase 2 Roadmap

Potential Future Phases

  • Installing recipes via UI
  • Creating recipes via CLI or UI

Getting Involved

We are available in the #recipes channel on Drupal Slack. Our meetings leverage the Slack meeting format and happen once every two weeks on Tuesday at 1600 UTC (Noon EST). All are welcome.

Our contrib project is at https://www.drupal.org/project/distributions_recipes

Leadership

The initiative leads appointed by Dries for this initiative are: 

Several people are developing their own recipes and contributing ideas through their experience. We welcome more help on this initiative.

Resources

The following represent active and maintained resources:

Historical Documentation

The following resources help provide context and the decisions made to date.