Generate Project
Detailed guide on generating project
Create application
-
Create project.
Change
myprojectto name of you project and run one of two following commands.Using Clojure CLI:
Requires Clojure CLI tools version
1.12.0.1479or later.OR alternatively using neil:
At the moment
neilautomatically adds:neilalias todeps.ednafter generating the project. So, for now, you might want to delete it manually. -
Start development (with mise).
miseis just convenient tool to manage system deps in version isolation for different projects. If you want, you can install all required tools manually, consult.mise.tomlfor specific versions.The server should be available at http://localhost:8000.
Use alias instead of the tool
If you prefer to use deps.edn alias instead of -Tnew tool, you can add a new alias to your global ~/.clojure/deps.edn file:
Then you can create a new project using the following command:
This approach is also useful if you want to add your own default set of options, for example, you might want to create your projects always with DaisyUI included:
The same command will include :daisyui option by default:
Options
The template offers customization options for generating your project.
:db
Choose between SQLite or PostgreSQL for your database (Default: :sqlite)
Available values: :sqlite | :postgres
Usage example for PostgreSQL:
For local development the Docker is used to run PostgreSQL database.
:daisyui
Include DaisyUI, a component library for TailwindCSS (Default: false)
Available values: false | true
Usage example for using DaisyUI:
:deploy
Choose between Kamal and no deployment configuration (Default: :kamal)
Available values: :kamal | :none
Usage example for no deployment configuration:
:auth
Add authentication and registration flow (Default: false)
Features included:
- Login, logout, registration, password reset, password change, account page
Usage example for adding auth flow:
After creating a project
After creating a project you will have a file structure and all configurations for starting development. First thing is recommended to do is checking the code formatting, linting, tests and outdated deps.
Now we can initiate git and commit initial setup:
Now we can go to Github and create a repository to add it as a remote target to your local one:
