Application Profiles

Contents

  1. Profiles
  2. Libraries

Profiles

Profiles are clj-new template arguments. They are helpful when you are starting a new project and know ahead of time what functionality you will need. In such cases, you can use profiles to set up a new Kit project without having to manually add libraries and wire them together.

Unlike modules, profiles are tied to clj-new, the project generation tool. You can only use them when creating a project.

Running clojure -Tclj-new create :template io.github.kit-clj :name yourname/app will create an application using the default profile template. However, if you would like to attach further functionality to your template you can append profile hints for the extended functionality.

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
  • +nrepl - Adds the kit-nrepl lib, removes the kit-repl lib. Note that you do not need this profile to use nREPL during development.
  • +quartz - Adds the kit-quartz lib
  • +redis - Adds the kit-redis lib
  • +selmer - Adds the kit-selmer lib
  • +socket-repl - Adds the kit-repl lib
  • +sql - Adds the kit-sql and kit-postgres libs
  • +full - Adds the libs kit-xtdb, kit-hato, kit-metrics, kit-quartz, kit-redis, kit-repl, kit-selmer, and kit-sql

To add a profile, pass it as an argument after your application name, e.g.:

clojure -Tclj-new create :template io.github.kit-clj :name yourname/app :args '[+selmer]'

You can also mix multiple profiles when creating the application, e.g.:

clojure -Tclj-new create :template io.github.kit-clj :name yourname/app :args '[+selmer +xtdb]'

Libraries

  • 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-metrics - Configurable metrics using iapetos
  • kit-nrepl - nREPL component. Note that you do not need this library to use nREPL during development.
  • kit-quartz - Scheduler using cronut as an integrant binding for quartz. Exposes the cronut API, simply some extensions for aero and utilities
  • kit-redis - Extension of core.cache for Redis via carmine
  • kit-repl - Socket REPL integrant binding
  • kit-selmer - Templating configuration with selmer
  • kit-sql - Generic SQL integrant binding. Uses conman, next.jdbc, hugsql, and migratus directly, or implicitly. By default, imports kit-postgres lib which supports Postgresql
  • kit-postgres - Lib with data bindings and utilities for working with Postgres
  • kit-undertow - Server binding via luminus-undertow