entviz is an ent extension that provides visualization of the schema graph

Overview

entviz

entviz is an ent extension that creates visual graph (html file) of your ent's schema.

install

go get github.com/hedwigz/entviz

add this extension to ent (see example code) run

go generate ./ent

your html will be saved at ent/schema-viz.html

serve via http

You can use the helper function ent.ServeEntviz to easily serve the static html page over http

http.ListenAndServe("localhost:3002", ent.ServeEntviz())

Use from command line

Install the cmd

go get github.com/hedwigz/entviz/cmd/entviz

Then run inside your project:

entviz ./etc/schema

example

image (3)

Comments
  • Colors of some of the nodes make them impossible to view

    Colors of some of the nodes make them impossible to view

    Two examples that were output to me:

    Screen Shot 2021-10-24 at 7 53 22 Screen Shot 2021-10-24 at 7 53 53

    It would be great if all nodes will be printed with only "light" colors (and also with no gray colors) This change would make it possible to read the nodes names

    bug 
    opened by naormatania 2
  • "internal error" on go1.18 due to out of date transitive x/tools dependency

    When trying today to use /cmd/entviz for the first time, I ran into the following error:

    $ entviz ./ent/schema
    2022/06/11 16:01:21 internal error: package "context" without types was imported from "entgo.io/ent"
    

    Digging further, it appears that this is an issue caused by an outdated version of golang.org/x/tools which lacks support for go1.18. This dependency is present in entgo.io/ent versions < v0.10.0, but later versions upgrade this dependency and fix the issue. (See discussion here: https://github.com/ent/ent/issues/2155).

    Running the following two commands in a local clone of this repository before re-installing the package fixed the issue.

    go get entgo.io/[email protected]
    go mod tidy
    

    I'm not sure if upgrading ent has the potential to break backwards compatibility, but if not I can open a PR to merge these changes.

    opened by willbicks 1
  • Black background makes edge labels unreadable

    Black background makes edge labels unreadable

    This is an issue similar to #8 with edge labels on the black background being basically unreadable, while they are just fine on a white background:

    Screenshot 2022-03-22 at 09 19 34 Screenshot 2022-03-22 at 09 19 56

    opened by fgm 1
  • can entviz export models to pygraphviz show?

    can entviz export models to pygraphviz show?

    The drawing effect of entviz is not good,the objects will be crowded and stacked in a row, I hope to export the models to pygraphviz for visualization

    opened by fourquadrantlogger 1
  • Move generation of schema-viz.html after ent codegen.

    Move generation of schema-viz.html after ent codegen.

    If one would add the entviz extension in an ent project where the codegen has not been run yet the generator will throw open ent/schema-viz.html: no such file or directory because the ent direcotry does not exist yet. By letting ent-codegen run first and only afterwards the entviz extension this no longer happens.

    opened by masseelch 1
  • deps: Update entviz and transitive dependencies

    deps: Update entviz and transitive dependencies

    This PR updates the version of ent used, and fixes an issue when trying to use entviz on go >= 1.18 (see #13). In addition, the examples are regenerated to stay up to date with minor changes made in ent's code generation.

    Fixes #13

    opened by willbicks 0
  • overlapping nodes and edges for more complex relations

    overlapping nodes and edges for more complex relations

    Hi,

    the default settings of vis.js used by entviz produces overlapping edges and nodes for more complex relations:

    Screen Shot 2022-08-20 at 10 38 30

    (I censored the names because this is from work).

    I tried to play around with the physics settings inside the HTML produced by entviz but did not find a solution.

    opened by bodokaiser 0
  • command not found: entviz

    command not found: entviz

    Follow the doc, but it did not work.

    Until I changed the command to go install github.com/hedwigz/entviz/cmd/entviz, then it works wonderfully

    What am I missing here? thanks

    opened by Albert-Gao 0
Owner
Amit Shani
Amit Shani
Callgraph analysis and visualization for Go

Gocyto A Go SSA callgraph builder and visualizer, by @protolambda. Features: output to generic Cytoscape JSON format. (list of nodes, list of edges) o

Diederik Loerakker 137 Nov 3, 2022
gosivy - Another visualization tool for Go process metrics

gosivy Another visualization tool for Go process metrics. Gosivy tracks Go process's metrics and plot their evolution over time right into your termin

Ryo Nakao 449 Nov 27, 2022
🚀Statsview is a real-time Golang runtime stats visualization profiler

Statsview is a real-time Golang runtime stats visualization profiler. It is built top on another open-source project, go-echarts, which helps statsview to show its graphs on the browser.

go-echarts 505 Dec 5, 2022
Interactive Terraform visualization. State and configuration explorer.

Rover - Terraform Visualizer Rover is a Terraform visualizer. In order to do this, Rover: generates a plan file and parses the configuration in the ro

Tu Nguyen 2.3k Dec 4, 2022
Sloop - Kubernetes History Visualization

Sloop - Kubernetes History Visualization Sloop monitors Kubernetes, recording histories of events and resource state changes and providing visualizati

Salesforce 1.2k Nov 30, 2022
Data visualization with chart, Create CSV file, Read Write CSV file

Data visualization with chart, Create CSV file, Read Write CSV file, Read from json file and many more in single project ......

MD FAISAL PORAG 1 Jan 13, 2022
yml2dot - Turn YAML into beautiful Graph

yml2dot - Turn YAML into beautiful Graph Use Cases Visualize your YAML files as Graph Generate additional info from your source code

Luca Sepe 107 Nov 21, 2022
Slice graph uses graphviz in order to pretty print slices for you.

slicegraph Slice graph uses graphviz in order to make you understand what happens underneath your slices.

Jędrzej 33 Sep 22, 2022
Graph a histogram from a stream of timestamps 📈📊

Histogram Timestamps You ever find yourself working with a dataset and you want to graph a particular aspect of that data over time, but because you'r

Leland Batey 2 Dec 4, 2021
Tool to visualize the graph of embedded structs in Go projects

Visualize a hierarchy of embedded Go structs This tool scans a directory of Go source code files to create a visualization of struct embedding in the

David Schlachter 215 Nov 27, 2022
Gfx - Golang file system extension library

gfx Golang文件操作扩展库,包含工作和生活中关于文件操作的各种有用的使用方法,包括 更友好的API 文件创建 文件删除 文件复制 一切皆可配置 文件名

张川 0 Mar 10, 2022
HSM package provides a simple state chart library written in Go.

UML HSM HSM package provides a simple state chart library written in Go. Supported UML State Chart Features Feature Implemented Test case Simple state

Chris Castro 1 Apr 14, 2022
A CLI for generating ER diagrams for Ent schema

enter A CLI for generating ER (entity-relationship) diagrams for Ent schema using mermaid.js.

Ariel Mashraki 101 Nov 1, 2022
sql 语句转成 ent schema

sql2ent 该项目提供 sql 语句转化为 entgo schema 代码的命令行工具, 以提高工作效率。 前往学习entgo 功能 已完成 使用命令行批量转化 支持 mysql 计划 支持更多的数据库,例如:MariaDB、SQLite、PostgreSQL。 读取数据库,批量生成 schem

null 20 Nov 22, 2022
A tool to compare if terraform provider migration schema snapshot is equal to schema defined in resource code

migration schema comparer for Terraform When develop Terraform provider sometimes we need do some state migration(not schema migration) via StateUpgra

null 0 Nov 18, 2021
Schema - JSON Schema rules plugin

This plugin allows to configure JSON Schema validations rules ensuring user-submitted records adhere to a pre-defined data schema.

null 2 Feb 16, 2022
A Go dependency graph visualization tool

godepgraph godepgraph is a program for generating a dependency graph of Go packages. Install go get github.com/kisielk/godepgraph Use For basic usage

Kamil Kisiel 797 Dec 3, 2022
Interactive dependency graph visualization tool for golang

Interactive dependency graph visualization tool for golang using the awesome cytoscape graph visualizer.

Armin Becher 6 Sep 1, 2022
JSONL graph tools - Graph is represented as JSONL of nodes and edges.

JSONL graph tools - Graph is represented as JSONL of nodes and edges.

Nikolay Dubina 61 Sep 27, 2022
The DGL Operator makes it easy to run Deep Graph Library (DGL) graph neural network training on Kubernetes

DGL Operator The DGL Operator makes it easy to run Deep Graph Library (DGL) graph neural network distributed or non-distributed training on Kubernetes

Qihoo 360 43 Nov 2, 2022