https://github.com/aburd/hypermedia-systems-clj-examples
Examples from the Hypermedia Systems book in Clojure
https://github.com/aburd/hypermedia-systems-clj-examples
clojure htmx hypermedia mvc mvc-pattern reitit ring
Last synced: 3 months ago
JSON representation
Examples from the Hypermedia Systems book in Clojure
- Host: GitHub
- URL: https://github.com/aburd/hypermedia-systems-clj-examples
- Owner: aburd
- License: gpl-3.0
- Created: 2024-02-18T06:02:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-09T09:28:57.000Z (over 2 years ago)
- Last Synced: 2025-01-19T13:25:45.327Z (over 1 year ago)
- Topics: clojure, htmx, hypermedia, mvc, mvc-pattern, reitit, ring
- Language: Clojure
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Just some examples from the [Hypermedia Systems book](https://hypermedia.systems) but adopted for Clojure. Obviously this is just for educational purposes only and you should not actually run this server on the internet.
**Points of interest:**
- SPA-like - No hard reloads, no FOUC
- Although HTMX script is included, I didn't have to write any JS.
- The entire app is ~300 lines? The equivalent for an SPA would likely be more, not to mention the hassle of the transpilation necessary etc.
**Stack:**
- http server - ring/reitit
- html - hiccup
- style - bootstrap
- ajax - htmx

**Features**
- Generic in-memory CRUD feature at /contacts
- An "archiver" feature, which will just tar.gzip any directory on your harddisk (I just needed something CPU intensive enough to experiment with making a progress-bar)
- requires `tree` & `tar`