Visual Data Modeling for Modern Teams
Design conceptual and physical database models with an intuitive canvas-based interface.
Open source. No account required. Your data stays local.
π Try it now at sqlmodel.org β
SQLModel is a free, open-source data modeling tool that helps you design database schemas visually. Whether you’re architecting a new application, documenting an existing database, or collaborating with your team on data design, SQLModel provides an intuitive canvas for bringing your ideas to life. Try it at sqlmodel.org.
| Feature | Benefit |
|---|---|
| Dual-Layer Modeling | Design at the conceptual level (entities & relationships) then refine to physical tables with columns, types, and foreign keys |
| AI-Powered Generation | Describe your system in plain English and let AI generate complete data models β understands OLTP vs Analytics/Star Schema patterns |
| Privacy-First | Everything runs in your browser. No servers, no accounts, no data collection. Your models are yours. |
| Export Ready | Generate SQL DDL scripts for PostgreSQL, MySQL, and more. Export diagrams as images. |
| Modern UX | Built with React Flow for smooth pan, zoom, and drag interactions. Dark/light mode. Keyboard shortcuts. |
Visit sqlmodel.org to start modeling immediately β no installation required.
# Clone the repository
git clone https://github.com/yourusername/sqlmodel.git
cd sqlmodel
# Install dependencies
npm install
# Start development server
npm run dev
Open http://localhost:5173 in your browser.
npm run build
npm run preview
- Click + Entity or right-click the canvas to add entities
- Double-click an entity to edit its name and description
- Drag from entity edges to create relationships
- Use the arrow buttons on entity sides to quickly create linked entities
- Connect entities by dragging from one to another
- Set cardinality (1, 0..1, 1.., 0..) in the right panel
- Double-click relationship lines to add labels
- Switch to Physical View using the toggle in the navbar
- Use AI β Generate Tables to auto-create tables from your conceptual model
- Or manually add tables with columns, primary keys, and data types
- In Physical View, drag from a column to another table’s column
- Configure cardinality and relationship type in the inspector
- Save JSON: Export your complete model for backup or sharing
- Export SQL: Generate CREATE TABLE statements
- Export Image: Save your diagram as PNG
Click the AI button (β¨) to:
- Generate New Model: Describe your system and AI creates entities, relationships, and tables
- Enhance Model: Add features to an existing model
- Smart Detection: AI recognizes if you need OLTP (normalized) or Analytics (star schema) patterns
- React 18 + TypeScript β Type-safe UI components
- React Flow β Canvas rendering, pan/zoom, node connections
- Zustand β Lightweight state management with persistence
- Vite β Fast development and optimized builds
- Zod β Runtime schema validation
src/
βββ components/
β βββ Canvas.tsx # Main diagram canvas
β βββ nodes/ # Entity, Table, Group node components
β βββ layout/ # Navbar, Sidebar, Right Panel
β βββ ui/ # Dialogs, menus, shared components
βββ model/
β βββ schemas.ts # Zod schemas for all data types
βββ services/
β βββ aiService.ts # AI integration for model generation
βββ store/
βββ useModelStore.ts # Zustand state management
Contributions are welcome! Please feel free to submit issues and pull requests.
# Run linting
npm run lint
# Type check
npx tsc --noEmit
MIT License β free for personal and commercial use.
Built with β€οΈ for data architects, developers, and anyone who thinks in tables.
sqlmodel.org
