Practicalli Project Templatesλ︎
Practicalli Project templates provides tools for a REPL Reloaded Workflow and several production grade project configurations.
:project/create
alias defined in Practicalli Clojure CLI Config provides` provides seancorfield/deps-new tool for creating projects, including the Practicalli Project Templates
Available Templatesλ︎
Use the :template
command line argument to specify a project template to generate the new Clojure project.
practicalli/minimal
- essential tools, libraries and example codepracticalli/application
- general Clojure production level project templatepracticalli/service
- production level web services template with Http-kit, Reitit and Swagger. Optional: component
management with:donut
or:integrant
pracicalli/landing-page
- simple clojurescript website with bulma.io CSS and Figheel-main build tool.
Create service project with Donut System components
Common Template Designλ︎
practicalli/project-templates provide production level templates that include Practicalli tools, Docker & Compose configurations, Makefile tasks for a consistent command line UI and GitHub workflows to manage quality of code and configuration.
Custom user namespaceλ︎
Practicalli dev/user.clj
adds tools to the REPL on start up
mulog_events.clj
custom publisher sends log events to portalportal.clj
launch portal data inspector and set log global contextsystem_repl.clj
Component services e.g. donut-party/system, integrant REPLuser.clj
provides help for custom user namespace, loads portal, mulog and tools.namespace.repl to support reloading Clojure code
Make tasksλ︎
Makefile
defines targets used across Practicalli projects, following the make standard targets for users
all
calling all targets to prepare the application to be run. e.g. all: deps test-ci dist cleandeps
download library dependencies (depend ondeps.edn
file)dist
create a distribution tar file for this program or zip deployment package for AWS Lambdalint
run lint tools to check code quality - e.g MegaLinter which provides a wide range of toolsformat-check
report format and style issues for a specific programming languageformat-fix
update source code files if there are format and style issues for a specific programming languagepre-commit
run unit tests and code quality targets before considering a Git commitrepl
run an interactive run-time environment for the programming languagetest-unit
run all unit teststest-ci
test running in CI build (optionally focus on integration testing)clean
remove files created by any of the commands from other targets (i.e. ensure a clean build each time)
Practicalli Makefile also defines docker targets to build and compose images locally, inspect images and prune containers and images.
docker-build
build Clojure project and run with docker composedocker-build-clean
build Clojure project and run with docker compose, removing orphansdocker-down
shut down containers in docker composeswagger-editor
start Swagger Editor in Dockerswagger-editor-down
stop Swagger Editor in Docker
Dockerλ︎
Docker configuration builds and runs the Clojure project in a Docker container, orchestrating with other services including a Database.
The service and application project templates include the following files
Dockerfile
multi-stage build and run, with JVM optomisations for a Docker container.dockerignore
patterns to opomise copying of files to the docker build imagecompose.yaml
configuration for orchestrating additional services, e.g. postgresql database