Skip to content

Instantly share code, notes, and snippets.

View codeliner's full-sized avatar
🌐
OSS Contributor

Alexander Miertsch codeliner

🌐
OSS Contributor
View GitHub Profile
<mxGraphModel dx="9070.8" dy="1378.4" grid="1" gridSize="16" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="827" pageHeight="1169" background="#ffffff">
<root>
<mxCell id="e975feae-1579-4c09-98d0-98cbf2108aec"/>
<mxCell id="7fe80d19-d317-4e9d-8296-96c598786d78" parent="e975feae-1579-4c09-98d0-98cbf2108aec"/>
<boundedContext label="&lt;font color=&quot;#660000&quot; style=&quot;font-size: 148px;&quot;&gt;Coffee Machine&lt;/font&gt;" type="boundedContext" id="6M4zR7HaCsVy8osJn5PM3d">
<mxCell style="boundedContext;fillColor=#6666FF;fontSize=148;" vertex="1" alternateStyle="boundedContext;fillColor=#6666FF;verticalAlign=middle;fontSize=112;" originalStyle="boundedContext;fillColor=#6666FF;" isContainerSwimLane="1" alternateStyleEnabled="0" parent="7fe80d19-d317-4e9d-8296-96c598786d78">
<mxGeometry x="48" y="-240" width="1856" height="1200" as="geometry"/>
</mxCell>
</boundedContext>
<icon label="" type="icon" id="uckVseFANcpXbG3e
@codeliner
codeliner / cqrs_es_redux_style.md
Last active August 4, 2022 09:25
CQRS / ES Redux Addition for prooph board FE development

CQRS / ES Redux Addition

We use redux and redux-saga for application state management. Redux can be seen as CQRS / ES for frontend architecture. At least the concepts are very similar. However, the standard redux concept does not distinguish between commands and events. Both are just redux actions. Since we use CQRS / ES in the backend and see a lot of value in distinguishing between message types, we've set up a few additional conventions on top of redux to narrow frontend and backend architecture.

Modules

The app is organized in modules. Each module follows the same directory structure:

@codeliner
codeliner / onEventHook.ts
Last active February 14, 2022 21:00
This Gist is used in my video: prooph board & Cody meet Event Catalog - https://youtu.be/0FAgsPNqUV4
import {Context} from "./Context";
import {CodyHook, CodyResponse, CodyResponseType, Node} from "@proophboard/cody-types";
import {
isCodyError,
mkdirIfNotExistsSync,
nodeNameToPascalCase,
parseJsonMetadata,
writeFileSync
} from "@proophboard/cody-utils";
@codeliner
codeliner / CommandHandler.php
Created November 27, 2018 20:43
Event Machine Custom Command Handler Flavour
<?php
declare(strict_types=1);
namespace ProophExample\CommandHandler;
use Prooph\EventMachine\Messaging\Message;
interface CommandHandler
{
public function handle(Message $message): void;
@codeliner
codeliner / domain.md
Last active August 21, 2018 10:24
ES-Emergency-Call-Issue-7

System

[Supporting] RealtyRegistration

Building- > Entrance -> Appartement -> Contract

The business is about providing accountancy services to the owners of large buildings or organizations that take care of the building when each apartment is owned by a different person.

The first thing to add is a building, it's entrances (each entrance has a different address) and the apartments in the building.

@codeliner
codeliner / Event-Sourced-Saga.xml
Created August 1, 2018 18:25
ES-Emergency-Call-Issue-6 - draw.io diagram
<mxfile userAgent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/67.0.3396.99 Chrome/67.0.3396.99 Safari/537.36" version="9.0.1" editor="www.draw.io" type="device"><diagram id="bcd6b23c-19de-0d42-889d-0b111b864ca3" name="Page-1">7Vxbc6O4Ev41rpp5iIubMX7MZXzOqdqdk9qkancfZZBt1QBihZzE59efFhJXYYc4GDO7TiYDtIQk1N2fWt0NE/s+evsXQ8n2VxrgcGIZwdvEfphYlulYLhwEZS8pc9OThA0jgapUEp7I/7AiGoq6IwFOaxU5pSEnSZ3o0zjGPq/REGP0tV5tTcN6rwnaYI3w5KNQp/5OAr6VVM+al/R/Y7LZ5j2b7kKWrJD/Y8PoLlb9TSx7nf3I4gjlbakHTbcooK8Vkv1tYt8zSrk8i97ucSjmNp82ed/yQGkxboZj3uUGS97wgsIdzkfshnDrXZqgGM434vw3/NcOp/wR7SPRrqqxYnn5bRhSH3FC41QvvKdRhGA+VAGMpdq0mga+z6ceZiQRpzHlcLh73RKOnxLkC9orSBvQtjwK4coU3RTz/d8dD0mMFT3ljP7A9zSkLGvWdn0Pr9ZFSc5VGyhrEoaVmgHC3toXdBpzJZqmpa4r9ew78Qt0FJJNDDQf5gaz4pleMOP47SBfzILboEWYRpizPVRRN3gzeYfSH9NV8vJaSqOZK8u2Kom5YCGlAZui6VIK4EQJQrtQ2JpQKM4f5fPtZsPwBgHXtKKhmBy4K3fmdmEyaKTlX5rJ9sybXpLPzvt81nmpsAAHetG3l1Z0GIz788XKMLpxH7sX5747My7I+1kL8DfYhOPgVqyl4rlDlKbErzNGY8D9QvxqDLA+MNEwd2z/BxCN/OJPcQFqApdvhP+h+hbnZY
@codeliner
codeliner / ExcludeBlacklistedFiles.php
Last active November 3, 2017 01:10
proophessor-do message flow analyzed with prooph/message-flow-analyzer
<?php
declare(strict_types=1);
namespace Prooph\ProophessorDo\Infrastructure\ProophAnalyzer;
use Prooph\MessageFlowAnalyzer\Filter\FileInfoFilter;
final class ExcludeBlacklistedFiles implements FileInfoFilter
{
@codeliner
codeliner / OrgaState.php
Last active September 6, 2017 06:20
Workshop material
<?php
declare(strict_types=1);
namespace App\Model\Organization;
final class OrgaState
{
public $orgaId;
public $orgaName;