Skip to content

kaepr/chain-reaction

Repository files navigation

Chain Reaction

Chain reaction game implemented as a multiplayer web app.

Deployed link: chain-reaction-app.fly.dev

Blog link: Multiplayer board game in Clojure

Note that the first load could take a while (around 1 min) to load.

chain.reaction.demo.mp4

Run Locally

Make sure Clojure is installed.

Refer resources/config.edn for all environment variables and configuration.

The application uses sqlite for storing user data. Create a file locally at project root called local.db. (Refer to config file above for using a different name, or switching to in memory sqlite :memory:).

touch local.db

Run the application locally using.

clj -M:repl

Start the web server locally by evaluating (go) in the REPL.

(go) ; start's the server 

Refer dev/user.clj for other commands for starting / halting / resetting the server.

For building CSS, make sure tailwind cli is installed. Evaluate (start-css-watch) in dev/css.clj. It starts a tailwindcss process which watches the src directories and rebuilds css if necessary.

Build

clj -T:build uber

Creates a standlone uberjar /target folder.

Deployment

Refer Dockerfile for creating the image. I used fly.io for deploying the docker image.

Used Practicalli | Multi-Stage Dockerfile for Clojure as reference for creating the Dockerfile.

About

Multiplayer board game implemented using Clojure and HTMX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors