prisma-erd-generator
prisma-erd-generator copied to clipboard
Make ERD diagram more user friendly
Right now the diagrams are looking good. Nevertheless, I think they would be easier to understand with the following changes:

What do you think? I can try to make a PR for that if you like it
I would agree that’s easier to read. It could potentially save some space as well. Yeah make a PR and I’ll review
I was checking mermaid and there are not too many possibilities for customizing.
But we can achieve that with graphviz and handlebars.
The logic may change but the end result will be the same.
Here is a list of pros and cons of doing so:
- We can customize the diagram using HTML and CSS preserving .svg as the output
- At a later stage we can allow importing custom templates. That gives the user the possibility to style the diagram as they wish.
- It would not be 100% UML conform. The relationships need to be done as it is done in dbml diagrams (1,N on top of the lines next to the attributes). That is a pro for me as they are easier to read as UMLs.
- It is not an out-of-the-box solution as a mermaid for ERD diagrams.
- The default
mermaidstyles will not be there anymore (but they are not so nice anyway 😅)
What do you think? Would you be ok to switch the render engine?
I'm open to it. Especially if someone has an interest in sending a PR my way. There is a discussion about moving to something other than mermaid already #102
I did the best I could with mermaid's limitations. I couldn't put the key next to the string attribute or the type for some reason. What I did was combined the last column to show ❓ for nullable and 🗝️ for PK's
@cjoecker We should keep the conversation going for dbml/graphviz alternatives. I can easily tack on a branch for a variant of this repository.