Kit framework with Undertow, Reitit routing, Hiccup + HTMX templating, Tailwind CSS v4, PostgreSQL (empty database), and mobile-first index page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.6 KiB
1.6 KiB
btcprice
Bitcoin price tracker - Clojure Kit web application.
Build & Development Commands
make run— Start dev server on port 3000make repl— Start nREPL on port 7888make test— Run testsmake tailwind— Watch Tailwind CSS for changesmake uberjar— Build production JARdocker compose up -d— Start PostgreSQL
REPL Commands
(dev-prep!) ;; Prepare dev system
(go) ;; Start system
(reset) ;; Reload code & restart
(halt) ;; Stop system
(reset-db) ;; Drop & re-migrate database
(migrate) ;; Run pending migrations
(rollback) ;; Rollback last migration
(query-fn) ;; Get database query function
Architecture
- Framework: Kit (Integrant-based)
- Server: Undertow
- Routing: Reitit
- Templates: Hiccup + HTMX
- Styling: Tailwind CSS v4
- Database: PostgreSQL + conman + Migratus
Source Layout
src/clj/pmagnus/btcprice/
├── core.clj # App entry point
├── config.clj # System config loader
└── web/
├── handler.clj # Ring handler + routes
├── htmx.clj # page/fragment macros
├── controllers/
│ └── health.clj # Health check
├── middleware/
│ ├── core.clj # Base middleware
│ ├── exception.clj # Exception handling
│ └── formats.clj # Content negotiation
└── routes/
├── api.clj # /api routes (JSON)
├── ui.clj # UI routes (HTML)
└── utils.clj # Route utilities