Skip to content

hellofaizaaan/visma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visma - Prisma Schema Visualizer | Free Online Database Diagram Tool

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 Preview - Prisma Schema Visualizer showing interactive database diagram with models, relationships, and enums

✨ What is Visma?

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

🚀 Features

  • 📝 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

🎯 Quick Start

Installation

  1. Clone the repository

    git clone https://github.com/hellofaizan/visma.git
    cd visma
  2. Install dependencies

    npm install
    # or
    yarn install
    # or
    pnpm install
  3. Start the development server

    npm run dev
    # or
    yarn dev
  4. Open your browser Navigate to http://localhost:3000

That's it! You should see Visma running with a sample Prisma schema already loaded.

📖 How to Use

  1. Edit the Schema - The left panel contains a code editor with a sample Prisma schema. You can edit it directly.

  2. Convert to Diagram - Click the "Convert to Diagram" button at the bottom of the editor panel.

  3. 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.)
  4. 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
  5. Fix Errors - If your schema has errors, they'll be highlighted in the editor with helpful messages.

🛠️ Tech Stack

Visma is built with modern web technologies:

📁 Project Structure

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

🎨 Example Prisma Schema

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
}

🚢 Deployment

Build for Production

npm run build
npm start

Deploy to Vercel

The easiest way to deploy Visma is using Vercel:

  1. Push your code to GitHub
  2. Import your repository on Vercel
  3. Vercel will automatically detect Next.js and deploy

Or use the Vercel CLI:

npm i -g vercel
vercel

🤝 Contributing

Contributions 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.

📄 License

This project is open source. Check the repository for license details.

🔍 SEO & Discoverability

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

🙏 Acknowledgments

  • 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

📞 Support


Made with ❤️ by Mohammad Faizan Sponsor 💲 Github Sponsor

Releases

No releases published

Packages

 
 
 

Contributors