{"id":26432307,"url":"https://github.com/abogoyavlensky/clojure-stack-lite","last_synced_at":"2025-10-14T01:33:16.483Z","repository":{"id":282648054,"uuid":"920384009","full_name":"abogoyavlensky/clojure-stack-lite","owner":"abogoyavlensky","description":"🪶A quick way to start a full-stack Clojure app with Server-side Rendering. Built on SQLite/PostgreSQL, HTMX, AlpineJS and TailwindCSS v4","archived":false,"fork":false,"pushed_at":"2025-09-22T23:01:09.000Z","size":234,"stargazers_count":62,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-23T00:21:42.500Z","etag":null,"topics":["alpinejs","boilerplate","clojure","generate","htmx","project","scaffold","stack","tailwindcss","template"],"latest_commit_sha":null,"homepage":"https://stack.bogoyavlensky.com","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abogoyavlensky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-22T03:48:36.000Z","updated_at":"2025-09-22T23:01:12.000Z","dependencies_parsed_at":"2025-03-16T02:41:53.678Z","dependency_job_id":"303ee576-5af9-492a-b28b-f6fdec29fdce","html_url":"https://github.com/abogoyavlensky/clojure-stack-lite","commit_stats":null,"previous_names":["abogoyavlensky/clojure-stack-lite"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/abogoyavlensky/clojure-stack-lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abogoyavlensky%2Fclojure-stack-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abogoyavlensky%2Fclojure-stack-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abogoyavlensky%2Fclojure-stack-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abogoyavlensky%2Fclojure-stack-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abogoyavlensky","download_url":"https://codeload.github.com/abogoyavlensky/clojure-stack-lite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abogoyavlensky%2Fclojure-stack-lite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017497,"owners_count":26086084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpinejs","boilerplate","clojure","generate","htmx","project","scaffold","stack","tailwindcss","template"],"created_at":"2025-03-18T06:17:59.885Z","updated_at":"2025-10-14T01:33:16.478Z","avatar_url":"https://github.com/abogoyavlensky.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clojure Stack Lite\n\nA quick way to start a full-stack Clojure app with server-side rendering. \nBuilt on a powerful yet lightweight stack featuring SQLite/PostgreSQL, HTMX, AlpineJS, and TailwindCSS v4.\n\nThis template is designed to be lightweight and easy to use, with a focus on rapid development and deployment. Minimal distraction and sane defaults. Everything is streamlined to give you a solid foundation for building modern web applications.\n\nGet started building your new Clojure application in seconds and be productive!\n\n## Usage\n\n1. Create a new Clojure project using Clojure CLI:\n   ```bash\n   clojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new\n   clojure -Tnew create :template io.github.abogoyavlensky/clojure-stack-lite :name myproject\n   ```\n    \n    \u003e Requires Clojure CLI tools version `1.12.0.1479` or later.\n    \n   Or alternatively using [neil](https://github.com/babashka/neil):\n\n   ```bash\n   brew install babashka/brew/neil\n   neil new io.github.abogoyavlensky/clojure-stack-lite myproject\n   ```\n\n2. Start development (with [mise](https://mise.jdx.dev/getting-started.html)):\n\n   ```shell\n   cd myproject\n   mise trust \u0026\u0026 mise install\n   bb clj-repl\n   (reset)\n   ```\n\n   The server should be available at `http://localhost:8000`.\n   Check out project's README.md and template documentation for more information on how to use the project.\n\n\u003e [!TIP]\n\u003e Edit some details before going to production: label in `Dockerfile`, \n  domain in `resources/public/manifest.json` and description in `README.md`\n\n## Features\n\n- 🏗️ Robust Clojure stack powered by Integrant and Reitit/Ring\n- 🎨 Lightweight frontend using HTMX, AlpineJS and TailwindCSS v4 (with optional DaisyUI\n  components)\n- 📦 SQLite/PostgreSQL database (you choose)\n- 🔄 Zero-downtime deployment via Kamal\n- ⚡ GitHub Actions CI/CD pipeline\n- 🧪 Integration and unit testing setup with coverage\n- 🔍 Linting, formatting and deps version management\n- ⚙️ deps.edn and Babashka Tasks for efficient project management\n- 📱 Basic PWA support out of the box (without service worker)\n- 🔒 Optional authentication and registration flow\n\n## Stack\n\n### Backend\n- **Integrant**: Component lifecycle management for application\n- **Reitit**: Fast data-driven routing\n- **Ring/Jetty**: HTTP server adapter\n- **Hiccup**: HTML generation from Clojure data structures\n- **Malli**: Data validation and specification\n\n### Database\n\n- **SQLite/PostgreSQL**: Choose between file-based SQLite or enterprise-grade PostgreSQL\n- **next.jdbc**: JDBC-based database access\n- **HoneySQL**: SQL as Clojure data structures\n- **Ragtime**: Database migrations\n\n### Frontend\n- **HTMX 2**: HTML extensions for AJAX without writing JavaScript\n- **AlpineJS 3**: Lightweight JavaScript framework for adding behavior\n- **TailwindCSS 4**: Utility-first CSS framework\n- [OPTIONAL] **DaisyUI**: A UI Component library (`:daisyui true` option)\n\n### Development\n- **Babashka**: Project management with tasks\n- **clj-kondo**: Static analyzer and linter\n- **cljfmt**: Code formatter\n- **eftest/cloverage**: Testing and code coverage\n\n### Deployment\n- **Docker**: Containerization\n- **Kamal**: Zero-downtime deployments\n- **GitHub Actions**: CI/CD workflows\n\n### Features\n- Authentication and registration flow (`:auth true` option)\n  - Login, logout, registration, password reset, password change, account page \n\n## Project structure\n\nThe template generates a Clojure project with the following structure:\n\n```\n├── .clj-kondo/            # Clojure linting configuration\n├── .github/               # GitHub Actions workflows and configurations\n├── .kamal/                # Kamal deployment configuration (only used with Kamal)\n├── db/                    # Empty database directory for database files (only used with SQLite)\n├── dev/                   # Development configuration directory\n│   └── user.clj           # User-specific development configuration\n├── resources/             # Static resources and configuration files\n│   ├── public/            # Public assets (CSS, JS, images)\n│   ├── migrations/        # Database migration files\n│   ├── config.edn         # Main configuration file for the application\n│   ├── config.dev.edn     # Development-specific configuration\n│   └── logback.xml        # Logging configuration file\n├── src/                   # Source code directory\n│   └── {{name}}           # Main namespace directory\n│       ├── core.clj       # Application entry point\n│       ├── db.clj         # Database system component and main operations\n│       ├── handlers.clj   # HTTP request handlers\n│       ├── routes.clj     # Route definitions\n│       ├── server.clj     # Server system component\n│       └── views.clj      # HTML templates and components with Hiccup\n├── test/                  # Test files directory\n│   └── {{name}}           # Test namespace directory\n│       ├── home_test.clj  # Example test for home page\n│       └── test_utils.clj # Test utilities\n├── .cljfmt.edn            # Formatting configuration\n├── .gitignore             # Git ignore rules\n├── .mise.toml             # mise-en-place configuration with system dependencies\n├── .dockerignore          # Docker ignore rules\n├── bb.edn                 # Babashka tasks configuration for managing application\n├── deps.edn               # Clojure dependencies and aliases\n├── Dockerfile             # Dockerfile for building the application image\n├── docker-compose.yaml    # Run PostgreSQL database for local development (only used with PostgreSQL)\n├── LICENSE                # License file, AGPLv3 by default, for motivation check: https://plausible.io/blog/open-source-licenses\n└── README.md              # Project documentation\n```\n\n## Options\n\nThe template offers customization options for generating your project:\n\n- `:db` - Choose between SQLite or PostgreSQL for your database (*Default: `:sqlite`*)\n    - Available values: `:sqlite` or `:postgres`\n- `:daisyui` - Include [DaisyUI](https://daisyui.com/), a component library for TailwindCSS (*Default: `false`*)\n    - Available values: `true`\n- `:deploy` - Choose between Kamal and no deployment configuration (*Default:* `:kamal`)\n    - Available values: `:kamal` or `:none`\n- `:auth` - Add authentication and registration flow (*Default: `false`*)\n    - Available values: `true`\n\nPossible values: `false | true`\n\nUsage example:\n\n```shell\nclojure -Tnew create :template io.github.abogoyavlensky/clojure-stack-lite :name myproject :daisyui true\n```\n\n## Authentication flow preview\n\nhttps://github.com/user-attachments/assets/187daef7-d39d-4794-8dd4-2a88b735c826\n\n## Roadmap\n\n- [x] DaisyUI support\n- [x] PostgreSQL support\n- [x] No deployment option\n- [x] Register/Auth flow\n- [ ] Sentry support\n- [ ] More frontend tool options (TwinSpark, Datastar)\n- [ ] Queue support\n- [ ] Websocket support\n\n## Links\n\n- [Integrant + Aero](https://lambdaisland.com/blog/2019-12-11-advent-of-parens-11-integrant-in-practice)\n- [Start TailwindCSS as part of the app system](https://shagunagrawal.me/posts/multiplayer-board-game-in-clojure/#repl)\n- [Auto-reloading Ring/Reitit](https://bogoyavlensky.com/blog/auto-reloading-ring/)\n- [Sessions with Ring/Reitit](https://github.com/metosin/reitit/issues/205)\n- [Clojure + Kamal](https://bogoyavlensky.com/blog/deploying-full-stack-clojure-app-with-kamal/)\n- [CI with Kamal](https://igor.works/blog/evolution-of-github-action-for-kamal)\n\n## Template Development\n\n### Requirements\n\nTo work with this template, you need:\n\n1. [mise](https://mise.jdx.dev/) (recommended) or manual installation of:\n    - Java\n    - Clojure\n    - Babashka\n\n### Getting Started\n\nAll management tasks:\n```shell\nbb tasks\nThe following tasks are available:\n\ntest    Run tests for the template config\nnew     Create a new project\nrelease Create and push a new git tag based on provided version\n```\n\nAfter you updated the template and ran tests `bb test`, you can create a new project to check if everything works as expected:\n\n```shell\nbb new\n```\nThe new project will be created in the `tmpl` directory at the root that is ignored by git.\n\n### Release\n\nOnce you are ready to release a new version of the template, bump version in `deps.edn`:\n\n```\n:aliases -\u003e :build -\u003e :exec-args -\u003e :version -\u003e \"0.1.1\n```\n\nand then run the following command:\n\n```shell\nbb release \n```\n\nA new git tag based on latest version will be created and pushed to the repository.\n\n## License\nMIT License\nCopyright (c) 2025 Andrey Bogoyavlenskiy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabogoyavlensky%2Fclojure-stack-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabogoyavlensky%2Fclojure-stack-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabogoyavlensky%2Fclojure-stack-lite/lists"}