Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

556 B
Raw Blame
import { Mermaid } from 'ui-patterns/Mermaid'

export default function MermaidERDiagram() {
  return (
    <Mermaid
      chart={`
erDiagram
    USERS ||--o{ POSTS : creates
    USERS ||--o{ COMMENTS : writes
    POSTS ||--o{ COMMENTS : has
    USERS {
        uuid id PK
        string email
        timestamp created_at
    }
    POSTS {
        uuid id PK
        uuid user_id FK
        string title
        text content
    }
    COMMENTS {
        uuid id PK
        uuid user_id FK
        uuid post_id FK
        text content
    }
`}
    />
  )
}