Practicalli Project Templatesλ︎
Practicalli Project templates provides tools for a REPL Reloaded Workflow and several production grade project configurations.
:template command line argument to specify a project template to generate the new Clojure project.
practicalli/minimal- essential tools, libraries and example code
practicalli/application- general Clojure production level project template
practicalli/service- production level web services template with Http-kit, Reitit and Swagger. Optional
: componentmanagement with
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λ︎
dev/user.clj adds tools to the REPL on start up
mulog_events.cljcustom publisher sends log events to portal
portal.cljlaunch portal data inspector and set log global context
system_repl.cljComponent services e.g. donut-party/system, integrant REPL
user.cljprovides help for custom user namespace, loads portal, mulog and tools.namespace.repl to support reloading Clojure code
Makefile defines targets used across Practicalli projects, following the make standard targets for users
allcalling all targets to prepare the application to be run. e.g. all: deps test-ci dist clean
depsdownload library dependencies (depend on
distcreate a distribution tar file for this program or zip deployment package for AWS Lambda
lintrun lint tools to check code quality - e.g MegaLinter which provides a wide range of tools
format-checkreport format and style issues for a specific programming language
format-fixupdate source code files if there are format and style issues for a specific programming language
pre-commitrun unit tests and code quality targets before considering a Git commit
replrun an interactive run-time environment for the programming language
test-unitrun all unit tests
test-citest running in CI build (optionally focus on integration testing)
cleanremove 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-buildbuild Clojure project and run with docker compose
docker-build-cleanbuild Clojure project and run with docker compose, removing orphans
docker-downshut down containers in docker compose
swagger-editorstart Swagger Editor in Docker
swagger-editor-downstop Swagger Editor in 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
Dockerfilemulti-stage build and run, with JVM optomisations for a Docker container
.dockerignorepatterns to opomise copying of files to the docker build image
compose.yamlconfiguration for orchestrating additional services, e.g. postgresql database