isketch Templates Convert Format Open the editor

SaaS database

6 shapes and 6 connections, sketched in isketch.

Open this template

SaaS database org_id org_id owner_id project_id org_id org_id orgs id, name, plan, created_at users id, org_id, email, role projects id, org_id, owner_id, name diagrams id, project_id, title, document api_tokens id, org_id, hash, scopes events id, org_id, name, at, props

The .flow source

The whole template as text: copy it, keep it in your repo, hand it to an agent.

examples/templates/saas-database.flow
title: SaaS database
note: Multi-tenant by org_id, everything the product needs.

orgs = table "orgs" -- id, name, plan, created_at
users = table "users" -- id, org_id, email, role
projects = table "projects" -- id, org_id, owner_id, name
diagrams = table "diagrams" -- id, project_id, title, document
tokens = table "api_tokens" -- id, org_id, hash, scopes
events = table "events" -- id, org_id, name, at, props

orgs -> users : org_id
orgs -> projects : org_id
users -> projects : owner_id
projects -> diagrams : project_id
orgs -> tokens : org_id
orgs -> events : org_id