{"id":20567429,"url":"https://github.com/sombriks/sample-htmx-javalin","last_synced_at":"2026-05-09T16:39:24.933Z","repository":{"id":222358029,"uuid":"757013528","full_name":"sombriks/sample-htmx-javalin","owner":"sombriks","description":"Sample application showing how htmx teams up with velocity","archived":false,"fork":false,"pushed_at":"2024-02-28T11:57:16.000Z","size":108,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-08T20:45:04.985Z","etag":null,"topics":["h2-database","htmx","javalin","jdbi3","kotlin","spock-framework","study-project","velocity"],"latest_commit_sha":null,"homepage":"https://sombriks.com/blog/0067-you-should-try-htmx/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sombriks.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}},"created_at":"2024-02-13T18:29:55.000Z","updated_at":"2025-03-22T06:05:09.000Z","dependencies_parsed_at":"2024-02-28T12:48:01.710Z","dependency_job_id":"0df749ba-f41d-496a-83d5-e35e2f24eb21","html_url":"https://github.com/sombriks/sample-htmx-javalin","commit_stats":null,"previous_names":["sombriks/sample-htmx-javalin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sombriks/sample-htmx-javalin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Fsample-htmx-javalin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Fsample-htmx-javalin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Fsample-htmx-javalin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Fsample-htmx-javalin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sombriks","download_url":"https://codeload.github.com/sombriks/sample-htmx-javalin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Fsample-htmx-javalin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005649,"owners_count":26083940,"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-10T02:00:06.843Z","response_time":62,"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":["h2-database","htmx","javalin","jdbi3","kotlin","spock-framework","study-project","velocity"],"created_at":"2024-11-16T04:46:41.904Z","updated_at":"2025-10-11T00:12:45.078Z","avatar_url":"https://github.com/sombriks.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [sample-htmx-javalin][00]\n\n[![Java CI with Gradle](https://github.com/sombriks/sample-htmx-javalin/actions/workflows/gradle.yml/badge.svg)](https://github.com/sombriks/sample-htmx-javalin/actions/workflows/gradle.yml)\n\nSample application showing how htmx teams up with javalin so i can compare with [this one][31]\n\n## Dependencies\n\n- java 17 or newer\n- kotlin 1.9\n- jdbi 3.44\n- htmx 2.x\n- apache velocity 2.3\n- spock 2.3\n\nA [good kotlin ide][10] is also recommended.\n\n## How to build\n\nWe have [shadow jar plugin][20] to ease runnable jar creation\n\n```bash\n./gradlew shadowJar\n```\n\n## How to run\n\nWe have [application plugin][30] to ease runnable jar creation options\n\n```bash\n./gradlew run\n```\n\nAlternatively, run the jar built in previous step:\n\n```bash\njava -jar build/libs/sample-htmx-javalin-1.0-SNAPSHOT-all.jar\n```\n\n## Noteworthy\n\n- [Shadow plugin][20] does similar job done by [maven shade plugin][40]\n- Javalin supports a good range of [template engines][50], just pick one\n- There are a good amount of [logging options][60] to Javalin\n- [Testing Javalin][01] is simple and ergonomic thanks to its testing library\n- [Spock][90] demands us to enable the groovy language in the project\n- Groovy support has issues to proper set jvm toolchain, fallbacks to system\n- There is a [nice htmx plugin][70] for intellij\n- JDBI [fluent api][80] makes database access easier\n- TodoItem needs an empty constructor so JDBI bean mapper can fill attributes in\n- [Intellij coverage plugin has an issue with velocity][11]\n- [JaCoCo plugin][21] just works even the test source set being multilingual\n\n## Next steps\n\n- [ ] Add a filter in the template. Backend already supports the 'q' parameter\n- [ ] Find a good form to object mapper would be handy. Javalin has\n  [validators][90] but besides that, form to model mapping is pretty much manual\n- [ ] Setup docker image building and registry publishing\n\n[00]: https://github.com/sombriks/sample-htmx-javalin\n[10]: https://www.jetbrains.com/idea/download\n[20]: https://imperceptiblethoughts.com/shadow/getting-started/\n[30]: https://docs.gradle.org/current/userguide/application_plugin.html\n[40]: https://github.com/sombriks/sample-jdbi-javalin/blob/main/pom.xml\n[50]: https://javalin.io/plugins/rendering#configuring-a-template-engine\n[60]: https://javalin.io/tutorials/javalin-logging\n[70]: https://plugins.jetbrains.com/plugin/20588-htmx-support\n[80]: https://jdbi.org/releases/3.44.1/#_fluent_api\n[90]: https://spockframework.org/spock/docs/2.3/spock_primer.html\n[01]: https://javalin.io/tutorials/testing#functionalintegration-tests\n[11]: https://youtrack.jetbrains.com/issue/IDEA-274803/Velocity-field-names-check-fails-with-new-coverage#focus=Comments-27-5085668.0-0\n[21]: https://docs.gradle.org/current/userguide/jacoco_plugin.html#sec:jacoco_getting_started\n[31]: https://github.com/sombriks/sample-htmx-koa\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsombriks%2Fsample-htmx-javalin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsombriks%2Fsample-htmx-javalin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsombriks%2Fsample-htmx-javalin/lists"}