/kit

Lightweight, modular framework for scalable web development in Clojure

Primary LanguageClojureMIT LicenseMIT

Kit

Lightweight, modular framework for scalable production systems.

ALPHA WARNING: kit-generator and Kit modules / code generation is in ALPHA meaning the API for code generation is subject to change. This should not affect users of Kit, but will affect anyone developing modules or extending them. The libs/libraries are stable.

Goal

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.

Quick start

Kit requires clj-new, installed preferably as a tool:

clojure -Ttools install com.github.seancorfield/clj-new '{:git/tag "v1.2.381"}' :as new

To create a new Kit application:

clojure -Tnew create :template io.github.kit-clj :name yourname/app

Latest versions

Library Latest Version
io.github.kit-clj/kit-core Clojars Project
io.github.kit-clj/kit-hato Clojars Project
io.github.kit-clj/kit-metrics Clojars Project
io.github.kit-clj/kit-nrepl Clojars Project
io.github.kit-clj/kit-quartz Clojars Project
io.github.kit-clj/kit-redis Clojars Project
io.github.kit-clj/kit-repl Clojars Project
io.github.kit-clj/kit-selmer Clojars Project
io.github.kit-clj/kit-sql Clojars Project
io.github.kit-clj/kit-sql-conman Clojars Project
io.github.kit-clj/kit-sql-hikari Clojars Project
io.github.kit-clj/kit-sql-migratus Clojars Project
io.github.kit-clj/kit-postgres Clojars Project
io.github.kit-clj/kit-mysql Clojars Project
io.github.kit-clj/kit-xtdb Clojars Project
io.github.kit-clj/kit-generator Clojars Project
io.github.kit-clj/lein-template Clojars Project
io.github.kit-clj/deps-template Clojars Project

Profiles

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

Libs

  • kit-core - basic utility functions used by some other libs
  • kit-xtdb - Simple binding to connect to a XTDB database node
  • kit-hato - HTTP client using hato
  • kit-nrepl - nREPL component for use in a running system. e.g. to connect to a production REPL
  • kit-metrics - Configurable metrics using iapetos
  • kit-quartz - Scheduler using cronut as an integrant binding for quartz. Exposes the cronut API, simply some extensions for aero and utilities
  • kit-redis - An extension of core.cache for Redis via carmine
  • kit-repl - Socket REPL integrant binding for use in a running system. e.g. to connect to a production REPL
  • kit-selmer - Templating configuration with selmer
  • kit-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 implicitly
  • kit-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 migrations
  • kit-postgres - lib with data bindings and utilities for working with Postgres
  • kit-mysql - lib with data bindings and utilities for working with MySQL8+
  • kit-undertow - Server binding via ring-undertow-adapter

Build Tool Support

Presently only Clojure deps is supported, however there are plans to add Leiningen support.

Documentation

Documentation can be found here

Emacs Integration

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.

Inspiration and thanks to

License

Copyright © 2021

Released under the MIT license.