Skip to content

Connect 4 implemented with event sourcing and CQRS using Haskell, PureScript, Redis, Postgres, GraphQL/Hasura and Elm

License

Notifications You must be signed in to change notification settings

battermann/connect-4

Repository files navigation

Connect 4

Exemplary event sourcing and CQRS implementation of the game Connect 4 using

  • Haskell
  • PureScript
  • Elm
  • Postgres
  • Redis
  • GraphQL/Hasura
  • No ES/CQRS framework
  • No bullshit

Overview

Components:

alt text

Two player games

The player identity is tied to a browser instance. So to play a two player game ideally you should play on two different devices. If played on the same device make sure to use different browser instances.

Prerequisites

Run with docker

Run

task up

Note that if this task is run for the first time it will take a very very long time to build the Haskell containers.

Then browse to http://localhost:3000/.

Run locally

Prerequisites for running locally

  • Elm
  • create-elm-app
  • node/npm
  • stack
  • ...

Go to ./ui and run npm install.

Start services locally

To run the application locally, run:

task db

Then run each of these commands in a separate terminal window:

task pub
task read-model
task cmd-api
task ui

Todos

  • Elm UI: Use one out and one in port

About

Connect 4 implemented with event sourcing and CQRS using Haskell, PureScript, Redis, Postgres, GraphQL/Hasura and Elm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published