{"id":18683448,"url":"https://github.com/prestancedesign/usermanager-reitit-example","last_synced_at":"2025-04-05T16:06:07.405Z","repository":{"id":50726554,"uuid":"257311359","full_name":"prestancedesign/usermanager-reitit-example","owner":"prestancedesign","description":" A little demo web app in Clojure, using Integrant, Ring, Reitit, Selmer (and a database) ","archived":false,"fork":false,"pushed_at":"2024-11-06T12:35:44.000Z","size":36,"stargazers_count":122,"open_issues_count":0,"forks_count":17,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-29T15:08:19.746Z","etag":null,"topics":["clojure","integrant","reiti"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prestancedesign.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-04-20T14:44:43.000Z","updated_at":"2025-03-17T00:55:42.000Z","dependencies_parsed_at":"2024-11-06T13:43:52.333Z","dependency_job_id":null,"html_url":"https://github.com/prestancedesign/usermanager-reitit-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prestancedesign%2Fusermanager-reitit-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prestancedesign%2Fusermanager-reitit-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prestancedesign%2Fusermanager-reitit-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prestancedesign%2Fusermanager-reitit-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prestancedesign","download_url":"https://codeload.github.com/prestancedesign/usermanager-reitit-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361620,"owners_count":20926643,"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","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","integrant","reiti"],"created_at":"2024-11-07T10:14:40.613Z","updated_at":"2025-04-05T16:06:07.386Z","avatar_url":"https://github.com/prestancedesign.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+title: Example Web Application in Clojure\n\nThis repo is a simple web application using Integrant, Ring, Reitit, and Selmer connected to a local SQLite database.\n\nFor learning purpose, I redid from scratch the very useful [[https://github.com/seancorfield/usermanager-example][Sean Corfield's usermanager repo]] and decided to move some libraries to learn them too in the process.\n- [[https://github.com/weavejester/compojure][Compojure]] -\u003e [[https://github.com/metosin/reitit][Reitit]]\n- [[https://github.com/stuartsierra/component][Component]] -\u003e [[https://github.com/weavejester/integrant][Integrant]]\n\nA Single Page App version that use [[https://github.com/prestancedesign/inertia-clojure][Inertia-clojure]] library can be found [[https://github.com/prestancedesign/reagent-inertia-reitit-integrant-fullstack][here]].\n\n** Requirements\n\n   This example assumes that you have the [[https://clojure.org/guides/deps_and_cli][Clojure CLI]] installed, and provides a =deps.edn= file.\n\n   Clojure 1.10 (or later) is required. The \"model\" of this example app uses namespace-qualified keys in hash maps. It uses [[https://cljdoc.org/d/seancorfield/next.jdbc][next.jdbc]] -- the \"next generation\" JDBC library for Clojure -- which produces namespace-qualified hash maps from result sets.\n\n** Usage\n*** Run the Application\n    Clone the repo, =cd= into it, then follow below to /Run the Application/ or /Run the application/ in REPL.\n    You can launch the application by directly calling the namespace which contains the =-main= function in an terminal\n    #+begin_src sh\n      $ clj -M -m usermanager.system\n    #+end_src\n    or more conveniently, using an alias configured in =deps.edn= file.\n    #+begin_src sh\n      $ clj -M:server\n    #+end_src\n    Now acces the app at: [[http://localhost:3000/][http://localhost:3000/]].\n*** Run the Application in REPL\n    #+begin_src sh\n      $ clj -M:dev\n    #+end_src\n    Once REPL starts, run the system:\n    #+begin_src clojure\n      user=\u003e (go)\n    #+end_src\n    Now acces the app at: [[http://localhost:3000/][http://localhost:3000/]].\n\n** Build an Uberjar\n   For production deployment, you typically want to build an \"uberjar\" -- a =.jar= file that contains Clojure itself and all of the code from your application and its dependencies, so that you can run it with the =java -jar= command.\n\n   The =build.clj= file -- mentioned above -- contains a =ci= task that:\n   - cleans up the `target` folder\n   - compiles the application (sometimes called \"AOT compilation\")\n   - produces a standalone `.jar` file\n   #+begin_src sh\n     clojure -T:build ci\n   #+end_src\n\n   You should see something like this:\n   #+begin_src sh\n     Cleaning target...\n\n     Skipping pom.xml because :lib and/or :version were omitted...\n     Copying src, resources...\n     Compiling system.main...\n     2022-05-25 18:20:13.069:INFO::main: Logging initialized @3981ms to org.eclipse.jetty.util.log.StdErrLog\n     Building uberjar target/reitit-example-standalone.jar...\n   #+end_src\n\n   The =target= folder will be created if it doesn't exist and it will include a =classes= folder containing all of the compiled Clojure source code from the =usermanager= application /and all of its dependencies/ including Clojure itself:\n   #+begin_src sh\n     $ ls target/classes/\n     cheshire  clojure  clout  com  compojure  crypto  instaparse  json_html  layouts  medley  next  public  ring  selmer  usermanager  views\n   #+end_src\n\n   It will also include the standalone =.jar= file which you can run like this:\n\n   #+begin_src sh\n     java -jar target/example-standalone.jar\n   #+end_src\n\n   This should behave the same as the /Run the Application/ example above.\n\n   This JAR file can be deployed to any server that have Java installed and run with no other external dependencies or files.\n\n** License \u0026 Copyright\n\n   Copyright (c) 2015-2022 Sean Corfield / Michaël SALIHI.\n\n   Distributed under the Apache Source License 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprestancedesign%2Fusermanager-reitit-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprestancedesign%2Fusermanager-reitit-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprestancedesign%2Fusermanager-reitit-example/lists"}