go-table-graph
is a web application written in Go that allows you to visualize database table relationships as an Entity-Relationship (ER) diagram. It connects to local PostgreSQL databases, extracts table structures, and renders the ER diagram using the vis-network JavaScript library for interactive visualization.
-
Go: Ensure that you have Go installed on your system. You can download it from go.dev.
-
PostgreSQL Database: You need access to a local PostgreSQL database to connect to and extract table relationships.
git clone https://github.com/gehrkev/go-table-graph.git
cd go-table-graph
-
Build the executable:
go build -o go-table-graph
-
Run the application:
./go-table-graph
-
Open your web browser and go to
http://localhost:8080
to access the application.
- Enter your PostgreSQL database username, password and database name in the input fields.
- Click on Generate ER Diagram to fetch and visualize the database schema.
- gin: Gin is a HTTP web framework written in Go (Golang).
- pq: Pure Go Postgres driver for database/sql.
- vis-network: 💫 Display dynamic, automatically organised, customizable network views.