Skip to content

Ffff-framework for client-server web applications.

License

Notifications You must be signed in to change notification settings

jdf-id-au/foundation

Repository files navigation

jdf/foundation

Ffff-framework for client-server web applications. Very alpha.

Pursues Jamstack concept, with statically served client (configurable via html and edn), websocket-centric server, and common, clojure.spec-ed messages over transit.

Structure

Client: jdf/foundation-client

  • datascript store
  • pure event functions
  • subscriptions, coeffects and effects somewhat like re-frame
  • React hooks via helix
  • Html5History URL fragment management
  • config (baked in at build time, plus via html file)
  • simple logging to console via devtools
  • put together with shadow-cljs
  • TODO websocket communication

Common: jdf/foundation-common

  • cross-platform messaging/extra functions incl time conveniences from jdf/temper
  • communication over transit
  • validated ws messages via spec

Server: jdf/foundation-server

  • config system integrated with cli
  • built on jdf/talk
  • typed http messages TODO json or transit depending on headers
  • websocket messages
  • limited file serving for convenience (better to serve static client with dedicated webserver like nginx)
  • relies on reverse proxy for TLS
  • TODO feature switches

Usage

Pull in each part via deps, e.g. jdf/foundation-server at

  • {:local/root "../foundation/parts/server"} or
  • {:git/url "https://github.com/jdf-id-au/foundation.git" :sha ... :deps/root "parts/server"}

This allows application's own parts (e.g. aliases) to pull only what they need.

Server

  1. TODO example boilerplate (could go in f.s.api ns doc)

Client

  1. npm init
  2. clj -m cljs.main --install-deps installs upstream deps
  3. npm i
  4. copy shadow-cljs.edn and build-client.edn and adjust
  5. copy basic structure from dev/user.cljs into appropriate client namespace

About

Ffff-framework for client-server web applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages