Prisma Entity Relationship Diagram Generator

prisma-erd-generator is a Prisma generator that creates an Entity Relationship Diagram (ERD) automatically every time you run prisma generate.

It visualizes your Prisma schema, helping you understand relationships between your models, identify schema design issues, and document your database structure effortlessly.

Example ER Diagram

Key Features

  • Automatic Generation: Updates your ERD whenever you change your schema.
  • Multiple Formats: Supports SVG, PNG, PDF, and Markdown.
  • Customizable: Choose themes (forest, dark, neutral) or provide your own Mermaid configuration.
  • Filtering: Ignore specific tables, enums, or views to focus on what matters.
  • Pattern Matching: ExCXlude tables based on wildcards (e.g., sys_*).
  • Offline Capable: Works locally within your CI/CD pipeline or Docker builds.