{"id":32191946,"url":"https://github.com/qmoya/stimulus-clj","last_synced_at":"2025-10-22T01:54:33.305Z","repository":{"id":220598317,"uuid":"695894128","full_name":"qmoya/stimulus-clj","owner":"qmoya","description":"“A modest ClojureScript framework for the HTML you already have.”","archived":false,"fork":false,"pushed_at":"2023-09-29T15:44:46.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T02:28:15.174Z","etag":null,"topics":["clojure","clojurescript","ssr","stimulus","turbo"],"latest_commit_sha":null,"homepage":"","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/qmoya.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}},"created_at":"2023-09-24T14:55:05.000Z","updated_at":"2025-07-18T07:23:53.000Z","dependencies_parsed_at":"2024-02-03T01:24:19.077Z","dependency_job_id":"4e39e517-07b7-4efd-a698-e91a515f12a3","html_url":"https://github.com/qmoya/stimulus-clj","commit_stats":null,"previous_names":["qmoya/stimulus-clj"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qmoya/stimulus-clj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qmoya%2Fstimulus-clj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qmoya%2Fstimulus-clj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qmoya%2Fstimulus-clj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qmoya%2Fstimulus-clj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qmoya","download_url":"https://codeload.github.com/qmoya/stimulus-clj/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qmoya%2Fstimulus-clj/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280365582,"owners_count":26318385,"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-21T02:00:06.614Z","response_time":58,"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":["clojure","clojurescript","ssr","stimulus","turbo"],"created_at":"2025-10-22T01:54:30.216Z","updated_at":"2025-10-22T01:54:33.299Z","avatar_url":"https://github.com/qmoya.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stimulus ❤️ Clojure\n[![Clojars Project](https://img.shields.io/clojars/v/com.github.qmoya/stimulus.svg)](https://clojars.org/com.github.qmoya/stimulus)\n\n[Stimulus](https://stimulus.hotwired.dev) is “a modest JavaScript framework for the HTML you already have.”\nIt was created by 37signals as an alternative to heavier approaches\nto client-side interactions.\n\nThis is an experimental library that lets you write Stimulus controllers\nusing Clojure.\n\n## Usage\n\n### Server-side\n\n```clojure\n(ns my.example\n  (:require [hiccup.page :as page]\n            [io.pedestal.http :as http]\n            [io.pedestal.http.route :as route])\n  (:gen-class))\n\n(defn home [req]\n  {:status  200\n   :headers {\"Content-Type\" \"text/html; charset=utf-8\"}\n   :body    (page/html5 [:head\n                         [:title \"Stimulus Examples\"]\n                         (page/include-js \"/js/main.js\")]\n                        [:div {:data-controller \"hello\"}\n                         [:input {:data-hello-target \"name\", :type \"text\"}]\n                         [:button {:data-action \"click-\u003ehello#greet\"} \"Greet\"]\n                         [:span {:data-hello-target \"output\"}]])})\n\n(def routes\n  (route/expand-routes\n    #{[\"/\" :get home :route-name :home]}))\n\n(defn -main\n  [\u0026 args]\n  (-\u003e {::http/routes         routes\n       ::http/port           3000\n       ::http/resource-path  \"/public\"\n       ::http/secure-headers {:content-security-policy-settings {:object-src \"none\"}}\n       ::http/type           :jetty}\n      http/create-server\n      http/start))\n```\n\n### Client-side\n\n```clojure\n(ns stimulus.example.example\n  (:require [stimulus.controller :refer [-\u003econtroller]]\n            [\"@hotwired/stimulus\" :refer [Controller Application]]\n            [goog.dom :as gdom]))\n\n(defn greet [controller event]\n  (let [name-target (get-name-target controller)\n        output-target (get-output-target controller)]\n    (gdom/setTextContent output-target (str \"Hello, \" (.-value name-target)))))\n  \n(def greet-controller (-\u003e {:extends Controller\n                           :targets [\"output\" \"name\"]\n                           :actions {:greet greet}}\n                          -\u003econtroller))\n\n(let [application (.start Application)]\n  (.register application \"hello\" greet-controller))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqmoya%2Fstimulus-clj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqmoya%2Fstimulus-clj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqmoya%2Fstimulus-clj/lists"}