{"id":21734079,"url":"https://github.com/hodur-org/hodur-visualizer-schema","last_synced_at":"2025-12-12T01:15:44.621Z","repository":{"id":62432912,"uuid":"156647372","full_name":"hodur-org/hodur-visualizer-schema","owner":"hodur-org","description":"Hodur is a domain modeling approach and collection of libraries to Clojure.  By using Hodur you can define your domain model as data, parse and validate it, and then either consume your model via an API or use one of the many plugins to help you achieve mechanical results faster and in a purely functional manner.","archived":false,"fork":false,"pushed_at":"2019-08-03T11:21:42.000Z","size":73,"stargazers_count":21,"open_issues_count":13,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-12T01:59:05.996Z","etag":null,"topics":["clojure","data","modeling","schema","visualization"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/hodur-org.png","metadata":{"files":{"readme":"README.org","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}},"created_at":"2018-11-08T03:53:29.000Z","updated_at":"2024-05-22T22:27:08.000Z","dependencies_parsed_at":"2022-11-01T21:16:04.913Z","dependency_job_id":null,"html_url":"https://github.com/hodur-org/hodur-visualizer-schema","commit_stats":null,"previous_names":["luchiniatwork/hodur-visualizer-schema"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hodur-org/hodur-visualizer-schema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hodur-org%2Fhodur-visualizer-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hodur-org%2Fhodur-visualizer-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hodur-org%2Fhodur-visualizer-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hodur-org%2Fhodur-visualizer-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hodur-org","download_url":"https://codeload.github.com/hodur-org/hodur-visualizer-schema/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hodur-org%2Fhodur-visualizer-schema/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259809021,"owners_count":22914751,"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","data","modeling","schema","visualization"],"created_at":"2024-11-26T05:07:44.228Z","updated_at":"2025-12-12T01:15:44.561Z","avatar_url":"https://github.com/hodur-org.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE:   Hodur Visualizer Schema\n#+AUTHOR:  Tiago Luchini\n#+EMAIL:   info@tiagoluchini.eu\n#+OPTIONS: toc:t\n\n[[https://img.shields.io/clojars/v/hodur/engine.svg]]\n[[https://img.shields.io/clojars/v/hodur/visualizer-schema.svg]]\n[[https://img.shields.io/badge/License-MIT-blue.svg]]\n[[https://img.shields.io/badge/project%20status-experimental-brightgreen.svg]]\n\n[[./docs/logo-tag-line.png]]\n\nHodur is a descriptive domain modeling approach and related collection\nof libraries for Clojure.\n\nBy using Hodur you can define your domain model as data, parse and\nvalidate it, and then either consume your model via an API making your\napps respond to the defined model or use one of the many plugins to\nhelp you achieve mechanical, repetitive results faster and in a purely\nfunctional manner.\n\n#+BEGIN_QUOTE\nThis Hodur plugin provides the ability to visualize your Hodur model\non a dynamically, hot-reloaded web page.\n#+END_QUOTE\n\n* Motivation\n\n  For a deeper insight into the motivations behind Hodur, check the\n  [[https://github.com/luchiniatwork/hodur-engine/blob/master/docs/MOTIVATION.org][motivation doc]].\n\n* Getting Started\n\n  Hodur has a highly modular architecture. [[https://github.com/luchiniatwork/hodur-engine][Hodur Engine]] is always\n  required as it provides the meta-database functions and APIs\n  consumed by plugins.\n\n  Therefore, refer the [[https://github.com/luchiniatwork/hodur-engine#getting-started][Hodur Engine's Getting Started]] first and then\n  return here for Lacinia-specific setup.\n\n  After having set up ~hodur-engine~ as described above, we also need\n  to add ~hodur/visualizer-schema~, a plugin that creates and shows\n  Hodur models on a web browser to the ~deps.edn~ file:\n\n#+BEGIN_SRC clojure\n  {:deps {hodur/engine            {:mvn/version \"0.1.2\"}\n          hodur/visualizer-schema {:mvn/version \"0.1.1\"}}}\n#+END_SRC\n\n  While you are at your ~deps.edn~ file also make sure you have both\n  ~\"src\"~ and ~\"resources\"~ to your ~:paths~:\n\n#+BEGIN_SRC clojure\n  {:paths [\"src\" \"resources\"]}\n#+END_SRC\n\n  Visualizer utilizes a JavaScript library called [[https://gojs.net/][GoJS]] for the\n  rendering and interactive bits. This library is unfortunately under\n  a proprietary license so it can't be embedded in an Open Source\n  project directly. You have to download a personal evaluation copy\n  and to your project:\n\n#+BEGIN_SRC bash\n$ mkdir -p resources/public/scripts\n$ curl https://gojs.net/latest/release/go.js -o resources/public/scripts/go.js\n#+END_SRC\n\n  It is also recommended that you list ~resources/public/scripts/go.js~\n  out of your SCM (i.e. GitHub) to avoid legal issues.\n\n#+BEGIN_QUOTE\nIf you have suggestions of more Open Source-friendly libraries with\nequivalent features please DM me at [[https://twitter.com/tiagoluchini][@tiagoluchini]]\n#+END_QUOTE\n\n  Create a ~cljs~ main file that will bootstrap your visualizer\n  app. For instance, if you want to call it ~hello.core~, add the file\n  ~core.cljs~ to ~src/hello~:\n\n#+BEGIN_SRC clojure\n  (ns hello.core\n    (:require [hodur-engine.core :as engine]\n              [hodur-visualizer-schema.core :as visualizer]))\n\n  (def meta-db (engine/init-schema\n                '[Person\n                  [^String first-name\n                   ^String last-name\n                   ^Gender gender]\n\n                  ^:enum\n                  Gender\n                  [MALE FEMALE IRRELEVANT]]))\n\n  (-\u003e meta-db\n      visualizer/schema\n      visualizer/apply-diagram!)\n#+END_SRC\n\n  We are creating a simple Hodur model with an Entity called ~Person~\n  and an enum called ~Gender~ and putting it in a meta database on\n  ~meta-db~.\n\n  Before explaining the last function calls on this document, let's\n  fire up a [[https://figwheel.org/][figwheel]] environment with the following helper main (where\n  ~hello.core~ is the name of the main ~cljs~ namespace you created\n  above:\n\n#+BEGIN_SRC bash\n$ clojure -m hodur-visualizer-schema.main hello.core\n#+END_SRC\n\n  Figwheel will bootstrap a browser-connected repl and launch a\n  browser pointing to ~localhost:9500~ after while. You should see\n  something like this:\n\n  [[./docs/diagram.png]]\n\n  Feel free to interact with the diagram. You can drag entities\n  around, collapse them and there's a handy tooltip when you hover\n  over entities and fields.\n\n  Hot-reload is also enabled, if you change your model on ~hello.core~\n  you should see the changes reflected on your browser immediately.\n\n  As for the last two functions of the ~hello.core~ we are using the\n  meta-database on ~meta-db~ to get a visualizer-parsed version of the\n  schema (through the function ~visualizer/schema~) and, at last, we\n  call visualizer's side-effect function ~visualizer/apply-diagram!~\n  that updates the diagram on your browser.\n\n* Model Definition\n\n  All Hodur plugins follow the [[https://github.com/luchiniatwork/hodur-engine#model-definition][Model Definition]] as described on Hodur\n  [[https://github.com/luchiniatwork/hodur-engine#model-definition][Engine's documentation]].\n\n* Bugs\n\n  If you find a bug, submit a [[https://github.com/luchiniatwork/hodur-visualizer-schema/issues][GitHub issue]].\n\n* Help!\n\n  This project is looking for team members who can help this project\n  succeed! If you are interested in becoming a team member please open\n  an issue.\n\n* License\n\n  Copyright © 2018 Tiago Luchini\n\n  Distributed under the MIT License (see [[./LICENSE][LICENSE]]).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhodur-org%2Fhodur-visualizer-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhodur-org%2Fhodur-visualizer-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhodur-org%2Fhodur-visualizer-schema/lists"}