shrop / headless-lightning

A more opinionated flavor of Lightning for building decoupled applications.

Home Page:https://lightning.acquia.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Headless Lightning

Headless Lightning is a more opinionated version of the Lightning Drupal distribution intended for use as a backend for decoupled applications.

Quick Start

To build the codebase:

composer create-project acquia/lightning-project:dev-headless --no-interaction --stability dev

This will create a new directory, lightning-project which contains a docroot folder. This is where you should point your web server.

Just like any Drupal project, you will need an environment in which Drupal can be run and an available database. Once you have that setup, you can use Drush, Drupal Console, or the web interface to install the site.

There is no need to clone or fork this project unless you want to contribute back. Use a scaffold project like Lightning Project, BLT, or Drupal Project to build a codebase for actual use. See composer create-project command above.

Contributing

Headless Lightning provides some Phing targets to aid in development. To take advantage:

  1. Clone this project.
  2. Build working codebase (composer install).
  3. Install dev environment (phing install - common options: -Ddb.database={DB_NAME} -Ddb.user{DB_USER} -Ddb.password={DB_PASS} -Durl=http://{LOCAL_ENV})
  4. Make changes in /docroot/profiles/headless_lightning.
  5. Once you're happy with changes, use phing pull to move your changes back into the top-level repository to be committed or submitted as a PR or patch.

Please file issues in our GitHub Issue Queue.

Goals

Headless Lightning aims to provide a standard backend content repository that allows for easy ingestion by decoupled applications. It does so by building on and configuring the basic tool set provided by the contrib modules selected and implemented in Lightning's Content API.

Headless Lightning Goals

  • Make the UI more intuitive for non-Drupalists and more logical for everyone that uses Drupal primarily as a content store.
  • Have opinions about and examples of how an external application should authenticate against and consume the API.
  • Not get in the way of developers, site builders, or content editors.

Features

JSON Content

Presentation layer blanket that generally hides or redirects users from content rendered by the Drupal application.

Headless UI

Imposes UI opinions on the administrative backend, mainly to make it intuitive to create and manage content without worrying about how Drupal will render it.

Headless UI Sub-components

Headless UI Sub-components consolidate links and add relevant descriptions to common administrative tasks central to using Drupal as a decoupled backend:

  • Access UI
  • Content Model UI

Built on Drupal and Lightning

Headless Lightning is built on Drupal and extends the Lightning distribution. That means you can create a sub-profile of Headless Lightning - just like Headless Lightning is a sub-profile of Lightning itself. It also means that applications built with Headless Lightning will get all of the features of and updates to Drupal and Lightning along with update paths.

So you don't have to worry about stuff like parts of Media going into core or Content Moderation versus Workflow Moderation. You offload those responsibilities, even in your decoupled application, to Lightning.

Similar Projects

From which we have borrowed heavily and for which we are very thankful.

  • Contenta CMS
    Contenta makes your content happy
    Key differences:
    • Contenta has an emphasis on OOTB ingestion examples and opinions, where Lightning is agnostic about implementation.
    • Headless Lightning provides more OOTB features like Media and Workflow - and provides an update/upgrade path for those features as they mature via Lightning.
  • Reservior
    A back end for your front end
    Key differences:
    • Reservoir is centered around Drupal nodes as the main type of content, whereas Headless Lightning is less strongly opinionated.
    • Headless Lightning has fewer strong opinions about the administrative UI.

About

A more opinionated flavor of Lightning for building decoupled applications.

https://lightning.acquia.com

License:GNU General Public License v2.0


Languages

Language:PHP 62.8%Language:Gherkin 22.6%Language:HTML 5.4%Language:CSS 5.1%Language:Shell 4.1%