Design database schemas visually, create relationships, and generate production-ready SQL for PostgreSQL, MySQL, and SQLite.
Live Demo β’ Features β’ Installation β’ Documentation β’ Contact
- Intuitive Canvas - Drag, drop, and arrange tables on an infinite canvas with smooth pan and zoom
- Beautiful Table Cards - Color-coded tables with expandable columns and relationship indicators
- Smart Layouts - Auto-arrange tables with intelligent layout algorithms
- Visual Connections - Create relationships by drawing lines between tables
- Multiple Types - Support for 1:1, 1:N, and N:M relationships
- Referential Actions - Configure CASCADE, SET NULL, RESTRICT, and more
- PostgreSQL - Full support including JSONB, arrays, and advanced types
- MySQL - Complete MySQL syntax with engine and charset options
- SQLite - Lightweight SQLite schema generation
| Feature | Description |
|---|---|
| π¦ Table Templates | 18+ pre-built templates (Users, Products, Orders, Posts, etc.) |
| π― Drag & Drop | Reorder columns with smooth drag-and-drop |
| πΎ Import/Export | JSON import/export for schema portability |
| π TypeScript Types | Auto-generate TypeScript interfaces from schema |
| π Real-time Preview | Live SQL preview as you design |
| βͺ Undo/Redo | Full history support with keyboard shortcuts |
| π Dark Mode | Beautiful dark theme by default |
| β¨οΈ Keyboard Shortcuts | Power-user friendly with comprehensive shortcuts |
|
π Auth & Users
π E-Commerce
|
π Content
π₯ Social
|
π° Finance
βοΈ General
|
# Clone the repository
git clone https://github.com/Mavdii/visual-db.git
# Navigate to project directory
cd visual-db
# Install dependencies
npm install
# or
bun install
# Start development server
npm run dev
# or
bun devOpen http://localhost:5173 in your browser.
- Click "Add Table" in the left panel or on the canvas
- Choose from 18+ templates or start from scratch
- Configure columns with data types and constraints
- Drag and drop to reorder columns
- Click "Create Table" to add to canvas
- Click on a table's foreign key column
- Drag to the target table's primary key
- Configure relationship type (1:1, 1:N, N:M)
- Set referential actions (CASCADE, SET NULL, etc.)
- Open the SQL tab in the right panel
- Select your target dialect (PostgreSQL, MySQL, SQLite)
- Copy or download the generated DDL
|
React 18 |
TypeScript |
Vite |
Tailwind CSS |
|
Zustand |
React Flow |
shadcn/ui |
Framer Motion |
| Shortcut | Action |
|---|---|
Ctrl/Cmd + Z |
Undo |
Ctrl/Cmd + Shift + Z |
Redo |
Ctrl/Cmd + S |
Save schema |
Delete |
Delete selected item |
Escape |
Deselect all |
Ctrl/Cmd + A |
Select all tables |
+ / - |
Zoom in/out |
0 |
Fit to view |
Numeric Types
INTEGER- Standard integerBIGINT- Large integerSMALLINT- Small integerSERIAL- Auto-incrementing integerDECIMAL/NUMERIC- Exact decimalREAL/FLOAT/DOUBLE- Floating point
Text Types
VARCHAR(n)- Variable-length stringCHAR(n)- Fixed-length stringTEXT- Unlimited textUUID- Universally unique identifier
Date & Time Types
DATE- Calendar dateTIME- Time of dayTIMESTAMP- Date and timeTIMESTAMPTZ- Timestamp with timezone
Other Types
BOOLEAN- True/falseJSON/JSONB- JSON dataARRAY- Array of valuesBYTEA/BLOB- Binary dataENUM- Enumerated values
- Visual schema designer
- Multi-dialect SQL generation
- Relationship management
- Table templates
- Drag & drop column reordering
- Query builder interface
- Database reverse engineering
- Team collaboration
- Cloud sync & sharing
- AI-powered schema suggestions
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by Umar



