Lightweight, modular framework for scalable production systems.
The goal of Kit is to provide a template for a robust, scalable Clojure web application. It hides common plumbing that is standard across projects via its libs system, while exposing code that tends to be customized in the clj-new template.
Thanks to integrant
, and aero
, the libs are simple
skeletons with the bulk of the customization being done in
the system configuration EDN file.
Kit requires clj-new, installed preferably as a tool:
clojure -Ttools install com.github.seancorfield/clj-new '{:git/tag "v1.2.381"}' :as clj-new
To create a new Kit application:
clojure -Tclj-new create :template io.github.kit-clj :name yourname/app
Default libs included with no profile specified:
kit-core
kit-undertow
Additional profiles:
+xtdb
- Adds the kit-xtdb
lib+hato
- Adds the kit-hato
lib+metrics
- Adds the kit-metrics
lib+quartz
- Adds the kit-quartz
lib+redis
- Adds the kit-redis
lib+selmer
- Adds the kit-selmer
lib+nrepl
- Adds the kit-nrepl
lib+socket-repl
- Adds the kit-repl
lib+sql
- Adds the default SQL libraries: kit-sql-conman
, kit-sql-migratus
, and kit-postgres
libs+conman
- Adds the kit-sql-conman
lib+hikari
- Adds the kit-sql-hikari
lib+migratus
- Adds the kit-sql-migratus
lib+mysql
- Adds the kit-sql-general
and kit-mysql
libs+full
- Adds the libs kit-xtdb
, kit-hato
, kit-metrics
, kit-quartz
, kit-redis
, kit-selmer
, kit-repl
, kit-sql-conman
, kit-postgres
,
and kit-sql-migratus
kit-core
- basic utility functions used by some other
libskit-xtdb
- Simple binding to connect to
a XTDB database nodekit-hato
- HTTP client
using hatokit-nrepl
- nREPL
component for use in a running system. e.g. to connect to
a production REPLkit-metrics
- Configurable metrics
using iapetoskit-quartz
- Scheduler
using cronut as an
integrant binding
for quartz. Exposes
the cronut
API, simply some extensions for aero
and
utilitieskit-redis
- An extension
of core.cache for
Redis
via carminekit-repl
- Socket REPL integrant binding for use in a
running system. e.g. to connect to a production REPLkit-selmer
- Templating configuration
with selmerkit-sql
- Deprecated. Use kit-sql-conman
and kit-sql-migratus
. Pulls in both of these as generic
SQL integrant binding.
Uses conman
, next.jdbc
, hugsql,
and migratus
directly, or implicitlykit-sql-conman
-
Uses conman
, next.jdbc
, hugsql,kit-sql-hikari
- General sql layer, just contains
connection pooling (
via hikari-cp) and
jdbc wrapper (
via next.jdbc)
.kit-sql-migratus
-
uses migratus for
SQL migrationskit-postgres
- lib with data bindings and utilities for
working with Postgreskit-mysql
- lib with data bindings and utilities for
working with MySQL8+kit-undertow
- Server binding
via ring-undertow-adapterPresently only Clojure deps is supported, however there are plans to add Leiningen support.
Documentation can be found here
An emacs package is available which provides a Magit-style interface to clj-new
and deps-new
and provides a command to create Kit web applications.
kit-template
Copyright © 2021
Released under the MIT license.