All Projects → hodur-org → hodur-visualizer-schema

hodur-org / hodur-visualizer-schema

Licence: MIT license
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.

Programming Languages

javascript
184084 projects - #8 most used programming language
clojure
4091 projects
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to hodur-visualizer-schema

Hodur Engine
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.
Stars: ✭ 208 (+1200%)
Mutual labels:  schema, modeling
hodur-lacinia-schema
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.
Stars: ✭ 20 (+25%)
Mutual labels:  schema, modeling
t8code
Parallel algorithms and data structures for tree-based AMR with arbitrary element shapes.
Stars: ✭ 37 (+131.25%)
Mutual labels:  modeling
splitr
Use the HYSPLIT model from inside R and do more with it
Stars: ✭ 115 (+618.75%)
Mutual labels:  modeling
VBA-toolbox
The VBA toolbox
Stars: ✭ 103 (+543.75%)
Mutual labels:  modeling
go2gql
graphql-go schema generator by proto files
Stars: ✭ 33 (+106.25%)
Mutual labels:  schema
exodus
Migration tools for Tabular Data to Oracle JSON/Tabular Data
Stars: ✭ 19 (+18.75%)
Mutual labels:  schema
metastore
A protobuf schema registry on steroids. It will keep track of the contracts throughout your organization, making sure no contract is broken.
Stars: ✭ 43 (+168.75%)
Mutual labels:  schema
joyce
Joyce is a highly scalable event-driven Cloud Native Data Hub.
Stars: ✭ 37 (+131.25%)
Mutual labels:  schema
garn-validator
Create validations with ease
Stars: ✭ 42 (+162.5%)
Mutual labels:  schema
AMO-Tools-Suite
AMO-Tools-Suite is an energy efficiency calculation library in C++ with optional Nan Node add-on bindings for the Department of Energy Advanced Manufacturing Office (DOE AMO) Desktop, also known as MEASUR.
Stars: ✭ 16 (+0%)
Mutual labels:  modeling
dbmisc
Tools for working with databases in R
Stars: ✭ 24 (+50%)
Mutual labels:  schema
pysonDB
A Simple , ☁️ Lightweight , 💪 Efficent JSON based database for 🐍 Python. PysonDB-V2 has been released ⬇️
Stars: ✭ 293 (+1731.25%)
Mutual labels:  schema
typeforce
Another biased type checking solution for Javascript
Stars: ✭ 22 (+37.5%)
Mutual labels:  schema
graphql-compose-dataloader
Add DataLoader to graphql-composer resolvers.
Stars: ✭ 18 (+12.5%)
Mutual labels:  schema
xml-core
xml-core is a set of classes that make it easier to work with XML within the browser and node.
Stars: ✭ 18 (+12.5%)
Mutual labels:  schema
schema-voyager
Visualize Datomic schema
Stars: ✭ 15 (-6.25%)
Mutual labels:  schema
modeling-website
Landing page for project sites
Stars: ✭ 16 (+0%)
Mutual labels:  modeling
ordered
Entropy-controlled contexts in Python
Stars: ✭ 36 (+125%)
Mutual labels:  modeling
schemify
Automatically generate Schema.org JSON-LD markup for WordPress content.
Stars: ✭ 58 (+262.5%)
Mutual labels:  schema

Hodur Visualizer Schema

https://img.shields.io/clojars/v/hodur/engine.svg https://img.shields.io/clojars/v/hodur/visualizer-schema.svg https://img.shields.io/badge/License-MIT-blue.svg https://img.shields.io/badge/project%20status-experimental-brightgreen.svg

./docs/logo-tag-line.png

Hodur is a descriptive domain modeling approach and related collection of libraries for 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 making your apps respond to the defined model or use one of the many plugins to help you achieve mechanical, repetitive results faster and in a purely functional manner.

This Hodur plugin provides the ability to visualize your Hodur model on a dynamically, hot-reloaded web page.

Motivation

For a deeper insight into the motivations behind Hodur, check the motivation doc.

Getting Started

Hodur has a highly modular architecture. Hodur Engine is always required as it provides the meta-database functions and APIs consumed by plugins.

Therefore, refer the Hodur Engine’s Getting Started first and then return here for Lacinia-specific setup.

After having set up hodur-engine as described above, we also need to add hodur/visualizer-schema, a plugin that creates and shows Hodur models on a web browser to the deps.edn file:

{:deps {hodur/engine            {:mvn/version "0.1.2"}
        hodur/visualizer-schema {:mvn/version "0.1.1"}}}

While you are at your deps.edn file also make sure you have both ~”src”~ and ~”resources”~ to your :paths:

{:paths ["src" "resources"]}

Visualizer utilizes a JavaScript library called GoJS for the rendering and interactive bits. This library is unfortunately under a proprietary license so it can’t be embedded in an Open Source project directly. You have to download a personal evaluation copy and to your project:

$ mkdir -p resources/public/scripts
$ curl https://gojs.net/latest/release/go.js -o resources/public/scripts/go.js

It is also recommended that you list resources/public/scripts/go.js out of your SCM (i.e. GitHub) to avoid legal issues.

If you have suggestions of more Open Source-friendly libraries with equivalent features please DM me at @tiagoluchini

Create a cljs main file that will bootstrap your visualizer app. For instance, if you want to call it hello.core, add the file core.cljs to src/hello:

(ns hello.core
  (:require [hodur-engine.core :as engine]
            [hodur-visualizer-schema.core :as visualizer]))

(def meta-db (engine/init-schema
              '[Person
                [^String first-name
                 ^String last-name
                 ^Gender gender]

                ^:enum
                Gender
                [MALE FEMALE IRRELEVANT]]))

(-> meta-db
    visualizer/schema
    visualizer/apply-diagram!)

We are creating a simple Hodur model with an Entity called Person and an enum called Gender and putting it in a meta database on meta-db.

Before explaining the last function calls on this document, let’s fire up a figwheel environment with the following helper main (where hello.core is the name of the main cljs namespace you created above:

$ clojure -m hodur-visualizer-schema.main hello.core

Figwheel will bootstrap a browser-connected repl and launch a browser pointing to localhost:9500 after while. You should see something like this:

./docs/diagram.png

Feel free to interact with the diagram. You can drag entities around, collapse them and there’s a handy tooltip when you hover over entities and fields.

Hot-reload is also enabled, if you change your model on hello.core you should see the changes reflected on your browser immediately.

As for the last two functions of the hello.core we are using the meta-database on meta-db to get a visualizer-parsed version of the schema (through the function visualizer/schema) and, at last, we call visualizer’s side-effect function visualizer/apply-diagram! that updates the diagram on your browser.

Model Definition

All Hodur plugins follow the Model Definition as described on Hodur Engine’s documentation.

Bugs

If you find a bug, submit a GitHub issue.

Help!

This project is looking for team members who can help this project succeed! If you are interested in becoming a team member please open an issue.

License

Copyright © 2018 Tiago Luchini

Distributed under the MIT License (see LICENSE).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].