A Web UI for the game Bridget written in elm.
Using benajakuhn's bridget implementation (written in java) to handle game logic.
The bridge between elm and java is a haskell webserver (scotty) using inline-java
...including submodule:
git clone --recurse-submodules https://github.com/MMMMMNG/bridget-ui.git
cd bridget-ui/cd compose/prod
docker compose up --buildThen visit: http://localhost:8000/src/BridgetPage.elm
NOTE: The backend image was 11GB+ on my machine.
In my opinion that's better than installing 11GB+ worth of nix and bazel and haskell dependencies on my PC, though.
The frontend-image was ~300MB.
start the dev-containers for front- and backend:
cd compose/dev
docker compose up -d --buildBrowse to the frontend: http://localhost:8000/src/BridgetPage.elm
Now you should be able to develop the frontend. If you need elm tools, get an interactive shell in the frontend container (e.g. exec tab in docker desktop)
Get an interactive shell in the backend-container (e.g. exec tab in docker desktop) and build the backend:
nix-shell
bazel build //:bridget_backendand if there are no compiler errors, you can run the compiled polyglot app:
bazel-bin/bridget_backendThis is probably not necessary but it seems like it version-locks transitive deps, which is very good for reproducibility.
bazel run @stackage-unpinned//:pinsee also: haskell.build
