Initial project setup: Clojure Kit web app for BTC price tracking
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>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
@import "tailwindcss";
|
||||
@source "../../src/**/*.clj";
|
||||
@@ -0,0 +1 @@
|
||||
Migration files go here.
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
-- queries for btcprice
|
||||
-- Add HugSQL queries here as tables are created
|
||||
@@ -0,0 +1,60 @@
|
||||
{:system/env #profile {:dev :dev :test :test :prod :prod}
|
||||
|
||||
:server/http
|
||||
{:port #long #or [#env PORT 4000]
|
||||
:host #or [#env HTTP_HOST "0.0.0.0"]
|
||||
:handler #ig/ref :handler/ring}
|
||||
|
||||
:handler/ring
|
||||
{:router #ig/ref :router/core
|
||||
:api-path "/api"
|
||||
:site-defaults-config
|
||||
{:params {:keywordize true
|
||||
:multipart true
|
||||
:nested true}
|
||||
:cookies true
|
||||
:session {:flash true
|
||||
:cookie-attrs {:http-only true
|
||||
:same-site :strict}}
|
||||
:security {:anti-forgery false
|
||||
:xss-protection {:enable? true :mode :block}
|
||||
:frame-options :sameorigin}
|
||||
:static {:resources "public"}
|
||||
:responses {:not-modified-responses true
|
||||
:absolute-redirects true
|
||||
:content-types true
|
||||
:default-charset "utf-8"}}}
|
||||
|
||||
:router/routes
|
||||
{:routes #ig/refset :reitit/routes}
|
||||
|
||||
:router/core
|
||||
{:routes #ig/ref :router/routes
|
||||
:env #ig/ref :system/env}
|
||||
|
||||
:db.sql/connection
|
||||
#profile {:dev {:jdbc-url "jdbc:postgresql://localhost:5432/btcprice?user=btcprice&password=btcprice"}
|
||||
:test {:jdbc-url "jdbc:postgresql://localhost:5432/btcprice?user=btcprice&password=btcprice"}
|
||||
:prod {:jdbc-url #env JDBC_URL
|
||||
:init-size 1
|
||||
:min-idle 1
|
||||
:max-idle 8
|
||||
:max-active 32}}
|
||||
|
||||
:db.sql/query-fn
|
||||
{:conn #ig/ref :db.sql/connection
|
||||
:options {}
|
||||
:filename "queries.sql"}
|
||||
|
||||
:db.sql/migrations
|
||||
{:store :database
|
||||
:db {:datasource #ig/ref :db.sql/connection}
|
||||
:migrate-on-init? true}
|
||||
|
||||
:reitit.routes/api
|
||||
{:base-path "/api"
|
||||
:query-fn #ig/ref :db.sql/query-fn}
|
||||
|
||||
:reitit.routes/ui
|
||||
{:base-path ""
|
||||
:query-fn #ig/ref :db.sql/query-fn}}
|
||||
Reference in New Issue
Block a user