diff --git a/README.md b/README.md index 7ae80ab..ce49bf1 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Event Demo - [What's the demo for ?](#whats-the-demo-for-) - [What's in this demo](#whats-in-this-demo) - [The stack](#the-stack) +- [Architecture](./doc/architecture.md) What's the demo for ? @@ -60,9 +61,3 @@ Database Infra - Docker - Træfik - -Architecture -============ - -- [Workflow Diagram](./doc/Workflow.puml) -- [Entities and Projections Diagram](./doc/Entities.puml) \ No newline at end of file diff --git a/doc/architecture.md b/doc/architecture.md new file mode 100644 index 0000000..18aca17 --- /dev/null +++ b/doc/architecture.md @@ -0,0 +1,11 @@ +Architecture +============ + +The Workflow +------------ +![Workflow Diagram](./schemas/Workflow.svg) + +The business Entities +--------------------- + +![Entities and Projections Diagram](./schemas/Entities.svg) diff --git a/doc/Entities.puml b/doc/schemas/Entities.puml similarity index 100% rename from doc/Entities.puml rename to doc/schemas/Entities.puml diff --git a/doc/schemas/Entities.svg b/doc/schemas/Entities.svg new file mode 100644 index 0000000..ca1e614 --- /dev/null +++ b/doc/schemas/Entities.svg @@ -0,0 +1 @@ +«Projection»GameListstatus: Status«Projection»GameStateplayers: List<Player>currentPlayerTurn: PlayerlastCardPlayer: PlayercolorOnCurrentStack: Colordirection: DirectionreadyPlayers: List<Player>deck: DeckisStarted: BooleanplayerWins: List<Player>Cardid: UUIDColorBlueRedYellowGreenGameIdid: UUIDPlayerid: PlayerIdname: StringDeckstack: Stackdiscard: DiscardplayersHands: PlayersHandsStackcards: List<Card>shuffle()Discardcards: List<Card>PlayerHandsmap: Map<PlayerId, List<Card>>NumericCardnumber: Intcolor: ColorReverseCardcolor: ColorPassCardcolor: ColorPlus2Cardcolor: ColorPlus4CardChangeColorCardmanymanymanymanymanymany \ No newline at end of file diff --git a/doc/Workflow.puml b/doc/schemas/Workflow.puml similarity index 100% rename from doc/Workflow.puml rename to doc/schemas/Workflow.puml diff --git a/doc/schemas/Workflow.svg b/doc/schemas/Workflow.svg new file mode 100644 index 0000000..6d1ad76 --- /dev/null +++ b/doc/schemas/Workflow.svg @@ -0,0 +1 @@ +LegendQueriesProjectionsEventsUserQueryCommandEventProjectionPostgresqlRedisRabbitMQWeb socket adapterCommand handlerActionEvent handlerVersion builderEvent storeEvent streamEvent busReaction listenerProjection builderProjection repositoryProjection busControllerAcquire a lock,get the next event version,and then, build the event«create»«create»GetprojectionReturnsprojectionGetprojectionSendcommandSend notification(error or success)SendcommandSendnotificationExecute actionReturnsevent builderDispatchevent(send an event builder)«Create»PublisheventDispatchnew eventbuild next versionPublisheventPersisteventPublisheventSubscribeto eventEmit eventSubscribeEmit projectionPublishprojectionPublishprojectionSubscribeto projectionEmit projectionSubscribeEmit eventPersistprojectionGetprojectionBuildprojection«create projection» \ No newline at end of file