Giter Site home page Giter Site logo

foundation's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.