{"id":17597338,"url":"https://github.com/battermann/connect-4","last_synced_at":"2025-04-30T05:47:06.557Z","repository":{"id":86688864,"uuid":"229067907","full_name":"battermann/connect-4","owner":"battermann","description":"Connect 4 implemented with event sourcing and CQRS using Haskell, PureScript, Redis, Postgres, GraphQL/Hasura and Elm","archived":false,"fork":false,"pushed_at":"2022-12-10T17:45:27.000Z","size":20,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T05:46:19.915Z","etag":null,"topics":["cqrs","elm","event-sourcing","graphql","haskell","hasura","microservices","no-frameworks","postgres","purescript","redis"],"latest_commit_sha":null,"homepage":"http://cosmic-ray.surge.sh/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/battermann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-19T14:09:55.000Z","updated_at":"2024-05-09T15:41:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"c4ed2529-4be4-4482-978c-fb4c719a5b1e","html_url":"https://github.com/battermann/connect-4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/battermann%2Fconnect-4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/battermann%2Fconnect-4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/battermann%2Fconnect-4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/battermann%2Fconnect-4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/battermann","download_url":"https://codeload.github.com/battermann/connect-4/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251651221,"owners_count":21621702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cqrs","elm","event-sourcing","graphql","haskell","hasura","microservices","no-frameworks","postgres","purescript","redis"],"created_at":"2024-10-22T09:24:51.796Z","updated_at":"2025-04-30T05:47:06.518Z","avatar_url":"https://github.com/battermann.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Connect 4\n\nExemplary event sourcing and CQRS implementation of the game _Connect 4_ using \n\n- Haskell\n- PureScript\n- Elm\n- Postgres\n- Redis\n- GraphQL/Hasura\n- No ES/CQRS framework\n- No bullshit\n\n## Overview\n\nComponents:\n\n- [Command API](https://github.com/battermann/cosmic-ray-api) (Haskell, Postgres) [![Build Status](https://travis-ci.org/battermann/cosmic-ray-api.svg?branch=master)](https://travis-ci.org/battermann/cosmic-ray-api)\n- [Read Model/Query API](https://github.com/battermann/cosmic-ray-rm) (Haskell, Hasura, Postgres) [![Build Status](https://travis-ci.org/battermann/cosmic-ray-rm.svg?branch=master)](https://travis-ci.org/battermann/cosmic-ray-rm)\n- [Event Publisher](https://github.com/battermann/cosmic-ray-pub) (PureScript, Redis) [![Build Status](https://travis-ci.org/battermann/cosmic-ray-pub.svg?branch=master)](https://travis-ci.org/battermann/cosmic-ray-pub)\n- [UI](https://github.com/battermann/cosmic-ray-ui) (Elm) [![Build Status](https://travis-ci.org/battermann/cosmic-ray-ui.svg?branch=master)](https://travis-ci.org/battermann/cosmic-ray-ui)\n\n![alt text](./out/docs/C4_Context/C4_Elements.svg)\n\n## Two player games\n\nThe 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.\n\n## Prerequisites\n\n- Make sure you also clone the git submodules e.g. with `git clone --recursive git@github.com:battermann/connect-4.git`\n- [Docker Compose](https://docs.docker.com/compose/)\n- [Task](https://taskfile.dev/#/installation)\n\n## Run with docker\n\nRun\n\n```shell\ntask up\n```\n\nNote that if this task is run for the first time it will take a very very long time to build the Haskell containers.\n\nThen browse to `http://localhost:3000/`.\n\n## Run locally\n\n### Prerequisites for running locally\n\n- Elm\n- create-elm-app\n- node/npm\n- stack\n- ...\n\nGo to `./ui` and run `npm install`.\n\n### Start services locally\n\nTo run the application locally, run:\n\n```shell\ntask db\n```\n\nThen run each of these commands in a separate terminal window:\n\n```shell\ntask pub\n```\n\n```shell\ntask read-model\n```\n\n```shell\ntask cmd-api\n```\n\n```shell\ntask ui\n```\n\n## Todos\n\n- Elm UI: Use one out and one in port\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbattermann%2Fconnect-4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbattermann%2Fconnect-4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbattermann%2Fconnect-4/lists"}