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: componentmanagement with:donutor:integrantpracicalli/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.cljcustom publisher sends log events to portalportal.cljlaunch portal data inspector and set log global contextsystem_repl.cljComponent services e.g. donut-party/system, integrant REPLuser.cljprovides 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
allcalling all targets to prepare the application to be run. e.g. all: deps test-ci dist cleandepsdownload library dependencies (depend ondeps.ednfile)distcreate a distribution tar file for this program or zip deployment package for AWS Lambdalintrun lint tools to check code quality - e.g MegaLinter which provides a wide range of toolsformat-checkreport format and style issues for a specific programming languageformat-fixupdate source code files if there are format and style issues for a specific programming languagepre-commitrun unit tests and code quality targets before considering a Git commitreplrun an interactive run-time environment for the programming languagetest-unitrun all unit teststest-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 composedocker-build-cleanbuild Clojure project and run with docker compose, removing orphansdocker-downshut down containers in docker composeswagger-editorstart Swagger Editor in Dockerswagger-editor-downstop 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
Dockerfilemulti-stage build and run, with JVM optomisations for a Docker container.dockerignorepatterns to opomise copying of files to the docker build imagecompose.yamlconfiguration for orchestrating additional services, e.g. postgresql database