The Bright Nucleus Architecture is a collection of open source packages licensed under the MIT license that are meant to be used on WordPress sites to provide a more modern and robust developing experience. It combines a Config management system (brightnucleus/config), a Dependency Injector (brightnucleus/injector), a Service Locator (brightnucleus/service-locator), a logging subsystem (brightnucleus/log), a virtual service provider (brightnucleus/virtual-services) and corresponding WordPress plugins (brightnucleus/wp-services & brightnucleus/wp-log) to form the basis of an architecture that provides the following benefits:

  • Configuration of all involved components through Config files that have defaults overrideable through site-specific, environment-specific or custom-injected settings. Write code once, reuse on all sites, in all environments.
  • Proper injector that lets you couple your codebase to interfaces only, deciding at runtime which concrete implementations to inject.
  • Service locator that manages loading order and dependencies. Only load and instantiate code that is effectively needed within the current context, defined through other running real and virtual services.
  • Logging subsystem that provides general logging and error handling, while providing the means to override logging settings at any granularity level.
  • Virtual services that let you incorporate third-party and legacy code into the loading order and dependency management flow of the Service Locator.
  • An architecture that runs just as well within the WordPress page request cycle as through a CLI or REST API request.
  • WordPress-specific helpers that let you monitor the state of your system within the WordPress backend.

You can find all Bright Nucleus packages in the Bright Nucleus GitHub organization:

Case Study

For a talk at WordCamp London 2017, I presented a case study of a set of websites that use the components of the Bright Nucleus Architecture in production.

Link to the video recording of the talk:

Link to the slides:

To get notified of updates to the Bright Nucleus Architecture, just sign up to the specific newsletter in the box directly below.

Get updates about the Architecture!

Subscribe now to get notified when there are updates to the Bright Nucleus Architecture, like new package releases or important upgrade notices.

If you prefer, you can subscribe to individual package notifications through the Bright Nucleus GitHub organization.

Something went wrong. Please check your entries and try again.