{"id":13609458,"url":"https://github.com/zk/clojuredocs","last_synced_at":"2025-05-16T06:05:34.201Z","repository":{"id":40659987,"uuid":"747838","full_name":"zk/clojuredocs","owner":"zk","description":"clojuredocs.org web app","archived":false,"fork":false,"pushed_at":"2023-11-09T17:45:56.000Z","size":11656,"stargazers_count":1056,"open_issues_count":28,"forks_count":77,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-05-13T15:19:15.404Z","etag":null,"topics":["clojure","clojuredocs"],"latest_commit_sha":null,"homepage":"http://clojuredocs.org","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zk.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":"2010-06-29T22:45:39.000Z","updated_at":"2025-05-07T02:39:24.000Z","dependencies_parsed_at":"2023-01-29T17:15:47.643Z","dependency_job_id":"db818f5a-fb2c-4e26-9cde-d5ae9cfc9d6c","html_url":"https://github.com/zk/clojuredocs","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/zk%2Fclojuredocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk%2Fclojuredocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk%2Fclojuredocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk%2Fclojuredocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zk","download_url":"https://codeload.github.com/zk/clojuredocs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478187,"owners_count":22077676,"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","clojuredocs"],"created_at":"2024-08-01T19:01:35.109Z","updated_at":"2025-05-16T06:05:29.388Z","avatar_url":"https://github.com/zk.png","language":"Clojure","funding_links":[],"categories":["Clojure"],"sub_categories":[],"readme":"# clojuredocs\n\nThe clojuredocs.org webapp\n\n![](http://cl.ly/image/1C2o2d181716/Screen%20Shot%202014-07-12%20at%202.03.25%20AM.png)\n\n\n## Contributing\n\nA few ways to contribute:\n\n* Find \u0026 report bugs: https://github.com/zk/clojuredocs/issues\n* Suggestions on how to make development on the site more friendly\n  (docs, codebase organization).\n\nLet's use GH issues for discussion for now\n\nIf you're looking for a project:\n\n* Content for namespaces (see `src/md/namespaces`) needs to be added /\n  edited. Example of\n  [clojure.core.async](http://next.clojuredocs.org/clojure.core.async)\n* Listing of clojure training / classes / events on home page\n* Stand-alone example page, maybe have the var info (signature, doc\n  string, etc) at the top.\n* Source-linking on libs not included in the standard library\n  e.g. core.async.\n\n## Deploy\n\nProduction is deployed on an AWS t2.micro instance. There's an nginx\nprocess running on the box, balancing to two JVMs managed by Upstart\nto support zero-downtime deploys.\n\nTo regenerate the upstart scripts:\n\n```\ncd $REPO\nsudo foreman export -a clojuredocs -e ./.env -u ubuntu -c \"web=2\" upstart /etc/init/\n```\n\nTo start the app processes:\n\n```\nsudo service clojuredocs-web-1 start\nsudo service clojuredocs-web-2 start\n```\n\nTo redeploy:\n\n```\n# in $REPO\nsudo service clojuredocs-web-1 stop\ngit pull origin master\n# This will compile assets \u0026 run tests\nbin/build\nsudo service clojuredocs-web-1 start\n# Wait for proc 1 to start serving requests\nsudo service clojuredocs-web-2 restart\n```\n\n\n## Reqs\n\n* [\u003e JDK 7](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)\n* [JCE Unlimited Strength Jurisdiction Policy Files](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html)\n* [lein](http://leiningen.org)\n* [foreman](https://github.com/ddollar/foreman) (see `Procfile`, `bin/dev`)\n* [less](http://lesscss.org/#using-less-installation)\n* [entr](http://entrproject.org/) (available in homebrew)\n* MongoDB\n\n\n\n## Dev\n\nRun `bin/dev`, which will start all the things (repl, web process,\nscss compiler, etc). See `Procfile` for more info.\n\nConnect to the repl and / or visit http://localhost:4000\n\nYou'll notice that var information is already populated. In an effort to not make the same mistakes again, all core-related var info is loaded from the runtime version of Clojure on start up.\n\nOTOH, examples, see-alsos, and notes (and any other user-generated content) are stored in the database.\n\n\n### Local Data\n\nThe app uses a MongoDB database named `clojuredocs` to store data. Run `bin/db-reset` to seed the database with a recent production export (you must be running `mongod` for this to work).\n\n### Prod Local\n\nOccasionally you'll need to compile and run things as they would be in production (checking advanced cljs compilation, for example): `bin/prod-local`.\n\n\n### CLJS Source Maps\n\nThe ClojureDocs project is set-up to emit source-maps for compiled javascript. To enable in Chrome, check the 'Enable JS source maps' option in the Developer Tools settings pane.\n\n\n### Clojure Version\n\nClojure vars are pulled directly from the runtime, and are not stored in the database. When new versions of Clojure are released:\n\n* Change the Clojure dep in `project.clj`\n* Update the version string, source base url, and gh tag url in\n  `clojuredocs.search/clojure-lib`\n* Update the version for the mobile nav in `clojuredocs.pages.common`\n* Update the github URL in `clojuredocs.pages.vars/source-url`.\n\n\n### App Structure\n\nInteresting files:\n\n* `src/clj/clojuredocs/main.clj` -- Main entry-point into the app, starts the jetty server\n* `src/clj/clojuredocs/entry.clj` -- Root routes and middleware\n* `src/clj/clojuredocs/pages.clj` -- User-facing HTML pages\n* `src/clj/clojuredocs/api.clj` -- API endpoints for ajax calls from the frontend.\n* `src/cljs/clojuredocs/main.cljs` -- Main js entry-point into the app\n\n\n### Conventions\n\n* Functions that return hiccup structures should be prefixed with a `$`, like `$layout`.\n* Mutable state should be prefixed with a `!`, ex: `!my-atom`.\n\n\n### Adding Functions, Macros, Special Forms, Namespaces \u0026 Other Vars\n\nMost vars are picked up from Clojure at runtime, using core namespace\nand var introspection utilities. Special forms and namespaces to\ninclude on the site are specified explicitly in the\n`clojuredocs.search.static` namespace.\n\nVars are picked up automatically based on the namespaces specified in\n`clojuredocs.search.static/clojure-namespaces` vector. Any namespace\nin this vector will be queried for public vars to be made searchable\nand displayable on the site.\n\nSpecial forms are specified in the\n`clojuredocs.search.static/special-forms` list, and require a server\nrestart to be picked up in a dev environment.\n\n\n### Adding Core Libraries\n\nSometimes we'd like to add core libraries that are not part of the\nstandard Clojure distribution (like core.async) to the site. Here's\nhow to do that:\n\n1. Add dependency to `project.clj`\n1. Add ns sym to `clojure-namespaces` in `clojuredocs.search.static`\n1. Add a short description + links to community articles / videos /\n   other resources to `src/md/namespaces/`\n\n\n## Dev-Prod differences\n\n* Dev starts the environment using `lein repl :headless`, prod uses `lein run -m clojuredocs.main`. See `:repl-options` in `project.clj` for initialization options.\n\n## Data Exports\n\n* [See also relations](https://clojuredocs.org/api/exports/see-alsos-relations) (ns/name -\u003e [ns/name]), results cached for 1 minute.\n\n\n## Contributors\n\n[Zachary Kim](https://github.com/zk), [Lee Hinman](https://github.com/dakrone), and [more](https://github.com/zk/clojuredocs/graphs/contributors).\n\n\n## License\n\nCopyright © 2010-present Zachary Kim\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk%2Fclojuredocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzk%2Fclojuredocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk%2Fclojuredocs/lists"}