Visualize your Prisma database schemas as beautiful, interactive diagrams
Visma is a free, open-source web-based tool that transforms your Prisma schema code into visual database diagrams. Write your Prisma schema on the left, and watch it come to life as an interactive diagram on the right. Perfect for understanding database relationships, sharing schemas with your team, or learning Prisma. Create ER diagrams, visualize database schemas, and generate database documentation effortlessly.
Visma is a powerful Prisma schema visualizer and database diagram generator that helps developers understand and visualize their database structures. Have you ever looked at a Prisma schema file and wished you could see how all your database tables connect? Visma does exactly that! It's like having a visual map of your database structure.
Keywords: Prisma visualizer, database diagram tool, ER diagram generator, schema visualization, Prisma schema viewer, database relationship mapper, free diagram tool, online database designer, Prisma ORM visualizer, database schema generator
For Developers:
- Quickly understand complex database relationships
- Share visual schemas with your team
- Validate Prisma schemas in real-time
- Export diagrams for documentation
For Everyone:
- No database knowledge required to understand the visual diagrams
- See how data connects in an intuitive way
- Great for learning how databases work
- 📝 Live Code Editor - Write and edit Prisma schemas with syntax highlighting powered by Monaco Editor (VS Code engine)
- 🎨 Interactive Diagrams - Beautiful, draggable node-based visualizations with React Flow
- 🔗 Relationship Mapping - See how your models connect with labeled relationships (one-to-one, one-to-many, many-to-many)
- 📊 Automatic Layout - Smart positioning of models and enums using Dagre graph layout algorithm
- 🔄 Real-time Updates - Click "Convert to Diagram" to see your changes instantly
- 📏 Resizable Panels - Drag the divider to adjust editor and diagram sizes for optimal workflow
- ✅ Schema Validation - Get instant feedback on your Prisma schema syntax errors
- 🎯 Hover Highlights - Hover over nodes to see their connections light up for better understanding
- 🆓 100% Free - No signup required, no credit card needed, completely open-source
- 🌐 Browser-Based - Works entirely in your browser, no installation required
- 📱 Responsive Design - Works on desktop and tablet devices
-
Clone the repository
git clone https://github.com/hellofaizan/visma.git cd visma -
Install dependencies
npm install # or yarn install # or pnpm install
-
Start the development server
npm run dev # or yarn dev -
Open your browser Navigate to http://localhost:3000
That's it! You should see Visma running with a sample Prisma schema already loaded.
-
Edit the Schema - The left panel contains a code editor with a sample Prisma schema. You can edit it directly.
-
Convert to Diagram - Click the "Convert to Diagram" button at the bottom of the editor panel.
-
Explore the Diagram - The right panel shows your database structure:
- Model Nodes (white boxes) represent your database tables
- Enum Nodes (green boxes) show your enum types
- Lines connect related models and show relationship types (1-to-1, 1-to-many, etc.)
-
Interact - You can:
- Drag nodes around to rearrange them
- Hover over nodes to highlight their connections
- Resize panels by dragging the divider between editor and diagram
-
Fix Errors - If your schema has errors, they'll be highlighted in the editor with helpful messages.
Visma is built with modern web technologies:
- Next.js 16 - React framework for the web
- React 19 - UI library
- TypeScript - Type-safe JavaScript
- Monaco Editor - The editor that powers VS Code
- React Flow - Interactive node-based diagrams
- Dagre - Automatic graph layout
- Prisma Internals - Prisma schema parsing
- Zustand - Lightweight state management
- Tailwind CSS - Utility-first CSS
visma/
├── src/
│ ├── app/ # Next.js app router pages
│ │ ├── api/ # API routes (Prisma parsing)
│ │ └── page.tsx # Main page with resizable layout
│ ├── components/ # React components
│ │ ├── EditorPanel.tsx # Monaco editor component
│ │ ├── DIagramPanel.tsx # React Flow diagram component
│ │ ├── nodes/ # Custom node components
│ │ └── layout/ # Graph layout utilities
│ ├── lib/ # Utility functions
│ │ └── prismalang.ts # Prisma syntax highlighting
│ └── store/ # State management
│ └── schema.ts # Zustand store
├── public/ # Static assets
└── package.json # Dependencies and scripts
Here's a sample Prisma schema you can try to visualize database relationships:
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
profile Profile?
}
model Post {
id Int @id @default(autoincrement())
title String
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id])
authorId Int
}
model Profile {
id Int @id @default(autoincrement())
bio String?
user User @relation(fields: [userId], references: [id])
userId Int @unique
}npm run build
npm startThe easiest way to deploy Visma is using Vercel:
- Push your code to GitHub
- Import your repository on Vercel
- Vercel will automatically detect Next.js and deploy
Or use the Vercel CLI:
npm i -g vercel
vercelContributions are welcome! Whether it's:
- 🐛 Bug reports
- 💡 Feature suggestions
- 📝 Documentation improvements
- 🔧 Code contributions
Please feel free to open an issue or submit a pull request.
This project is open source. Check the repository for license details.
Search Terms: Prisma visualizer, database diagram tool, ER diagram generator, schema visualization, Prisma schema viewer, database relationship mapper, free diagram tool, online database designer, Prisma ORM visualizer, database schema generator, Prisma ERD, Prisma schema diagram, visualize Prisma schema, database visualization tool, entity relationship diagram, database design tool, Prisma model visualizer, database structure viewer, schema diagram generator, Prisma database diagram
Use Cases:
- Visualize Prisma schemas for documentation
- Understand complex database relationships
- Generate ER diagrams from Prisma schema files
- Share database structures with team members
- Learn Prisma ORM and database design
- Create database documentation automatically
- Validate Prisma schema syntax
- Design database schemas visually
- Built with Prisma - The modern database toolkit
- Inspired by the need for better schema visualization tools
- Thanks to all the amazing open-source libraries that make this possible
- 🐛 Found a bug? Open an issue
- 💬 Have a question? Start a discussion
- ⭐ Like this project? Give it a star!
Made with ❤️ by Mohammad Faizan Sponsor 💲 Github Sponsor
