Skip to main content

Overview

ChartDB provides over 40 pre-built database templates based on real-world applications, popular frameworks, and common use cases. These templates are fully functional, editable diagrams that serve as starting points for your projects.
All templates are based on actual open-source projects and production database schemas. They represent battle-tested database designs used by thousands of applications.

Template Categories

Templates are organized into several categories based on their purpose and origin.

Framework Authentication & Authorization

Database schemas from popular framework authentication systems:

Laravel

Laravel AuthenticationLaravel’s default authentication system with users, password resets, and sessions.Tags: PHP, Laravel, MySQL

Laravel Permission

Spatie Laravel PermissionRole-based access control (RBAC) system with roles, permissions, and model permissions.Tags: PHP, Laravel, MySQL

Django

Django AuthenticationDjango’s built-in authentication system with users, groups, and permissions.Tags: Python, Django, PostgreSQL

Devise

Devise (Rails)Flexible authentication solution for Rails with multiple authentication strategies.Tags: Ruby, Rails, PostgreSQL

Additional Framework Templates:

  • Adonis ACL - Access control for Adonis.js
  • Bouncer - Elegant authorization library for Laravel
  • Doorkeeper - OAuth 2 provider for Rails
  • Django Axes - Keep track of failed login attempts

Content Management Systems

Full-featured CMS database schemas:

WordPress

WordPress DatabaseComplete WordPress schema with posts, comments, users, taxonomy, and meta tables.Tables: 12 tables including wp_posts, wp_users, wp_termsTags: PHP, MySQL, CMS

Flarum

Flarum ForumModern forum software schema with discussions, posts, users, and tags.Tags: PHP, Forum, MySQL

BookStack

BookStackDocumentation platform with books, chapters, pages, and permissions.Tags: PHP, Documentation, MySQL

Canvas

Canvas BlogMinimal publishing platform for Laravel with posts, tags, and views.Tags: PHP, Laravel, Blog

Business Applications

Production-ready business application schemas:

Akaunting

Akaunting AccountingFree accounting software schema with invoices, bills, transactions, and reports.Features: Double-entry accounting, multi-currencyTags: PHP, Accounting, MySQL

Snipe-IT

Snipe-IT Asset ManagementIT asset management system with assets, licenses, consumables, and maintenance.Tags: PHP, Asset Management, MySQL

Attendize

Attendize TicketingEvent ticketing and management platform with events, tickets, and orders.Tags: PHP, Events, MySQL

FreeScout

FreeScout Help DeskHelp desk and shared inbox system with tickets, conversations, and customers.Tags: PHP, Support, MySQL

Additional Business Templates:

  • Ticketit - Laravel ticketing system
  • Staytus - Service status page
  • Cachet - Status page system
  • Deployer - Deployment tool

E-commerce

Complete e-commerce database schemas:

Sylius

Sylius E-commerceFull-featured e-commerce platform schema with:
  • Products, variants, and attributes
  • Orders and shipments
  • Customers and addresses
  • Payments and promotions
  • Inventory management
Tags: PHP, Symfony, E-commerce, PostgreSQL

Personal & Productivity

Monica

Monica CRMPersonal relationship management system with contacts, activities, tasks, and gifts.Features: Relationships, notes, remindersTags: PHP, CRM, MySQL

Koel

Koel Music StreamingPersonal music streaming service with songs, albums, artists, and playlists.Tags: PHP, Music, MySQL

Social & Communication

BuddyPress

BuddyPress Social NetworkWordPress social networking plugin with groups, messages, activities, and friendships.Tags: PHP, WordPress, Social, MySQL

Pixelfed

Pixelfed Photo SharingImage sharing platform schema with posts, profiles, follows, and likes.Tags: PHP, Social Media, PostgreSQL

Additional Social Templates:

  • Talk - Laravel real-time messaging
  • Octobox - GitHub notification management
  • Feedbin - RSS reader

Example Applications

Simplified versions of popular applications:

Twitter Clone

Twitter DatabaseSimplified Twitter-like schema:
  • Users and profiles
  • Tweets and retweets
  • Follows and followers
  • Likes and mentions
Tags: Social Media, Example Apps

Airbnb Clone

Airbnb DatabaseVacation rental platform schema:
  • Properties and listings
  • Users and hosts
  • Bookings and reservations
  • Reviews and ratings
Tags: Marketplace, Example Apps

Hacker News

Hacker NewsNews aggregator schema:
  • Stories and submissions
  • Comments (nested)
  • Users and karma
  • Votes
Tags: News, Example Apps

Lobsters

Lobsters CommunityTechnology-focused news aggregator:
  • Stories and tags
  • Comments and threads
  • User invitations
  • Moderation
Tags: News, Community

Domain-Specific Templates

Employee Database

Employee ManagementHR and employee management schema:
  • Employees and personal info
  • Departments and managers
  • Salaries and titles
  • Employment history
  • Database views for reporting
Tables: 8 tables (6 tables + 2 views)Tags: MySQL, HR, EnterpriseSource: MySQL sample database

Pokemon Database

Pokemon Information SystemComprehensive Pokemon data schema:
  • Pokemon and species
  • Types and type effectiveness
  • Moves and abilities
  • Evolutions
  • Stats and habitats
Tables: 19 tables (14 tables + 5 views)Tags: MySQL, Gaming, ReferenceSource: Pokemon Database

Utility & Feature Modules

Specific feature implementations:

Taggit

Django TaggitSimple tagging system for Django with tags and tagged items.Tags: Python, Django, Feature

Flipper

Flipper Feature FlagsFeature flag system for Rails with gates and boolean/group/actor flags.Tags: Ruby, Rails, Feature Flags

Reversion

Django ReversionVersion control for Django models with revisions and versions.Tags: Python, Django, Versioning

Laravel Activitylog

Spatie Activity LogActivity logging for Laravel with customizable log entries.Tags: PHP, Laravel, Logging

Additional Utility Templates:

  • Pay Rails - Payment processing for Rails
  • Orchid - Laravel administration platform
  • Voyager - Laravel admin package
  • RefineryCMS - Rails content management
  • Comfortable Mexican Sofa - Rails CMS

SaaS & Multi-tenant

SaaS Pegasus

SaaS PegasusDjango SaaS boilerplate schema:
  • Multi-tenant organization structure
  • Team and membership management
  • Subscription and billing
  • Invitations and onboarding
Tags: Python, Django, SaaS, PostgreSQL

Laravel Spark

Laravel SparkLaravel SaaS framework schema:
  • Teams and team members
  • Subscriptions and invoices
  • API tokens
  • Announcements
Tags: PHP, Laravel, SaaS, MySQL

Specialized Applications

Polr

Polr URL ShortenerURL shortening service with links, clicks, and analytics.Tags: PHP, URL Shortener

Screeenly

Screeenly ScreenshotsWebsite screenshot service with screenshots, systems, and captures.Tags: PHP, Screenshots

Cabot

Cabot MonitoringService monitoring and alerting with checks, alerts, and incidents.Tags: Python, Monitoring

Gravity Forms

Gravity FormsWordPress form builder with forms, entries, and fields.Tags: PHP, WordPress, Forms

Using Templates

Selecting a Template

1

Browse Templates

From the ChartDB home screen or new diagram dialog:
  • View all available templates
  • Filter by tags or search by name
  • Preview template screenshots
2

Review Details

Click on a template to see:
  • Full description
  • Number of tables and relationships
  • Database type
  • Source project URL (if available)
  • Screenshot of the diagram
3

Create from Template

Click Use Template to:
  • Create a new diagram based on the template
  • All tables, fields, and relationships are copied
  • Diagram name is set to the template name
  • You can immediately start editing

Customizing Templates

Templates are fully editable:
Templates are starting points. Add your own tables:
  • Right-click canvas → New Table
  • Import additional SQL schemas
  • Duplicate and modify existing tables
Remove tables you don’t need:
  • Right-click table → Delete Table
  • Relationships are automatically removed
  • Simplify templates to match your use case
Adjust fields to your requirements:
  • Add/remove fields
  • Change data types
  • Update constraints and defaults
  • Add comments and documentation
Modify the relationship structure:
  • Add new relationships
  • Change cardinality (1:1, 1:N, N:M)
  • Update foreign keys
  • Remove unused relationships

Template Details

Template Structure

Each template includes:
interface Template {
  slug: string;                  // URL-friendly identifier
  name: string;                  // Display name
  shortDescription: string;      // Brief summary
  description: string;           // Full description  
  image: string;                 // Light theme preview
  imageDark: string;            // Dark theme preview
  diagram: Diagram;             // Full diagram data
  tags: string[];               // Category tags
  featured: boolean;            // Show on home page
  url?: string;                 // Source project URL
}

Template Data Structure

Templates contain complete diagram specifications:
  • Tables: Full table definitions with fields, indexes, and constraints
  • Relationships: All foreign key relationships with cardinality
  • Areas: Visual grouping (some templates)
  • Notes: Documentation annotations (some templates)
  • Database Type: MySQL, PostgreSQL, SQLite, etc.
  • Metadata: Creation date, update date, diagram name
The following templates are featured on the home page:
  1. Employee Database - Classic HR schema
  2. Pokemon Database - Complex reference data
  3. Airbnb Clone - Marketplace platform
  4. WordPress - Popular CMS
  5. Django - Python framework auth
  6. Laravel - PHP framework auth
  7. Twitter Clone - Social network
  8. Visual Novel - Game database

Template Use Cases

Learning Database Design

Study real-world schemas:
Beginner → Employee Database
           Simple, well-structured schema
           Clear relationships
           Good for learning SQL

Intermediate → WordPress
               Metadata pattern
               Taxonomy structure
               Polymorphic relationships

Advanced → Sylius E-commerce
           Complex business logic
           Multi-table relationships
           Advanced patterns

Jump-starting Projects

Start projects faster:
Use Laravel or Django auth templates as foundation:
  1. Select Laravel/Django template
  2. Add your domain-specific tables
  3. Connect to auth tables
  4. Export SQL and deploy

Understanding Frameworks

Learn how popular frameworks structure data:
  • Laravel patterns: Polymorphic relationships, soft deletes, timestamps
  • Django patterns: Generic foreign keys, through tables, permissions
  • Rails patterns: Join tables, STI, polymorphic associations

Database Migration Planning

Plan migrations using templates:
  1. Load current system template (e.g., WordPress)
  2. Create copy for target system
  3. Add new schema elements
  4. Plan migration path
  5. Export migration SQL

Best Practices

Choose a template that matches your use case:
  • Building a blog? → WordPress or Canvas
  • Building a marketplace? → Airbnb or Sylius
  • Building a SaaS? → Laravel Spark or SaaS Pegasus
It’s easier to modify a similar schema than start from scratch.
Templates are guides, not requirements:
  • Remove what you don’t need
  • Simplify where possible
  • Add what’s missing
  • Adapt to your specific needs
Compare how different systems solve similar problems:
  • User authentication across Laravel, Django, Rails
  • Permission systems in different frameworks
  • E-commerce product models
  • Content taxonomy approaches
When customizing templates:
  • Add notes explaining modifications
  • Document why you removed features
  • Explain custom additions
  • Track deviation from template

Contributing Templates

Want to contribute a template? ChartDB welcomes template submissions from real-world, open-source projects.

Template Criteria

  1. Based on real project: Must be from an actual open-source application
  2. Well-structured: Clean schema design with proper relationships
  3. Documented: Include description and source URL
  4. Complete: Include all core tables (can exclude auxiliary tables)
  5. Licensed: Ensure compatible open-source license

Submission Process

1

Create Diagram

Build the template diagram in ChartDB:
  • Import from project’s schema
  • Ensure all relationships are correct
  • Add appropriate colors
  • Position tables logically
2

Export Template Data

Export as ChartDB diagram format (JSON).
3

Prepare Metadata

Gather information:
  • Project name and description
  • Database type
  • Tags and categories
  • Source repository URL
  • License information
4

Submit

Create pull request to ChartDB repository with:
  • Template TypeScript file
  • Preview images (light and dark)
  • Documentation

Next Steps

Creating Diagrams

Learn how to create diagrams from templates

Editing Schema

Customize template tables and fields

Export Schema

Export template schemas to SQL

Quickstart

Get started with ChartDB

Build docs developers (and LLMs) love