For the file and folder layout, see CODE_ORGANIZATION.md.
- Backend: Clojure, datascript (in memory, dumped to
data/datascript.nippyevery 60 s) (datomic-like graph db) - Frontend: ClojureScript, reagent
- omni — SPA framework wiring stuff together
- tada — declarative queries and commands for the abstract 'system'
Install java and clojure, then clone the repo.
Create a config.edn at the repo root (gitignored):
{:http-port 9365
:environment :dev
:website-base-url "http://localhost:9365"
:auth-cookie-secret "0123456789123456"
:auth-token-secret "0123456789123456"}
lein repl
(start!) ;; from georgetown.core; boots omni (http server + cljs build)
georgetown.dev.seed/seed! (or seed-plus!) populates a fresh db with an
island.
Tests use hyperfiddle.rcf , inline with the functions they test.
lein uberjar
server/scheduler.cljticks each island once per second (chime).- On any transaction,
db/watchersfire andpush/on-db-change!recomputes the per island, user and player state, then sends diffs to the connected clients. - The client long-polls
GET /api/state(push/handler) and mirrors the result into the atoms inclient/state.cljs. - User actions call
state/exec!, which POSTs to/api/command;routes/dispatch-event!runs the matching tada command.