react-interactive-erd
v1.0.6
Published
Library to render an entity relationship diagram for a generic database structure. Copied from Jack Swiggett's [rails_interactive_erd](https://github.com/jackswiggett/rails_interactive_erd/tree/main/react) library
Downloads
24
Readme
React Interactive ERD
Library to render an entity relationship diagram for a generic database structure. Copied from Jack Swiggett's rails_interactive_erd library
Installation
Install the package:
yarn add react-interactive-erd
Add D3 Graphviz to the head of your app: TODO: Figure out if this is necessary
<head>
<script src="https://d3js.org/d3.v5.min.js"></script>
<script
src="https://unpkg.com/@hpcc-js/[email protected]/dist/index.min.js"
type="javascript/worker"
></script>
<script src="https://unpkg.com/[email protected]/build/d3-graphviz.js"></script>
</head>
Generate a schema for your database:
- For rails applications just use rails_interactive_erd
- For prisma applications use a generator (coming soon)