Orkestra is a library of infrastructure and architecture helpers for creating CQRS applications

Overview

Orkestra

Orkestra is an opinionated framework with a plethora of recommendations on architectural design that we use internally at Morebec to develop new products. It also provides technical tools to quickly create products that are easy to maintain and scale.

At its core, Orkestra provides utilities for DDD, CQRS and Event Sourcing.

Orkestra allows to quickly develop products and applications while maintaining a standardized approach that is easy to understand and improve.

Why Orkestra

Given the current nature of Morebec, which is indie software development, in order to provide value to our clients, we need to be able to have a structure that is similar from project to project, while offering a stable platform that can stand the test of time and scale.

Building applications that will be public facing in production is a challenge in itself that requires a lot of thinking and preparation.

To ensure that we can always provide the same level of quality, while being prepared for the potential scale of our clients, Orkestra serves as both a technical and thinking framework to help us achieve these goals.

From a technical stand point, Orkestra tries to be as unobtrusive as possible by relying mostly on interfaces that denote the conceptual contracts it tries to fulfill. Scalable and resilient CQRS and Event Sourcing requires a lot of plumbing that is very easy to get wrong, as such it provides default implementation of these contracts to stay as much as possible at the edges of the different layers (application, domain and infrastructure.) This set of interfaces allows different projects to extend the framework with their own implementations when needed while still remaining compatible with the Orkestra framework and its ecosystem.

Features

  • Domain Driven Design Building Blocks.
  • Command Query Responsibility Segregation (CQRS) building blocks.
  • Event Sourcing building blocks.
  • Intra Application Messaging.
    • Based on Chain of responsibility pattern (middleware pipeline)
    • Synchronous processing by default.
    • Asynchronous processing using workers and scheduling.
    • Scheduling support.
    • Tracing with correlation and causation tracking.
  • Explicit Personal Information Storage Interface.

Installation

To include Orkestra in your projects, it is highly recommended relying on composer.

Run the following composer command:

$ composer require `morebec/orkestra`

Adapters

Orkestra relies on adapters to add functionality to the base classes.

Usage && Documentation

For the documentation on how to use Orkestra and its core principles, please refer to the docs/ directory.

Comments
  • Add call_parent Layer Object Schema Key

    Add call_parent Layer Object Schema Key

    Instead of manually doing:

    code: |
        parent::__construct();
    

    It would be very useful to add a call_parent key:

    call_parent: true #(default to false)
    

    It would just do a basic call parent call passing the parameters of the method. For custom behaviour, we could always rely on the code key.

    This would be good to implement in the Object Generator Component.

    enhancement good first issue 
    opened by jwillp 1
  • Integrate PHP-CS Fixer on compiled Layer objects

    Integrate PHP-CS Fixer on compiled Layer objects

    The Object Generator that uses Nette/Php-Generator does not output code that is valid with the default settings of PHP-CS-Fixer. This causes mismatches of coding styles making commits diff all the generated files.

    It would be better to integrate PHP-CS-Fixer in the compilation process, to automatically fix the compiled files according to its config file if present.

    enhancement good first issue 
    opened by jwillp 1
  • Add a `compile` configuration key on Layer Object Configurations, to define how to handle compilation

    Add a `compile` configuration key on Layer Object Configurations, to define how to handle compilation

    Sometimes for code scaffolding, the overwrite functionality of the compiler can get in the way. Instead, we could add a new Layer Object Configuration Key like so:

    - schema: ...
      compile: ~ # one in once, never, always
    

    Where:

    • once: Would compile the object only if its Layer Object File does not exist
    • never: Would disable the compiler for this object
    • always: Would always recompile and overwrite the Layer Object File (default value)
    enhancement good first issue 
    opened by jwillp 1
  • Module Configuration File - Display the file name that errored on load

    Module Configuration File - Display the file name that errored on load

    Because of this line: https://github.com/Morebec/Orkestra/blob/e5a04a4c468d560538a43a5707be9e6ad458d018/src/ProjectCompilation/Infrastructure/Loader/YamlModuleConfigurationLoader.php#L20

    If the configuration of a module is not valid Yaml, it throws an exception, but this exception does not display the name of the file that errored.

    Instead, it would be better to catch the exception and throw a new InvalidModuleConfigurationException and specify the name of the file that caused the error.

    This would greatly help debug OC files.

    good first issue 
    opened by jwillp 1
  • Make Coded Layer Object Templates use an anonymous function

    Make Coded Layer Object Templates use an anonymous function

    Make Coded Layer Object Templates use an anonymous function.

    handleTemple = function($config, array $data): array {
        return $data;
    }
    

    It requires updating the code of the LayerObjectCompiler

    opened by jwillp 0
  • Delete Compiled Layer Object Files before Compile

    Delete Compiled Layer Object Files before Compile

    We need to delete compiled Layer Object Files before Compile.

    This would ensure that the layer object configurations specified in a module, gets deleted if it gets deleted from the module. And also when using the watch option, some editor like PHPStorm save the file continually, meaning sometimes the compiler on watch tries to compile incomplete paths. It would those files compiled at temporary locations.

    It would mean to scan the source directory for all files containing @Orkestra\Generated and delete those files.

    opened by jwillp 0
  • Add compile:project --watch option

    Add compile:project --watch option

    It would be very useful to implement a --watch option that detects changes in the modules configured directory to recompile on file change. It could look like this:

    $ orkestra compile:project --watch
    
    enhancement good first issue 
    opened by jwillp 0
  • Add @Orkestra\Generated  Annotation in the comments of generated class

    Add @Orkestra\Generated Annotation in the comments of generated class

    This would allow us to easily see which classes are generated, and which are not while developing. As sometimes this can get a bit confusing for project that use both Generated code and manual code.

    opened by jwillp 0
  • Use alternative to array_key_first

    Use alternative to array_key_first

    Some places in the code use array_key_first however this is restricted to PHP7 >= 7.3.0 It makes the tests fail for PHP7.2. The project wants to support at least PHP 7.2 and this impacts Object Generator Component as well.

    There is a polyfill proposed here:

    <?php
    if (!function_exists('array_key_first')) {
        function array_key_first(array $arr) {
            foreach($arr as $key => $unused) {
                return $key;
            }
            return NULL;
        }
    }
    
    bug good first issue 
    opened by jwillp 0
Releases(1.0)
Owner
Morébec
Morébec
Because every Wedding RSVP website needs to follow DDD, CQRS, Hexagonal Architecture, Event Sourcing, and be deployed on Lambda.

Our Wedding Website Because every Wedding RSVP website needs to follow DDD, CQRS, Hexagonal Architecture, Event Sourcing, and be deployed on Lambda. ?

Edd Mann 3 Aug 21, 2022
Clean Architecture, DDD and CQRS using Symfony 6

Task manager system using Clean Architecture, DDD and CQRS. Environment setup Install Docker Clone the project: git clone https://github.com/k0t9i/Tas

null 3 Sep 5, 2022
Ecotone Framework is Service Bus Implementation. It enables message driven architecture and DDD, CQRS, Event Sourcing PHP

This is Read Only Repository To contribute make use of Ecotone-Dev repository. Ecotone is Service Bus Implementation, which enables message driven arc

EcotoneFramework 308 Dec 29, 2022
🐘 🎯 Hexagonal Architecture, DDD & CQRS in PHP

?? ?? Hexagonal Architecture, DDD & CQRS in PHP Example of a PHP application using Domain-Driven Design (DDD) and Command Query Responsibility Segrega

CodelyTV 2.5k Jan 6, 2023
Dockerise Symfony Application (Symfony 6 + Clean Architecture+ DDD+ CQRS + Docker + Xdebug + PHPUnit + Doctrine ORM + JWT Auth + Static analysis)

Symfony Dockerise Symfony Application Install Docker Install Docker Compose Docker PHP & Nginx Create Symfony Application Debugging Install Xdebug Con

null 48 Jan 5, 2023
FFCMS 3 version core MVC architecture. Build-on use with ffcms main architecture builder.

FFCMS 3 version core MVC architecture. Build-on use with ffcms main architecture builder.

FFCMS 0 Feb 25, 2022
Test and enforce architectural rules in your Laravel applications. Keep your app's architecture clean and consistent!

Laravel Arkitect Laravel Arkitect lets you test and enforce your architectural rules in your Laravel applications, and it's a PHPArkitect wrapper for

SMorteza Ebadi 55 Dec 17, 2022
The Lucid Architecture for Scalable Laravel Applications.

Website: https://lucidarch.dev Documentation: https://docs.lucidarch.dev Social: we share updates & interesting content from the web Twitter: @lucid_a

Lucid 256 Dec 25, 2022
Small convention based CQRS library for PHP

LiteCQRS for PHP Small naming-convention based CQRS library for PHP (loosely based on LiteCQRS for C#) that relies on the MessageBus, Command, EventSo

Benjamin Eberlei 560 Nov 20, 2022
Pika is a nosql compatible with redis, it is developed by Qihoo's DBA and infrastructure team

Introduction中文 Pika is a persistent huge storage service , compatible with the vast majority of redis interfaces (details), including string, hash, li

OpenAtomFoundation 4.9k Jan 6, 2023
Nuber is an open source container management platform it provides a front end to manage your own cloud infrastructure, using Linux Containers virtualization technology

Nuber is an open source container management platform it provides a front end to manage your own cloud infrastructure, using Linux Containers virtualization technology

null 33 Dec 14, 2022
This script allows to bypass Oracle Cloud Infrastructure 'Out of host capacity' error immediately when additional OCI capacity will appear in your Home Region / Availability domain.

Resolving Oracle Cloud "Out of Capacity" issue and getting free VPS with 4 ARM cores / 24GB of memory Very neat and useful configuration was recently

Alexander Hitrov 323 Jan 6, 2023
A DDD microservice did in laravel, to test infrastructure

A DDD microservice did in laravel, to test infrastructure

pegons 3 Jul 8, 2022
A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.

Laravel SES Tracking Setup the AWS infrastructure to handle email events using SES/SNS and http/s endpoints with a single Laravel artisan command. Thi

null 11 Apr 26, 2022
PHP Lightweight Message Bus supporting CQRS.

Prooph Service Bus PHP 7.1+ lightweight message bus supporting CQRS and Micro Services Important This library will receive support until December 31,

null 440 Nov 20, 2022
Enraged Xenomorph - DDD/CQRS Symfony Application Boilerplate

Enraged Xenomorph - DDD/CQRS Symfony Application Boilerplate This project is very opinionated attempt to compile a bit of experience, few good practic

Gniewomir Świechowski 1 Jan 10, 2022
The game is implemented as an example of scalable and high load architecture combined with modern software development practices

Crossword game The game is implemented as an example of scalable and high load architecture combined with modern software development practices Exampl

Roman 56 Oct 27, 2022
Helpers for making PHP enums more lovable.

Enums A collection of enum helpers for PHP. InvokableCases Names Values Options From Metadata You can read more about the idea on Twitter. I originall

ARCHTECH 212 Dec 22, 2022
my personal example of Laravel clean architecture

what is this repo about Clean Architect Laravel ###run we assume docker desktop is up and running open up a terminal cd project directory run "cp .env

Sadegh Salari 37 Dec 23, 2022