Repository: onlook-dev/onlook Branch: main Commit: a242be584fa9 Files: 1600 Total size: 7.9 MB Directory structure: gitextract_tfg2fxbz/ ├── .dockerignore ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ ├── feature_request.md │ │ └── help_wanted.md │ ├── dependabot.yml │ ├── pull_request_template.md │ └── workflows/ │ ├── chromatic.yml │ ├── ci.yml │ └── supabase-push-staging.yml ├── .gitignore ├── .gitmodules ├── .prettierignore ├── .vscode/ │ ├── .debug.script.mjs │ ├── extensions.json │ ├── launch.json │ └── tasks.json ├── AGENTS.md ├── CLAUDE.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE.md ├── README.md ├── SECURITY.md ├── apps/ │ ├── backend/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── package.json │ │ ├── supabase/ │ │ │ ├── .gitignore │ │ │ ├── config.toml │ │ │ └── migrations/ │ │ │ ├── 0000_same_human_robot.sql │ │ │ ├── 0001_graceful_exodus.sql │ │ │ ├── 0002_red_crusher_hogan.sql │ │ │ ├── 0003_loud_ozymandias.sql │ │ │ ├── 0004_pink_expediter.sql │ │ │ ├── 0005_short_lila_cheney.sql │ │ │ ├── 0006_rls.sql │ │ │ ├── 0007_realtime_rls.sql │ │ │ ├── 0008_preview-img-storage.sql │ │ │ ├── 0009_project_img_path.sql │ │ │ ├── 0010_bent_edwin_jarvis.sql │ │ │ ├── 0011_typical_clea.sql │ │ │ ├── 0012_file-transfer-bucket.sql │ │ │ ├── 0013_aspiring_kabuki.sql │ │ │ ├── 0014_military_marrow.sql │ │ │ ├── 0015_same_leo.sql │ │ │ ├── 0016_pretty_dust.sql │ │ │ ├── 0017_small_xavin.sql │ │ │ ├── 0018_lush_thanos.sql │ │ │ ├── 0019_abandoned_psylocke.sql │ │ │ └── meta/ │ │ │ ├── 0000_snapshot.json │ │ │ ├── 0001_snapshot.json │ │ │ ├── 0002_snapshot.json │ │ │ ├── 0003_snapshot.json │ │ │ ├── 0004_snapshot.json │ │ │ ├── 0005_snapshot.json │ │ │ ├── 0006_snapshot.json │ │ │ ├── 0007_snapshot.json │ │ │ ├── 0008_snapshot.json │ │ │ ├── 0009_snapshot.json │ │ │ ├── 0010_snapshot.json │ │ │ ├── 0011_snapshot.json │ │ │ ├── 0012_snapshot.json │ │ │ ├── 0013_snapshot.json │ │ │ ├── 0014_snapshot.json │ │ │ ├── 0015_snapshot.json │ │ │ ├── 0016_snapshot.json │ │ │ ├── 0017_snapshot.json │ │ │ ├── 0018_snapshot.json │ │ │ ├── 0019_snapshot.json │ │ │ └── _journal.json │ │ └── tsconfig.json │ └── web/ │ ├── .gitignore │ ├── README.md │ ├── client/ │ │ ├── .gitignore │ │ ├── .storybook/ │ │ │ ├── main.ts │ │ │ ├── mocks/ │ │ │ │ ├── supabase-client.ts │ │ │ │ └── trpc-react.tsx │ │ │ ├── preview-head.html │ │ │ ├── preview.tsx │ │ │ └── vitest.setup.ts │ │ ├── README.md │ │ ├── chromatic.config.json │ │ ├── components.json │ │ ├── eslint.config.js │ │ ├── messages/ │ │ │ ├── en.d.json.ts │ │ │ ├── en.json │ │ │ ├── es.json │ │ │ ├── ja.json │ │ │ ├── ko.json │ │ │ └── zh.json │ │ ├── next.config.ts │ │ ├── package.json │ │ ├── postcss.config.js │ │ ├── public/ │ │ │ ├── onlook-preload-script.js │ │ │ └── scenes/ │ │ │ └── flow-background.json │ │ ├── src/ │ │ │ ├── app/ │ │ │ │ ├── _components/ │ │ │ │ │ ├── auth-modal.tsx │ │ │ │ │ ├── button-link.tsx │ │ │ │ │ ├── hero/ │ │ │ │ │ │ ├── ai-features-hero.tsx │ │ │ │ │ │ ├── ai-frontend-hero.tsx │ │ │ │ │ │ ├── builder-features-hero.tsx │ │ │ │ │ │ ├── claude-code-hero.tsx │ │ │ │ │ │ ├── create-error.tsx │ │ │ │ │ │ ├── create.tsx │ │ │ │ │ │ ├── features-hero.tsx │ │ │ │ │ │ ├── high-demand.tsx │ │ │ │ │ │ ├── import.tsx │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ ├── mobile-email-capture.tsx │ │ │ │ │ │ ├── start-blank.tsx │ │ │ │ │ │ └── unicorn-background.tsx │ │ │ │ │ ├── landing-page/ │ │ │ │ │ │ ├── ai-benefits-section.tsx │ │ │ │ │ │ ├── ai-features-grid-section.tsx │ │ │ │ │ │ ├── ai-features-intro-section.tsx │ │ │ │ │ │ ├── benefits-section.tsx │ │ │ │ │ │ ├── builder-benefits-section.tsx │ │ │ │ │ │ ├── builder-features-grid-section.tsx │ │ │ │ │ │ ├── builder-features-intro-section.tsx │ │ │ │ │ │ ├── code-one-to-one-section.tsx │ │ │ │ │ │ ├── color-swatch-group.tsx │ │ │ │ │ │ ├── contributor-section.tsx │ │ │ │ │ │ ├── contributor.css │ │ │ │ │ │ ├── cta-section.tsx │ │ │ │ │ │ ├── design-mockup/ │ │ │ │ │ │ │ ├── design-mockup-icons.tsx │ │ │ │ │ │ │ └── design-mockup.tsx │ │ │ │ │ │ ├── faq-dropdown.tsx │ │ │ │ │ │ ├── faq-section.tsx │ │ │ │ │ │ ├── feature-blocks/ │ │ │ │ │ │ │ ├── ai-chat-preview-block.tsx │ │ │ │ │ │ │ ├── brand-compliance.tsx │ │ │ │ │ │ │ ├── components.tsx │ │ │ │ │ │ │ ├── direct-editing.tsx │ │ │ │ │ │ │ ├── layers.tsx │ │ │ │ │ │ │ ├── responsive-website.tsx │ │ │ │ │ │ │ └── revision-history.tsx │ │ │ │ │ │ ├── features-grid-section.tsx │ │ │ │ │ │ ├── features-intro-section.tsx │ │ │ │ │ │ ├── illustrations.tsx │ │ │ │ │ │ ├── obsess-for-hours-section.tsx │ │ │ │ │ │ ├── onlook-interface-mockup.tsx │ │ │ │ │ │ ├── page-footer.tsx │ │ │ │ │ │ ├── responsive-mockup-section.tsx │ │ │ │ │ │ ├── social-proof-section.tsx │ │ │ │ │ │ ├── testimonials-section.tsx │ │ │ │ │ │ └── what-can-onlook-do-section.tsx │ │ │ │ │ ├── login-button.tsx │ │ │ │ │ ├── shared/ │ │ │ │ │ │ └── mockups/ │ │ │ │ │ │ ├── ai-chat-interactive.tsx │ │ │ │ │ │ ├── components-mockup.tsx │ │ │ │ │ │ ├── direct-editing-interactive.tsx │ │ │ │ │ │ └── tailwind-color-editor.tsx │ │ │ │ │ ├── theme.tsx │ │ │ │ │ ├── top-bar/ │ │ │ │ │ │ ├── github.tsx │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ ├── mega-menu.tsx │ │ │ │ │ │ ├── mobile-menu.tsx │ │ │ │ │ │ └── user.tsx │ │ │ │ │ └── website-layout.tsx │ │ │ │ ├── about/ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── api/ │ │ │ │ │ ├── chat/ │ │ │ │ │ │ ├── helpers/ │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── stream.ts │ │ │ │ │ │ │ └── usage.ts │ │ │ │ │ │ └── route.ts │ │ │ │ │ ├── email-capture/ │ │ │ │ │ │ └── route.ts │ │ │ │ │ └── trpc/ │ │ │ │ │ └── [trpc]/ │ │ │ │ │ └── route.ts │ │ │ │ ├── auth/ │ │ │ │ │ ├── auth-context.tsx │ │ │ │ │ ├── callback/ │ │ │ │ │ │ └── route.ts │ │ │ │ │ └── redirect/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── callback/ │ │ │ │ │ ├── github/ │ │ │ │ │ │ └── install/ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── stripe/ │ │ │ │ │ ├── cancel/ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── message-screen.tsx │ │ │ │ │ └── success/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── faq/ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── features/ │ │ │ │ │ ├── ai/ │ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── ai-for-frontend/ │ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── builder/ │ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── layout.tsx │ │ │ │ │ ├── page.tsx │ │ │ │ │ └── prototype/ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── fonts.ts │ │ │ │ ├── invitation/ │ │ │ │ │ └── [id]/ │ │ │ │ │ ├── _components/ │ │ │ │ │ │ ├── auth.tsx │ │ │ │ │ │ └── main.tsx │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── layout.tsx │ │ │ │ ├── login/ │ │ │ │ │ ├── actions.tsx │ │ │ │ │ ├── error.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── not-found.tsx │ │ │ │ ├── page.tsx │ │ │ │ ├── pricing/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── privacy-policy/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── project/ │ │ │ │ │ ├── [id]/ │ │ │ │ │ │ ├── _components/ │ │ │ │ │ │ │ ├── bottom-bar/ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ ├── restart-sandbox-button.tsx │ │ │ │ │ │ │ │ ├── terminal-area.tsx │ │ │ │ │ │ │ │ └── terminal.tsx │ │ │ │ │ │ │ ├── branch/ │ │ │ │ │ │ │ │ ├── branch-controls.tsx │ │ │ │ │ │ │ │ └── branch-list.tsx │ │ │ │ │ │ │ ├── canvas/ │ │ │ │ │ │ │ │ ├── frame/ │ │ │ │ │ │ │ │ │ ├── gesture.tsx │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ ├── resize-handles.tsx │ │ │ │ │ │ │ │ │ ├── top-bar/ │ │ │ │ │ │ │ │ │ │ ├── branch.tsx │ │ │ │ │ │ │ │ │ │ ├── helpers.ts │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ └── page-selector.tsx │ │ │ │ │ │ │ │ │ ├── use-frame-reload.ts │ │ │ │ │ │ │ │ │ ├── use-sandbox-timeout.ts │ │ │ │ │ │ │ │ │ └── view.tsx │ │ │ │ │ │ │ │ ├── frames.tsx │ │ │ │ │ │ │ │ ├── hotkeys/ │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ ├── overlay/ │ │ │ │ │ │ │ │ │ ├── drag-select.tsx │ │ │ │ │ │ │ │ │ ├── elements/ │ │ │ │ │ │ │ │ │ │ ├── buttons/ │ │ │ │ │ │ │ │ │ │ │ ├── chat.tsx │ │ │ │ │ │ │ │ │ │ │ ├── code.tsx │ │ │ │ │ │ │ │ │ │ │ ├── helpers.ts │ │ │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ │ │ ├── measurement.tsx │ │ │ │ │ │ │ │ │ │ ├── rect/ │ │ │ │ │ │ │ │ │ │ │ ├── base.tsx │ │ │ │ │ │ │ │ │ │ │ ├── click.tsx │ │ │ │ │ │ │ │ │ │ │ ├── hover.tsx │ │ │ │ │ │ │ │ │ │ │ ├── insert.tsx │ │ │ │ │ │ │ │ │ │ │ └── resize.tsx │ │ │ │ │ │ │ │ │ │ ├── snap-guidelines.tsx │ │ │ │ │ │ │ │ │ │ └── text.tsx │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ └── pan.tsx │ │ │ │ │ │ │ │ ├── recenter-canvas-button.tsx │ │ │ │ │ │ │ │ └── selection-utils.ts │ │ │ │ │ │ │ ├── clone-project-dialog.tsx │ │ │ │ │ │ │ ├── editor-bar/ │ │ │ │ │ │ │ │ ├── div-selected.tsx │ │ │ │ │ │ │ │ ├── dropdowns/ │ │ │ │ │ │ │ │ │ ├── border-color.tsx │ │ │ │ │ │ │ │ │ ├── border.tsx │ │ │ │ │ │ │ │ │ ├── color-background.tsx │ │ │ │ │ │ │ │ │ ├── display/ │ │ │ │ │ │ │ │ │ │ ├── direction.tsx │ │ │ │ │ │ │ │ │ │ ├── gap.tsx │ │ │ │ │ │ │ │ │ │ ├── horizontal-align.tsx │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ ├── type.tsx │ │ │ │ │ │ │ │ │ │ └── vertical-align.tsx │ │ │ │ │ │ │ │ │ ├── height.tsx │ │ │ │ │ │ │ │ │ ├── img-background.tsx │ │ │ │ │ │ │ │ │ ├── img-fit.tsx │ │ │ │ │ │ │ │ │ ├── margin.tsx │ │ │ │ │ │ │ │ │ ├── opacity.tsx │ │ │ │ │ │ │ │ │ ├── padding.tsx │ │ │ │ │ │ │ │ │ ├── radius.tsx │ │ │ │ │ │ │ │ │ ├── state-dropdown.tsx │ │ │ │ │ │ │ │ │ └── width.tsx │ │ │ │ │ │ │ │ ├── frame-selected/ │ │ │ │ │ │ │ │ │ ├── device-selector.tsx │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ ├── rotate-group.tsx │ │ │ │ │ │ │ │ │ ├── theme-group.tsx │ │ │ │ │ │ │ │ │ └── window-actions-group.tsx │ │ │ │ │ │ │ │ ├── hooks/ │ │ │ │ │ │ │ │ │ ├── use-background-image-update.ts │ │ │ │ │ │ │ │ │ ├── use-box-control.ts │ │ │ │ │ │ │ │ │ ├── use-color-update.ts │ │ │ │ │ │ │ │ │ ├── use-dimension-control.ts │ │ │ │ │ │ │ │ │ ├── use-dropdown-manager.tsx │ │ │ │ │ │ │ │ │ ├── use-gradient-update.ts │ │ │ │ │ │ │ │ │ ├── use-input-control.ts │ │ │ │ │ │ │ │ │ ├── use-measure-group.ts │ │ │ │ │ │ │ │ │ └── use-text-control.ts │ │ │ │ │ │ │ │ ├── hover-tooltip.tsx │ │ │ │ │ │ │ │ ├── img-selected.tsx │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ ├── inputs/ │ │ │ │ │ │ │ │ │ ├── color-picker.tsx │ │ │ │ │ │ │ │ │ ├── input-color.tsx │ │ │ │ │ │ │ │ │ ├── input-dropdown.tsx │ │ │ │ │ │ │ │ │ ├── input-icon.tsx │ │ │ │ │ │ │ │ │ ├── input-image.tsx │ │ │ │ │ │ │ │ │ ├── input-radio.tsx │ │ │ │ │ │ │ │ │ ├── input-range.tsx │ │ │ │ │ │ │ │ │ └── spacing-inputs.tsx │ │ │ │ │ │ │ │ ├── overflow-menu.tsx │ │ │ │ │ │ │ │ ├── separator.tsx │ │ │ │ │ │ │ │ ├── text-inputs/ │ │ │ │ │ │ │ │ │ ├── advanced-typography.tsx │ │ │ │ │ │ │ │ │ ├── font/ │ │ │ │ │ │ │ │ │ │ ├── font-family-selector.tsx │ │ │ │ │ │ │ │ │ │ ├── font-family.tsx │ │ │ │ │ │ │ │ │ │ ├── font-size.tsx │ │ │ │ │ │ │ │ │ │ └── font-weight.tsx │ │ │ │ │ │ │ │ │ ├── text-align.tsx │ │ │ │ │ │ │ │ │ └── text-color.tsx │ │ │ │ │ │ │ │ ├── text-selected.tsx │ │ │ │ │ │ │ │ ├── toolbar-button.tsx │ │ │ │ │ │ │ │ └── utils/ │ │ │ │ │ │ │ │ └── gradient.ts │ │ │ │ │ │ │ ├── left-panel/ │ │ │ │ │ │ │ │ ├── code-panel/ │ │ │ │ │ │ │ │ │ ├── code-tab/ │ │ │ │ │ │ │ │ │ │ ├── file-content/ │ │ │ │ │ │ │ │ │ │ │ ├── code-editor.tsx │ │ │ │ │ │ │ │ │ │ │ ├── code-mirror-config.ts │ │ │ │ │ │ │ │ │ │ │ ├── floating-add-to-chat-button.tsx │ │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ │ └── unsaved-changes-dialog.tsx │ │ │ │ │ │ │ │ │ │ ├── file-tabs/ │ │ │ │ │ │ │ │ │ │ │ ├── file-tab.tsx │ │ │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ │ │ ├── header-controls.tsx │ │ │ │ │ │ │ │ │ │ ├── hooks/ │ │ │ │ │ │ │ │ │ │ │ └── use-code-navigation.ts │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ ├── modals/ │ │ │ │ │ │ │ │ │ │ │ ├── file-modal.tsx │ │ │ │ │ │ │ │ │ │ │ ├── folder-modal.tsx │ │ │ │ │ │ │ │ │ │ │ └── upload-modal.tsx │ │ │ │ │ │ │ │ │ │ ├── shared/ │ │ │ │ │ │ │ │ │ │ │ ├── file-operations.ts │ │ │ │ │ │ │ │ │ │ │ ├── file-templates.ts │ │ │ │ │ │ │ │ │ │ │ ├── types.ts │ │ │ │ │ │ │ │ │ │ │ └── utils.ts │ │ │ │ │ │ │ │ │ │ └── sidebar/ │ │ │ │ │ │ │ │ │ │ ├── file-icon.tsx │ │ │ │ │ │ │ │ │ │ ├── file-tree-node.tsx │ │ │ │ │ │ │ │ │ │ ├── file-tree-row.tsx │ │ │ │ │ │ │ │ │ │ ├── file-tree-search.tsx │ │ │ │ │ │ │ │ │ │ └── file-tree.tsx │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ ├── design-panel/ │ │ │ │ │ │ │ │ │ ├── branches-tab/ │ │ │ │ │ │ │ │ │ │ ├── branch-management.tsx │ │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ │ ├── brand-tab/ │ │ │ │ │ │ │ │ │ │ ├── color-panel/ │ │ │ │ │ │ │ │ │ │ │ ├── color-name-input.tsx │ │ │ │ │ │ │ │ │ │ │ ├── color-pallet-group.tsx │ │ │ │ │ │ │ │ │ │ │ ├── color-popover.tsx │ │ │ │ │ │ │ │ │ │ │ ├── color-row.tsx │ │ │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ │ │ ├── font-panel/ │ │ │ │ │ │ │ │ │ │ │ ├── font-family.tsx │ │ │ │ │ │ │ │ │ │ │ ├── font-files.tsx │ │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ │ ├── system-font.tsx │ │ │ │ │ │ │ │ │ │ │ └── upload-modal.tsx │ │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ │ ├── help-button/ │ │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ │ ├── image-tab/ │ │ │ │ │ │ │ │ │ │ ├── breadcrumb-navigation.tsx │ │ │ │ │ │ │ │ │ │ ├── folder-list.tsx │ │ │ │ │ │ │ │ │ │ ├── hooks/ │ │ │ │ │ │ │ │ │ │ │ ├── use-image-drag-drop.tsx │ │ │ │ │ │ │ │ │ │ │ ├── use-image-operations.tsx │ │ │ │ │ │ │ │ │ │ │ └── use-navigation.tsx │ │ │ │ │ │ │ │ │ │ ├── image-grid.tsx │ │ │ │ │ │ │ │ │ │ ├── image-item.tsx │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ ├── search-upload-bar.tsx │ │ │ │ │ │ │ │ │ │ ├── types.ts │ │ │ │ │ │ │ │ │ │ └── utils/ │ │ │ │ │ │ │ │ │ │ ├── image-references.test.ts │ │ │ │ │ │ │ │ │ │ └── image-references.ts │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ ├── layers-tab/ │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ └── tree/ │ │ │ │ │ │ │ │ │ │ ├── page-tree-node.tsx │ │ │ │ │ │ │ │ │ │ ├── page-tree-row.tsx │ │ │ │ │ │ │ │ │ │ ├── tree-node.tsx │ │ │ │ │ │ │ │ │ │ └── tree-row.tsx │ │ │ │ │ │ │ │ │ ├── page-tab/ │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ └── page-modal.tsx │ │ │ │ │ │ │ │ │ ├── windows-tab/ │ │ │ │ │ │ │ │ │ │ ├── device-settings.tsx │ │ │ │ │ │ │ │ │ │ ├── frame-dimensions.tsx │ │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ │ └── zoom-controls/ │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ ├── main.tsx │ │ │ │ │ │ │ ├── members/ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ ├── invitation-row.tsx │ │ │ │ │ │ │ │ ├── invite-member-input.tsx │ │ │ │ │ │ │ │ ├── member-row.tsx │ │ │ │ │ │ │ │ ├── members-content.tsx │ │ │ │ │ │ │ │ └── suggested-teammates.tsx │ │ │ │ │ │ │ ├── right-click-menu/ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ ├── right-panel/ │ │ │ │ │ │ │ │ ├── chat-tab/ │ │ │ │ │ │ │ │ │ ├── chat-input/ │ │ │ │ │ │ │ │ │ │ ├── action-buttons.tsx │ │ │ │ │ │ │ │ │ │ ├── chat-context.tsx │ │ │ │ │ │ │ │ │ │ ├── chat-mode-toggle.tsx │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ └── queue-items/ │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ └── queue-item.tsx │ │ │ │ │ │ │ │ │ ├── chat-messages/ │ │ │ │ │ │ │ │ │ │ ├── assistant-message.tsx │ │ │ │ │ │ │ │ │ │ ├── error-message.tsx │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ ├── message-content/ │ │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ │ ├── tool-call-display.tsx │ │ │ │ │ │ │ │ │ │ │ └── tool-call-simple.tsx │ │ │ │ │ │ │ │ │ │ ├── multi-branch-revert-modal.tsx │ │ │ │ │ │ │ │ │ │ ├── stream-message.tsx │ │ │ │ │ │ │ │ │ │ └── user-message.tsx │ │ │ │ │ │ │ │ │ ├── chat-tab-content/ │ │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ │ ├── code-display/ │ │ │ │ │ │ │ │ │ │ ├── bash-code-display.tsx │ │ │ │ │ │ │ │ │ │ ├── code-block.tsx │ │ │ │ │ │ │ │ │ │ ├── code-diff.tsx │ │ │ │ │ │ │ │ │ │ ├── collapsible-code-block.tsx │ │ │ │ │ │ │ │ │ │ └── search-sources-display.tsx │ │ │ │ │ │ │ │ │ ├── context-pills/ │ │ │ │ │ │ │ │ │ │ ├── draft-context-pill.tsx │ │ │ │ │ │ │ │ │ │ ├── helpers.tsx │ │ │ │ │ │ │ │ │ │ ├── image-pill.tsx │ │ │ │ │ │ │ │ │ │ ├── input-context-pills.tsx │ │ │ │ │ │ │ │ │ │ └── sent-context-pill.tsx │ │ │ │ │ │ │ │ │ ├── controls.tsx │ │ │ │ │ │ │ │ │ ├── error.tsx │ │ │ │ │ │ │ │ │ ├── history.tsx │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ ├── panel-dropdown.tsx │ │ │ │ │ │ │ │ │ └── suggestions.tsx │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ └── top-bar/ │ │ │ │ │ │ │ ├── branch.tsx │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ ├── mode-toggle.tsx │ │ │ │ │ │ │ ├── new-project-menu.tsx │ │ │ │ │ │ │ ├── project-breadcrumb.tsx │ │ │ │ │ │ │ ├── publish/ │ │ │ │ │ │ │ │ ├── dropdown/ │ │ │ │ │ │ │ │ │ ├── advanced-settings.tsx │ │ │ │ │ │ │ │ │ ├── custom-domain/ │ │ │ │ │ │ │ │ │ │ ├── action.tsx │ │ │ │ │ │ │ │ │ │ ├── domain.tsx │ │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ │ ├── no-domain.tsx │ │ │ │ │ │ │ │ │ │ └── provider.tsx │ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ │ ├── loading.tsx │ │ │ │ │ │ │ │ │ ├── preview-domain-section.tsx │ │ │ │ │ │ │ │ │ └── url.tsx │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ └── trigger-button.tsx │ │ │ │ │ │ │ └── recent-projects.tsx │ │ │ │ │ │ ├── _hooks/ │ │ │ │ │ │ │ ├── use-chat/ │ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ │ └── utils.ts │ │ │ │ │ │ │ ├── use-panel-measure.tsx │ │ │ │ │ │ │ ├── use-start-project.tsx │ │ │ │ │ │ │ └── use-tab-active.tsx │ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ │ ├── page.tsx │ │ │ │ │ │ └── providers.tsx │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── projects/ │ │ │ │ │ ├── _components/ │ │ │ │ │ │ ├── carousel/ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ ├── edit-app.tsx │ │ │ │ │ │ ├── select/ │ │ │ │ │ │ │ ├── highlight-text.tsx │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ ├── masonry-layout.tsx │ │ │ │ │ │ │ ├── project-card-presentation.tsx │ │ │ │ │ │ │ ├── project-card.tsx │ │ │ │ │ │ │ ├── square-project-card-presentation.tsx │ │ │ │ │ │ │ └── square-project-card.tsx │ │ │ │ │ │ ├── select-presentation.tsx │ │ │ │ │ │ ├── settings/ │ │ │ │ │ │ │ ├── clone-project.tsx │ │ │ │ │ │ │ ├── create-template.tsx │ │ │ │ │ │ │ ├── delete-project.tsx │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ └── rename-project.tsx │ │ │ │ │ │ ├── templates/ │ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ │ ├── lazy-image.tsx │ │ │ │ │ │ │ ├── template-card.tsx │ │ │ │ │ │ │ ├── template-modal-presentation.tsx │ │ │ │ │ │ │ └── template-modal.tsx │ │ │ │ │ │ ├── top-bar-presentation.tsx │ │ │ │ │ │ └── top-bar.tsx │ │ │ │ │ ├── import/ │ │ │ │ │ │ ├── cancel-button.tsx │ │ │ │ │ │ ├── github/ │ │ │ │ │ │ │ ├── _components/ │ │ │ │ │ │ │ │ ├── connect.tsx │ │ │ │ │ │ │ │ ├── finalizing.tsx │ │ │ │ │ │ │ │ └── setup.tsx │ │ │ │ │ │ │ ├── _context/ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ ├── _hooks/ │ │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ │ ├── use-data.ts │ │ │ │ │ │ │ │ ├── use-installation.ts │ │ │ │ │ │ │ │ ├── use-repo-import.ts │ │ │ │ │ │ │ │ └── use-repo-validation.ts │ │ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ │ ├── local/ │ │ │ │ │ │ │ ├── _components/ │ │ │ │ │ │ │ │ ├── finalizing-project.tsx │ │ │ │ │ │ │ │ ├── import-local-project.tsx │ │ │ │ │ │ │ │ ├── select-folder.tsx │ │ │ │ │ │ │ │ └── verify-project.tsx │ │ │ │ │ │ │ ├── _context/ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── page.tsx │ │ │ │ │ │ └── steps.tsx │ │ │ │ │ ├── layout.tsx │ │ │ │ │ ├── page.tsx │ │ │ │ │ └── types.ts │ │ │ │ ├── see-a-demo/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── seo.ts │ │ │ │ ├── site-map/ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── sitemap.ts │ │ │ │ ├── terms-of-service/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── webhook/ │ │ │ │ │ └── stripe/ │ │ │ │ │ ├── route.ts │ │ │ │ │ └── subscription/ │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── helpers.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── update.ts │ │ │ │ └── workflows/ │ │ │ │ ├── claude-code/ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── layout.tsx │ │ │ │ ├── page.tsx │ │ │ │ └── vibe-coding/ │ │ │ │ ├── layout.tsx │ │ │ │ └── page.tsx │ │ │ ├── components/ │ │ │ │ ├── hotkey.ts │ │ │ │ ├── ide.ts │ │ │ │ ├── rb2b-loader.tsx │ │ │ │ ├── store/ │ │ │ │ │ ├── create/ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ └── manager.ts │ │ │ │ │ ├── editor/ │ │ │ │ │ │ ├── action/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── api/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── ast/ │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── layers.ts │ │ │ │ │ │ ├── branch/ │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── manager.ts │ │ │ │ │ │ ├── cache/ │ │ │ │ │ │ │ ├── file-cache.ts │ │ │ │ │ │ │ ├── types.ts │ │ │ │ │ │ │ └── unified-cache.ts │ │ │ │ │ │ ├── canvas/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── chat/ │ │ │ │ │ │ │ ├── context.ts │ │ │ │ │ │ │ ├── conversation.ts │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── code/ │ │ │ │ │ │ │ ├── helpers.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── insert.ts │ │ │ │ │ │ │ ├── requests.ts │ │ │ │ │ │ │ └── tailwind.ts │ │ │ │ │ │ ├── copy/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── element/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── engine.ts │ │ │ │ │ │ ├── error/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── font/ │ │ │ │ │ │ │ ├── font-config.ts │ │ │ │ │ │ │ ├── font-search-manager.ts │ │ │ │ │ │ │ ├── font-upload-manager.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── layout-manager.ts │ │ │ │ │ │ │ └── tailwind-config.ts │ │ │ │ │ │ ├── frame-events/ │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── types.ts │ │ │ │ │ │ ├── frames/ │ │ │ │ │ │ │ ├── dimension.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── manager.ts │ │ │ │ │ │ │ └── navigation.ts │ │ │ │ │ │ ├── git/ │ │ │ │ │ │ │ ├── git.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── utils.ts │ │ │ │ │ │ ├── group/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── history/ │ │ │ │ │ │ │ ├── helpers.ts │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── ide/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── image/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ ├── insert/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── move/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── overlay/ │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── prosemirror/ │ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ │ ├── state.ts │ │ │ │ │ │ │ └── utils.ts │ │ │ │ │ │ ├── pages/ │ │ │ │ │ │ │ ├── helper.ts │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── sandbox/ │ │ │ │ │ │ │ ├── helpers.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── preload-script.ts │ │ │ │ │ │ │ ├── session.ts │ │ │ │ │ │ │ └── terminal.ts │ │ │ │ │ │ ├── screenshot/ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ ├── snap/ │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── types.ts │ │ │ │ │ │ ├── state/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── style/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── text/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ └── theme/ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── util.ts │ │ │ │ │ ├── hosting/ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ ├── provider.tsx │ │ │ │ │ │ └── type.tsx │ │ │ │ │ └── state/ │ │ │ │ │ ├── index.ts │ │ │ │ │ └── manager.ts │ │ │ │ ├── telemetry-provider.tsx │ │ │ │ ├── tools/ │ │ │ │ │ ├── helpers.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── tools.ts │ │ │ │ └── ui/ │ │ │ │ ├── auth-redirect.tsx │ │ │ │ ├── avatar-dropdown/ │ │ │ │ │ ├── index.tsx │ │ │ │ │ └── plans.tsx │ │ │ │ ├── pricing-modal/ │ │ │ │ │ ├── enterprise-card.tsx │ │ │ │ │ ├── free-card.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── legacy-promotion.tsx │ │ │ │ │ ├── pro-card.tsx │ │ │ │ │ └── use-subscription.tsx │ │ │ │ ├── pricing-table/ │ │ │ │ │ └── index.tsx │ │ │ │ └── settings-modal/ │ │ │ │ ├── domain/ │ │ │ │ │ ├── custom/ │ │ │ │ │ │ ├── headers.tsx │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ ├── no-domain-input.tsx │ │ │ │ │ │ ├── record-field.tsx │ │ │ │ │ │ ├── use-domain-verification.tsx │ │ │ │ │ │ ├── verification.tsx │ │ │ │ │ │ └── verified.tsx │ │ │ │ │ ├── danger-zone.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── preview.tsx │ │ │ │ │ └── upgrade-prompt.tsx │ │ │ │ ├── helpers.tsx │ │ │ │ ├── non-project.tsx │ │ │ │ ├── preferences-tab.tsx │ │ │ │ ├── project/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── site/ │ │ │ │ │ ├── favicon.tsx │ │ │ │ │ ├── image.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── metadata-form.tsx │ │ │ │ │ ├── page.tsx │ │ │ │ │ └── use-metadata-form.ts │ │ │ │ ├── subscription-cancel-modal.tsx │ │ │ │ ├── subscription-tab.tsx │ │ │ │ ├── user-delete-section.tsx │ │ │ │ ├── versions/ │ │ │ │ │ ├── empty-state/ │ │ │ │ │ │ └── version.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── version-row.tsx │ │ │ │ │ └── versions.tsx │ │ │ │ └── with-project.tsx │ │ │ ├── env.ts │ │ │ ├── global.ts │ │ │ ├── hooks/ │ │ │ │ ├── use-create-blank-project.ts │ │ │ │ ├── use-debounce-input.tsx │ │ │ │ ├── use-feature-flags.tsx │ │ │ │ ├── use-font-loader.tsx │ │ │ │ ├── use-get-background.tsx │ │ │ │ └── use-parallax-cursor.ts │ │ │ ├── i18n/ │ │ │ │ ├── keys.ts │ │ │ │ └── request.ts │ │ │ ├── instrumentation.ts │ │ │ ├── proxy.ts │ │ │ ├── server/ │ │ │ │ └── api/ │ │ │ │ ├── root.ts │ │ │ │ ├── routers/ │ │ │ │ │ ├── chat/ │ │ │ │ │ │ ├── conversation.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── message.ts │ │ │ │ │ │ └── suggestion.ts │ │ │ │ │ ├── code.ts │ │ │ │ │ ├── domain/ │ │ │ │ │ │ ├── adapters/ │ │ │ │ │ │ │ └── freestyle.ts │ │ │ │ │ │ ├── custom.ts │ │ │ │ │ │ ├── freestyle.ts │ │ │ │ │ │ ├── hosting-factory.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── preview.ts │ │ │ │ │ │ └── verify/ │ │ │ │ │ │ ├── helpers/ │ │ │ │ │ │ │ ├── freestyle.ts │ │ │ │ │ │ │ ├── helpers.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── records.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── forward/ │ │ │ │ │ │ ├── editor.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── github.ts │ │ │ │ │ ├── image.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── project/ │ │ │ │ │ │ ├── branch.ts │ │ │ │ │ │ ├── createRequest.ts │ │ │ │ │ │ ├── fork.ts │ │ │ │ │ │ ├── frame.ts │ │ │ │ │ │ ├── helper.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── invitation.ts │ │ │ │ │ │ ├── member.ts │ │ │ │ │ │ ├── project.ts │ │ │ │ │ │ ├── sandbox.ts │ │ │ │ │ │ └── settings.ts │ │ │ │ │ ├── publish/ │ │ │ │ │ │ ├── deployment.ts │ │ │ │ │ │ ├── helpers/ │ │ │ │ │ │ │ ├── deploy.ts │ │ │ │ │ │ │ ├── env.ts │ │ │ │ │ │ │ ├── fork.ts │ │ │ │ │ │ │ ├── helpers.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── publish.ts │ │ │ │ │ │ │ └── unpublish.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── manager.ts │ │ │ │ │ ├── subscription/ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── subscription.ts │ │ │ │ │ ├── usage/ │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── user/ │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── user-canvas.ts │ │ │ │ │ ├── user-settings.ts │ │ │ │ │ └── user.ts │ │ │ │ └── trpc.ts │ │ │ ├── services/ │ │ │ │ └── sync-engine/ │ │ │ │ ├── index.ts │ │ │ │ └── sync-engine.ts │ │ │ ├── stories/ │ │ │ │ ├── Button.stories.tsx │ │ │ │ ├── ProjectCard.stories.tsx │ │ │ │ ├── ProjectsPage.stories.tsx │ │ │ │ ├── SelectProject.stories.tsx │ │ │ │ ├── TopBar.stories.tsx │ │ │ │ └── assets/ │ │ │ │ └── avif-test-image.avif │ │ │ ├── styles/ │ │ │ │ └── globals.css │ │ │ ├── trpc/ │ │ │ │ ├── client.ts │ │ │ │ ├── helpers.ts │ │ │ │ ├── query-client.ts │ │ │ │ ├── react.tsx │ │ │ │ ├── request-server.ts │ │ │ │ └── server.ts │ │ │ └── utils/ │ │ │ ├── analytics/ │ │ │ │ └── server.ts │ │ │ ├── constants/ │ │ │ │ ├── index.ts │ │ │ │ └── navigation.ts │ │ │ ├── git/ │ │ │ │ ├── index.test.ts │ │ │ │ └── index.ts │ │ │ ├── n8n/ │ │ │ │ └── webhook.ts │ │ │ ├── subscription.ts │ │ │ ├── supabase/ │ │ │ │ ├── admin.ts │ │ │ │ ├── client/ │ │ │ │ │ └── index.ts │ │ │ │ ├── middleware.ts │ │ │ │ ├── request-server.ts │ │ │ │ └── server.ts │ │ │ ├── telemetry/ │ │ │ │ └── index.ts │ │ │ ├── upload/ │ │ │ │ └── image-compression.ts │ │ │ └── url/ │ │ │ └── index.ts │ │ ├── test/ │ │ │ ├── cache/ │ │ │ │ ├── file-cache.test.ts │ │ │ │ └── unified-cache.test.ts │ │ │ ├── frame/ │ │ │ │ └── navigation.test.ts │ │ │ ├── messages.test.ts │ │ │ ├── pages/ │ │ │ │ └── helper.test.ts │ │ │ ├── sandbox/ │ │ │ │ ├── env.test.ts │ │ │ │ ├── helpers.test.ts │ │ │ │ ├── port.test.ts │ │ │ │ └── subdirectory.test.ts │ │ │ └── setup.ts │ │ ├── tsconfig.json │ │ ├── vercel.json │ │ ├── vitest.config.ts │ │ └── vitest.shims.d.ts │ ├── package.json │ ├── preload/ │ │ ├── .gitignore │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── script/ │ │ │ ├── api/ │ │ │ │ ├── dom.ts │ │ │ │ ├── elements/ │ │ │ │ │ ├── dom/ │ │ │ │ │ │ ├── group.ts │ │ │ │ │ │ ├── helpers.ts │ │ │ │ │ │ ├── image.ts │ │ │ │ │ │ ├── insert.ts │ │ │ │ │ │ └── remove.ts │ │ │ │ │ ├── helpers.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── move/ │ │ │ │ │ │ ├── drag.ts │ │ │ │ │ │ ├── helpers.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── stub.ts │ │ │ │ │ ├── style.ts │ │ │ │ │ └── text.ts │ │ │ │ ├── events/ │ │ │ │ │ ├── dom.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── publish.ts │ │ │ │ ├── index.ts │ │ │ │ ├── ready.ts │ │ │ │ ├── screenshot.ts │ │ │ │ ├── state.ts │ │ │ │ ├── style/ │ │ │ │ │ ├── css-manager.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── update.ts │ │ │ │ └── theme/ │ │ │ │ └── index.ts │ │ │ ├── helpers/ │ │ │ │ ├── assert.ts │ │ │ │ ├── clone.ts │ │ │ │ ├── dom.ts │ │ │ │ ├── ids.ts │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── server/ │ │ │ └── index.ts │ │ └── tsconfig.json │ └── server/ │ ├── .gitignore │ ├── Dockerfile │ ├── README.md │ ├── eslint.config.js │ ├── package.json │ ├── src/ │ │ ├── index.ts │ │ ├── router/ │ │ │ ├── context.ts │ │ │ ├── index.ts │ │ │ ├── routes/ │ │ │ │ └── sandbox.ts │ │ │ └── trpc.ts │ │ ├── sandbox/ │ │ │ └── index.ts │ │ └── server.ts │ └── tsconfig.json ├── bunfig.toml ├── docker-compose.yml ├── docs/ │ ├── .gitignore │ ├── README.md │ ├── content/ │ │ └── docs/ │ │ ├── developers/ │ │ │ ├── appendix.mdx │ │ │ ├── architecture.mdx │ │ │ ├── index.mdx │ │ │ ├── meta.json │ │ │ ├── running-locally.mdx │ │ │ └── troubleshooting.mdx │ │ ├── enterprise.mdx │ │ ├── faq.mdx │ │ ├── getting-started/ │ │ │ ├── core-features.mdx │ │ │ ├── first-project.mdx │ │ │ ├── meta.json │ │ │ └── ui-overview.mdx │ │ ├── index.mdx │ │ ├── meta.json │ │ ├── migrations/ │ │ │ └── electron-to-web-migration.mdx │ │ ├── self-hosting/ │ │ │ ├── admin-dashboard.mdx │ │ │ ├── cloud-deployment.mdx │ │ │ ├── docker-compose.mdx │ │ │ ├── external-services.mdx │ │ │ ├── index.mdx │ │ │ ├── meta.json │ │ │ ├── oauth-setup.mdx │ │ │ └── single-machine.mdx │ │ └── tutorials/ │ │ ├── figma-to-onlook.mdx │ │ └── importing-templates.mdx │ ├── eslint.config.js │ ├── next-sitemap.config.js │ ├── next.config.ts │ ├── package.json │ ├── postcss.config.mjs │ ├── public/ │ │ ├── sitemap-0.xml │ │ └── sitemap.xml │ ├── source.config.ts │ ├── src/ │ │ ├── app/ │ │ │ ├── [[...slug]]/ │ │ │ │ ├── edit-button.tsx │ │ │ │ ├── edit-gh.tsx │ │ │ │ └── page.tsx │ │ │ ├── api/ │ │ │ │ └── search/ │ │ │ │ └── route.ts │ │ │ ├── global.css │ │ │ ├── layout.config.tsx │ │ │ ├── layout.tsx │ │ │ ├── not-found.tsx │ │ │ └── robots.txt/ │ │ │ └── route.ts │ │ ├── components/ │ │ │ ├── card.tsx │ │ │ ├── cards.tsx │ │ │ └── rb2b-loader.tsx │ │ ├── lib/ │ │ │ └── source.ts │ │ └── mdx-components.tsx │ └── tsconfig.json ├── eslint.config.js ├── package.json ├── packages/ │ ├── ai/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── agents/ │ │ │ │ ├── index.ts │ │ │ │ ├── root.ts │ │ │ │ └── tool-lookup.ts │ │ │ ├── apply/ │ │ │ │ ├── client.ts │ │ │ │ └── index.ts │ │ │ ├── chat/ │ │ │ │ ├── index.ts │ │ │ │ └── providers.ts │ │ │ ├── contexts/ │ │ │ │ ├── classes/ │ │ │ │ │ ├── agent-rule.ts │ │ │ │ │ ├── branch.ts │ │ │ │ │ ├── error.ts │ │ │ │ │ ├── file.ts │ │ │ │ │ ├── highlight.ts │ │ │ │ │ ├── image.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── helpers.ts │ │ │ │ ├── index.ts │ │ │ │ └── models/ │ │ │ │ ├── base.ts │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── prompt/ │ │ │ │ ├── constants/ │ │ │ │ │ ├── ask.ts │ │ │ │ │ ├── base.ts │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── format.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── onlook.ts │ │ │ │ │ ├── shell.ts │ │ │ │ │ ├── signatures.ts │ │ │ │ │ ├── suggest.ts │ │ │ │ │ ├── summary.ts │ │ │ │ │ └── system.ts │ │ │ │ ├── helpers.ts │ │ │ │ ├── index.ts │ │ │ │ └── provider.ts │ │ │ ├── stream/ │ │ │ │ ├── converter.ts │ │ │ │ └── index.ts │ │ │ ├── tokens/ │ │ │ │ └── index.ts │ │ │ └── tools/ │ │ │ ├── classes/ │ │ │ │ ├── bash-edit.ts │ │ │ │ ├── bash-read.ts │ │ │ │ ├── check-errors.ts │ │ │ │ ├── fuzzy-edit-file.ts │ │ │ │ ├── glob.ts │ │ │ │ ├── grep.ts │ │ │ │ ├── index.ts │ │ │ │ ├── list-branches.ts │ │ │ │ ├── list-files.ts │ │ │ │ ├── onlook-instructions.ts │ │ │ │ ├── read-file.ts │ │ │ │ ├── read-style-guide.ts │ │ │ │ ├── sandbox.ts │ │ │ │ ├── scrape-url.ts │ │ │ │ ├── search-replace-edit.ts │ │ │ │ ├── search-replace-multi-edit.ts │ │ │ │ ├── terminal-command.ts │ │ │ │ ├── typecheck.ts │ │ │ │ ├── upload-image.ts │ │ │ │ ├── web-search.ts │ │ │ │ └── write-file.ts │ │ │ ├── index.ts │ │ │ ├── models/ │ │ │ │ ├── base.ts │ │ │ │ ├── client.ts │ │ │ │ └── index.ts │ │ │ ├── shared/ │ │ │ │ ├── helpers/ │ │ │ │ │ ├── cli.ts │ │ │ │ │ └── files.ts │ │ │ │ └── type.ts │ │ │ └── toolset.ts │ │ ├── test/ │ │ │ ├── apply.test.ts │ │ │ ├── contexts/ │ │ │ │ ├── agent-rule-context.test.ts │ │ │ │ ├── branch-context.test.ts │ │ │ │ ├── error-context.test.ts │ │ │ │ ├── file-context.test.ts │ │ │ │ ├── highlight-context.test.ts │ │ │ │ ├── image-context.test.ts │ │ │ │ └── index.test.ts │ │ │ ├── prompt/ │ │ │ │ ├── data/ │ │ │ │ │ ├── create-page-system.txt │ │ │ │ │ ├── examples.txt │ │ │ │ │ ├── file.txt │ │ │ │ │ ├── highlights.txt │ │ │ │ │ ├── summary.txt │ │ │ │ │ ├── system.txt │ │ │ │ │ ├── user-empty.txt │ │ │ │ │ └── user.txt │ │ │ │ └── prompt.test.ts │ │ │ ├── stream/ │ │ │ │ └── convert.test.ts │ │ │ ├── tokens.test.ts │ │ │ └── tools/ │ │ │ ├── edit.test.ts │ │ │ ├── helpers.test.ts │ │ │ └── read.test.ts │ │ └── tsconfig.json │ ├── code-provider/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── providers/ │ │ │ │ ├── codesandbox/ │ │ │ │ │ ├── index.ts │ │ │ │ │ └── utils/ │ │ │ │ │ ├── list-files.ts │ │ │ │ │ ├── read-file.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ ├── utils.ts │ │ │ │ │ └── write-file.ts │ │ │ │ └── nodefs/ │ │ │ │ └── index.ts │ │ │ ├── providers.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── constants/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── colors.ts │ │ │ ├── contact.ts │ │ │ ├── csb.ts │ │ │ ├── dom.ts │ │ │ ├── editor.ts │ │ │ ├── files.ts │ │ │ ├── frame.ts │ │ │ ├── freestyle.ts │ │ │ ├── index.ts │ │ │ ├── language.ts │ │ │ ├── links.ts │ │ │ ├── storage.ts │ │ │ ├── style.ts │ │ │ └── tags.ts │ │ └── tsconfig.json │ ├── db/ │ │ ├── drizzle.config.ts │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── client.ts │ │ │ ├── defaults/ │ │ │ │ ├── branch.ts │ │ │ │ ├── canvas.ts │ │ │ │ ├── conversation.ts │ │ │ │ ├── frame.ts │ │ │ │ ├── index.ts │ │ │ │ ├── project-settings.ts │ │ │ │ ├── project.ts │ │ │ │ ├── user-canvas.ts │ │ │ │ └── user-settings.ts │ │ │ ├── index.ts │ │ │ ├── mappers/ │ │ │ │ ├── chat/ │ │ │ │ │ ├── conversation.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── message.ts │ │ │ │ ├── domain.ts │ │ │ │ ├── index.ts │ │ │ │ ├── project/ │ │ │ │ │ ├── branch.ts │ │ │ │ │ ├── canvas.ts │ │ │ │ │ ├── frame.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── project.ts │ │ │ │ │ └── settings.ts │ │ │ │ ├── subscription.ts │ │ │ │ └── user/ │ │ │ │ ├── index.ts │ │ │ │ ├── settings.ts │ │ │ │ └── user.ts │ │ │ ├── migration-scripts/ │ │ │ │ ├── README.md │ │ │ │ └── migrate-to-branching.ts │ │ │ ├── schema/ │ │ │ │ ├── canvas/ │ │ │ │ │ ├── canvas.ts │ │ │ │ │ ├── frame.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── chat/ │ │ │ │ │ ├── conversation.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── message.ts │ │ │ │ ├── domain/ │ │ │ │ │ ├── custom/ │ │ │ │ │ │ ├── domain.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── project-custom-domain.ts │ │ │ │ │ │ └── verification.ts │ │ │ │ │ ├── deployment.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── preview.ts │ │ │ │ ├── feedback/ │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── project/ │ │ │ │ │ ├── branch.ts │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── invitation.ts │ │ │ │ │ ├── project.ts │ │ │ │ │ └── settings.ts │ │ │ │ ├── subscription/ │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── legacy.ts │ │ │ │ │ ├── price.ts │ │ │ │ │ ├── product.ts │ │ │ │ │ ├── rate-limits.ts │ │ │ │ │ ├── subscription.ts │ │ │ │ │ └── usage.ts │ │ │ │ ├── supabase/ │ │ │ │ │ ├── index.ts │ │ │ │ │ └── user.ts │ │ │ │ └── user/ │ │ │ │ ├── index.ts │ │ │ │ ├── settings.ts │ │ │ │ ├── user-canvas.ts │ │ │ │ ├── user-project.ts │ │ │ │ └── user.ts │ │ │ └── seed/ │ │ │ ├── constants.ts │ │ │ ├── db.ts │ │ │ ├── reset.ts │ │ │ ├── seed.ts │ │ │ ├── stripe/ │ │ │ │ ├── .gitignore │ │ │ │ ├── backfill-subscriptions.ts │ │ │ │ ├── legacy-subscription.ts │ │ │ │ └── stripe.ts │ │ │ └── supabase.ts │ │ └── tsconfig.json │ ├── email/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── client.ts │ │ │ ├── index.ts │ │ │ ├── invitation.ts │ │ │ ├── templates/ │ │ │ │ ├── index.ts │ │ │ │ └── invite-user.tsx │ │ │ └── types/ │ │ │ └── send-email.ts │ │ └── tsconfig.json │ ├── file-system/ │ │ ├── README.md │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── code-fs.ts │ │ │ ├── config.ts │ │ │ ├── fs.ts │ │ │ ├── hooks/ │ │ │ │ ├── index.ts │ │ │ │ ├── use-dir.ts │ │ │ │ ├── use-file.ts │ │ │ │ └── use-fs.tsx │ │ │ ├── index-cache.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── fonts/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── default.ts │ │ │ ├── family.ts │ │ │ ├── helpers/ │ │ │ │ ├── ast-generators.ts │ │ │ │ ├── ast-manipulators.ts │ │ │ │ ├── class-utils.ts │ │ │ │ ├── font-extractors.ts │ │ │ │ ├── import-export-manager.ts │ │ │ │ ├── index.ts │ │ │ │ └── validators.ts │ │ │ ├── index.ts │ │ │ ├── utils.ts │ │ │ └── variants.ts │ │ ├── test/ │ │ │ ├── ast-generators.test.ts │ │ │ ├── ast-manipulators.test.ts │ │ │ ├── class-utils.test.ts │ │ │ ├── data/ │ │ │ │ ├── ast-manipulators/ │ │ │ │ │ ├── add-font-to-tailwind-theme/ │ │ │ │ │ │ ├── existing-fontfamily/ │ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ ├── font-already-exists/ │ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ └── new-fontfamily/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── add-google-font-specifier/ │ │ │ │ │ │ ├── existing-import/ │ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ └── no-import/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── merge-local-font-sources/ │ │ │ │ │ │ ├── array-to-array/ │ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ ├── empty-array/ │ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ ├── no-src-property/ │ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ └── single-to-array/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── remove-font-declaration/ │ │ │ │ │ │ ├── google-font/ │ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ ├── last-google-font/ │ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ ├── local-font/ │ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ └── multiple-fonts/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ └── remove-font-from-tailwind-theme/ │ │ │ │ │ ├── multiple-fonts/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── non-existent-font/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ └── single-font/ │ │ │ │ │ ├── config.json │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ ├── create-font-src-objects/ │ │ │ │ │ ├── basic-sources/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ └── expected.ts │ │ │ │ │ ├── multiple-formats/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ └── expected.ts │ │ │ │ │ └── optional-properties/ │ │ │ │ │ ├── config.json │ │ │ │ │ └── expected.ts │ │ │ │ ├── create-local-font-config/ │ │ │ │ │ ├── basic-local-font/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ └── expected.ts │ │ │ │ │ └── complex-font-name/ │ │ │ │ │ ├── config.json │ │ │ │ │ └── expected.ts │ │ │ │ ├── create-template-literal-with-font/ │ │ │ │ │ ├── conditional-expression/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── empty-string/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── function-call-expression/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── identifier-expression/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── member-expression/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ └── string-literal/ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ ├── font-extractors/ │ │ │ │ │ ├── migrate-fonts-from-layout/ │ │ │ │ │ │ ├── complex-layout/ │ │ │ │ │ │ │ ├── expected.json │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ ├── layout-with-classnames/ │ │ │ │ │ │ │ ├── expected.json │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ └── simple-layout/ │ │ │ │ │ │ ├── expected.json │ │ │ │ │ │ └── input.tsx │ │ │ │ │ └── parse-font-declarations/ │ │ │ │ │ ├── google-fonts/ │ │ │ │ │ │ ├── expected.json │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── local-fonts/ │ │ │ │ │ │ ├── expected.json │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── mixed-fonts/ │ │ │ │ │ │ ├── expected.json │ │ │ │ │ │ └── input.tsx │ │ │ │ │ └── no-fonts/ │ │ │ │ │ ├── expected.json │ │ │ │ │ └── input.tsx │ │ │ │ ├── generate-font-variable-export/ │ │ │ │ │ ├── basic-google-font/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ └── expected.ts │ │ │ │ │ ├── local-font-type/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ └── expected.ts │ │ │ │ │ ├── missing-optional-props/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ └── expected.ts │ │ │ │ │ ├── multiple-weights-styles/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ └── expected.ts │ │ │ │ │ └── special-characters/ │ │ │ │ │ ├── config.json │ │ │ │ │ └── expected.ts │ │ │ │ ├── remove-fonts-classname/ │ │ │ │ │ ├── font-weight-preservation/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── member-expression-remove-all/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── member-expression-remove-font/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── string-literal-empty/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── string-literal-no-fonts/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── string-literal-remove-all/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── string-literal-specific-fonts/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── template-literal-complex-expressions/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── template-literal-multiple-fonts/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── template-literal-remove-all/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── template-literal-specific-font/ │ │ │ │ │ │ ├── config.json │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ └── template-literal-static-only/ │ │ │ │ │ ├── config.json │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ ├── update-classname-with-font-var/ │ │ │ │ │ ├── jsx-expression-classname/ │ │ │ │ │ │ ├── already-has-font/ │ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ ├── identifier-expression/ │ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ │ └── input.tsx │ │ │ │ │ │ └── template-literal-existing/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ └── string-literal-classname/ │ │ │ │ │ ├── empty-string/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── with-existing-classes/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ └── with-font-classes/ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ └── update-template-literal-with-font-class/ │ │ │ │ ├── complex-template/ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ ├── empty-template/ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ ├── font-weight-preservation/ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ ├── multiple-expressions/ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ ├── multiple-font-classes/ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ ├── replace-existing-font/ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ ├── with-existing-classes/ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ └── with-leading-space/ │ │ │ │ ├── expected.tsx │ │ │ │ └── input.tsx │ │ │ ├── font-extractors.test.ts │ │ │ ├── import-export-manager.test.ts │ │ │ ├── test-utils.ts │ │ │ └── validators.test.ts │ │ └── tsconfig.json │ ├── git/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── git.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── github/ │ │ ├── README.md │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── auth.ts │ │ │ ├── config.ts │ │ │ ├── index.ts │ │ │ ├── installation.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── growth/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ ├── inject.ts │ │ │ ├── remove.ts │ │ │ └── script.ts │ │ ├── tests/ │ │ │ └── inject.test.ts │ │ └── tsconfig.json │ ├── image-server/ │ │ ├── README.md │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── compress.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── test/ │ │ │ └── image.test.ts │ │ └── tsconfig.json │ ├── models/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── actions/ │ │ │ │ ├── action.ts │ │ │ │ ├── code.ts │ │ │ │ ├── index.ts │ │ │ │ ├── location.ts │ │ │ │ └── target.ts │ │ │ ├── assets/ │ │ │ │ └── index.ts │ │ │ ├── auth/ │ │ │ │ └── index.ts │ │ │ ├── chat/ │ │ │ │ ├── conversation/ │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── message/ │ │ │ │ │ ├── checkpoint.ts │ │ │ │ │ ├── code.ts │ │ │ │ │ ├── context.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── message.ts │ │ │ │ │ └── queue.ts │ │ │ │ ├── request.ts │ │ │ │ ├── response.ts │ │ │ │ ├── suggestion.ts │ │ │ │ ├── summary.ts │ │ │ │ └── type.ts │ │ │ ├── code/ │ │ │ │ └── index.ts │ │ │ ├── create/ │ │ │ │ └── index.ts │ │ │ ├── domain/ │ │ │ │ └── index.ts │ │ │ ├── editor/ │ │ │ │ └── index.ts │ │ │ ├── element/ │ │ │ │ ├── classes.ts │ │ │ │ ├── element.ts │ │ │ │ ├── index.ts │ │ │ │ ├── layers.ts │ │ │ │ ├── props.ts │ │ │ │ └── templateNode.ts │ │ │ ├── font/ │ │ │ │ └── index.ts │ │ │ ├── hosting/ │ │ │ │ └── index.ts │ │ │ ├── ide/ │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── llm/ │ │ │ │ └── index.ts │ │ │ ├── next/ │ │ │ │ └── index.ts │ │ │ ├── pages/ │ │ │ │ ├── index.ts │ │ │ │ └── opengraph.ts │ │ │ ├── project/ │ │ │ │ ├── branch.ts │ │ │ │ ├── canvas.ts │ │ │ │ ├── command.ts │ │ │ │ ├── create.ts │ │ │ │ ├── frame.ts │ │ │ │ ├── index.ts │ │ │ │ ├── project.ts │ │ │ │ ├── rect.ts │ │ │ │ ├── role.ts │ │ │ │ └── settings.ts │ │ │ ├── run/ │ │ │ │ └── index.ts │ │ │ ├── sandbox/ │ │ │ │ ├── files.ts │ │ │ │ ├── folder.ts │ │ │ │ ├── index.ts │ │ │ │ └── template.ts │ │ │ ├── style/ │ │ │ │ └── index.ts │ │ │ ├── supabase/ │ │ │ │ └── db.ts │ │ │ ├── tools/ │ │ │ │ └── index.ts │ │ │ ├── usage/ │ │ │ │ └── index.ts │ │ │ └── user/ │ │ │ ├── index.ts │ │ │ ├── settings.ts │ │ │ └── user.ts │ │ └── tsconfig.json │ ├── parser/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── code-edit/ │ │ │ │ ├── group.ts │ │ │ │ ├── helpers.ts │ │ │ │ ├── image.ts │ │ │ │ ├── index.ts │ │ │ │ ├── insert.ts │ │ │ │ ├── layout.ts │ │ │ │ ├── move.ts │ │ │ │ ├── next-config.ts │ │ │ │ ├── remove.ts │ │ │ │ ├── style.ts │ │ │ │ ├── text.ts │ │ │ │ └── transform.ts │ │ │ ├── helpers.ts │ │ │ ├── ids.ts │ │ │ ├── index.ts │ │ │ ├── packages.ts │ │ │ ├── parse.ts │ │ │ ├── prettier/ │ │ │ │ └── index.ts │ │ │ └── template-node/ │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ └── map.ts │ │ ├── test/ │ │ │ ├── data/ │ │ │ │ ├── ids/ │ │ │ │ │ ├── adds-ids-to-jsx/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ └── does-not-add-ids-if-exist/ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ ├── layout/ │ │ │ │ │ ├── adds-script-if-missing/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── creates-body/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── does-not-duplicate/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── handles-self-closing-body/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── handles-self-closing-html-head/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── injects-at-bottom/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── injects-in-first-body/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── injects-with-existing-head-script/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── preserves-body-props/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── removes-deprecated-script/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── removes-deprecated-script-multiple/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── wraps-conditional-ternary/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ ├── wraps-fragment-only/ │ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ │ └── input.tsx │ │ │ │ │ └── wraps-plain-children/ │ │ │ │ │ ├── expected.tsx │ │ │ │ │ └── input.tsx │ │ │ │ ├── next-config/ │ │ │ │ │ ├── add-basic-js/ │ │ │ │ │ │ ├── expected.js │ │ │ │ │ │ └── input.js │ │ │ │ │ ├── add-basic-mjs/ │ │ │ │ │ │ ├── expected.mjs │ │ │ │ │ │ └── input.mjs │ │ │ │ │ ├── add-basic-ts/ │ │ │ │ │ │ ├── expected.ts │ │ │ │ │ │ └── input.ts │ │ │ │ │ ├── alternative-name-config/ │ │ │ │ │ │ ├── expected.js │ │ │ │ │ │ └── input.js │ │ │ │ │ ├── complex-nested-objects/ │ │ │ │ │ │ ├── expected.js │ │ │ │ │ │ └── input.js │ │ │ │ │ ├── direct-return-from-function/ │ │ │ │ │ │ ├── expected.js │ │ │ │ │ │ └── input.js │ │ │ │ │ ├── empty-config/ │ │ │ │ │ │ ├── expected.js │ │ │ │ │ │ └── input.js │ │ │ │ │ ├── exported-as-function/ │ │ │ │ │ │ ├── expected.js │ │ │ │ │ │ └── input.js │ │ │ │ │ ├── iife-wrapped-config/ │ │ │ │ │ │ ├── expected.js │ │ │ │ │ │ └── input.js │ │ │ │ │ ├── merge-typescript-props/ │ │ │ │ │ │ ├── expected.js │ │ │ │ │ │ └── input.js │ │ │ │ │ ├── no-duplicate-props/ │ │ │ │ │ │ ├── expected.js │ │ │ │ │ │ └── input.js │ │ │ │ │ ├── with-mdx/ │ │ │ │ │ │ ├── expected.js │ │ │ │ │ │ └── input.js │ │ │ │ │ ├── with-mdx-alt-name-order/ │ │ │ │ │ │ ├── expected.js │ │ │ │ │ │ └── input.js │ │ │ │ │ ├── with-mdx-alt-order/ │ │ │ │ │ │ ├── expected.js │ │ │ │ │ │ └── input.js │ │ │ │ │ └── with-plugin/ │ │ │ │ │ ├── expected.js │ │ │ │ │ └── input.js │ │ │ │ └── parse/ │ │ │ │ └── simple/ │ │ │ │ ├── expected.js │ │ │ │ └── input.js │ │ │ ├── helpers.test.ts │ │ │ ├── ids.test.ts │ │ │ ├── layout.test.ts │ │ │ ├── next-config.test.ts │ │ │ ├── parse.test.ts │ │ │ ├── preload.test.ts │ │ │ └── template.test.ts │ │ └── tsconfig.json │ ├── penpal/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── child.ts │ │ │ ├── index.ts │ │ │ └── parent.ts │ │ └── tsconfig.json │ ├── rpc/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.ts │ │ │ └── trpc/ │ │ │ ├── config.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── scripts/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── api-keys.ts │ │ │ ├── backend.ts │ │ │ ├── helpers.ts │ │ │ └── index.ts │ │ ├── test/ │ │ │ ├── comprehensive.test.ts │ │ │ ├── integration.test.ts │ │ │ └── simple.test.ts │ │ └── tsconfig.json │ ├── stripe/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── client.ts │ │ │ ├── constants.ts │ │ │ ├── functions.ts │ │ │ ├── index.ts │ │ │ ├── scripts/ │ │ │ │ ├── dev/ │ │ │ │ │ ├── customer.ts │ │ │ │ │ ├── product.ts │ │ │ │ │ ├── reset.ts │ │ │ │ │ └── setup.ts │ │ │ │ └── production/ │ │ │ │ ├── coupon.ts │ │ │ │ └── product-price.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── types/ │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── adapters/ │ │ │ │ ├── index.ts │ │ │ │ └── props.ts │ │ │ ├── design-tokens/ │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── ui/ │ │ ├── README.md │ │ ├── components.json │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── postcss.config.js │ │ ├── src/ │ │ │ ├── components/ │ │ │ │ ├── accordion.tsx │ │ │ │ ├── ai-elements/ │ │ │ │ │ ├── code-block.tsx │ │ │ │ │ ├── context.tsx │ │ │ │ │ ├── conversation.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── reasoning.tsx │ │ │ │ │ ├── response.tsx │ │ │ │ │ ├── tool.tsx │ │ │ │ │ └── web-preview.tsx │ │ │ │ ├── alert-dialog.tsx │ │ │ │ ├── alert.tsx │ │ │ │ ├── aspect-ratio.tsx │ │ │ │ ├── avatar.tsx │ │ │ │ ├── badge.tsx │ │ │ │ ├── breadcrumb.tsx │ │ │ │ ├── button.tsx │ │ │ │ ├── calendar.tsx │ │ │ │ ├── card.tsx │ │ │ │ ├── chart.tsx │ │ │ │ ├── checkbox.tsx │ │ │ │ ├── collapsible.tsx │ │ │ │ ├── color-picker/ │ │ │ │ │ ├── ColorPicker.tsx │ │ │ │ │ ├── ColorSlider.tsx │ │ │ │ │ ├── EyeDropperButton.tsx │ │ │ │ │ ├── Gradient.tsx │ │ │ │ │ ├── SVPicker.tsx │ │ │ │ │ ├── checkPattern.ts │ │ │ │ │ └── index.tsx │ │ │ │ ├── command.tsx │ │ │ │ ├── context-menu.tsx │ │ │ │ ├── dialog.tsx │ │ │ │ ├── draftable-input.tsx │ │ │ │ ├── drawer.tsx │ │ │ │ ├── dropdown-menu.tsx │ │ │ │ ├── form.tsx │ │ │ │ ├── hotkey-label.tsx │ │ │ │ ├── hover-card.tsx │ │ │ │ ├── icons/ │ │ │ │ │ ├── header-level-icons/ │ │ │ │ │ │ ├── h1Icon.tsx │ │ │ │ │ │ ├── h2Icon.tsx │ │ │ │ │ │ ├── h3Icon.tsx │ │ │ │ │ │ ├── h4Icon.tsx │ │ │ │ │ │ ├── h5Icon.tsx │ │ │ │ │ │ └── h6Icon.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── index.tsx │ │ │ │ ├── input-group.tsx │ │ │ │ ├── input-otp.tsx │ │ │ │ ├── input.tsx │ │ │ │ ├── kbd.tsx │ │ │ │ ├── label.tsx │ │ │ │ ├── menubar.tsx │ │ │ │ ├── motion-card.tsx │ │ │ │ ├── navigation-menu.tsx │ │ │ │ ├── node-icon.tsx │ │ │ │ ├── pagination.tsx │ │ │ │ ├── popover.tsx │ │ │ │ ├── progress-with-interval.tsx │ │ │ │ ├── progress.tsx │ │ │ │ ├── radio-group.tsx │ │ │ │ ├── resizable.tsx │ │ │ │ ├── scroll-area.tsx │ │ │ │ ├── select.tsx │ │ │ │ ├── separator.tsx │ │ │ │ ├── sheet.tsx │ │ │ │ ├── shine-border.tsx │ │ │ │ ├── sidebar.tsx │ │ │ │ ├── skeleton.tsx │ │ │ │ ├── slider.tsx │ │ │ │ ├── sonner.tsx │ │ │ │ ├── switch.tsx │ │ │ │ ├── table.tsx │ │ │ │ ├── tabs.tsx │ │ │ │ ├── textarea.tsx │ │ │ │ ├── toggle-group.tsx │ │ │ │ ├── toggle.tsx │ │ │ │ └── tooltip.tsx │ │ │ ├── globals.css │ │ │ ├── hooks/ │ │ │ │ ├── index.ts │ │ │ │ ├── use-enter-submit.ts │ │ │ │ ├── use-media-query.ts │ │ │ │ ├── use-mobile.ts │ │ │ │ ├── use-pointer-stroke.tsx │ │ │ │ ├── use-reduced-motion.ts │ │ │ │ └── use-resize-observer.ts │ │ │ ├── index.ts │ │ │ └── utils/ │ │ │ ├── cn.ts │ │ │ ├── index.ts │ │ │ └── truncate.ts │ │ ├── tailwind.config.ts │ │ ├── test/ │ │ │ └── Gradient.test.ts │ │ ├── tokens.ts │ │ └── tsconfig.json │ └── utility/ │ ├── eslint.config.js │ ├── package.json │ ├── src/ │ │ ├── assert.ts │ │ ├── autolayout.ts │ │ ├── clone.ts │ │ ├── color.ts │ │ ├── domain.test.ts │ │ ├── domain.ts │ │ ├── email.ts │ │ ├── errors.ts │ │ ├── file.ts │ │ ├── folder.ts │ │ ├── font.ts │ │ ├── frame.ts │ │ ├── id.ts │ │ ├── image.ts │ │ ├── index.ts │ │ ├── initials.ts │ │ ├── math.ts │ │ ├── name.ts │ │ ├── null.ts │ │ ├── path.ts │ │ ├── screenshot.ts │ │ ├── string.ts │ │ ├── tailwind.ts │ │ ├── time.ts │ │ ├── tw-merge.ts │ │ ├── unit.ts │ │ ├── urls.ts │ │ └── window-metadata.ts │ ├── test/ │ │ ├── colors.test.ts │ │ ├── domain.test.ts │ │ ├── errors.test.ts │ │ ├── file.test.ts │ │ ├── frame.ts │ │ ├── id.test.ts │ │ ├── image.test.ts │ │ ├── name.test.ts │ │ ├── path.test.ts │ │ ├── tailwind.test.ts │ │ ├── tw-merge.test.ts │ │ └── urls.test.ts │ └── tsconfig.json └── tooling/ ├── eslint/ │ ├── base.js │ ├── nextjs.js │ ├── package.json │ ├── react.js │ └── tsconfig.json ├── prettier/ │ ├── index.js │ ├── package.json │ └── tsconfig.json └── typescript/ ├── base.json ├── next-react.json ├── package.json ├── react-library.json └── vite-react.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .dockerignore ================================================ node_modules .git .gitignore README.md .env .env.local .env.*.local npm-debug.log* yarn-debug.log* yarn-error.log* .next .vercel *.tsbuildinfo .DS_Store coverage .nyc_output dist build .vscode .idea *.log .next # Parts of the app that does not need to be deployed apps/web/backend assets ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.md ================================================ --- name: 🐞 Bug report about: Create a report to help us improve title: "[bug] the title of bug report" labels: bug assignees: '' --- #### Describe the bug ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.md ================================================ --- name: ✨ Feature request about: Create a feature request title: "[feat] the title of the request" labels: enhancement assignees: '' --- #### Describe the feature ================================================ FILE: .github/ISSUE_TEMPLATE/help_wanted.md ================================================ --- name: 🥺 Help wanted about: Confuse about the use of Onlook title: "[Help] the title of help wanted report" labels: help wanted assignees: '' --- #### Describe the problem you confuse ================================================ FILE: .github/dependabot.yml ================================================ # To get started with Dependabot version updates, you'll need to specify which # package ecosystems to update and where the package manifests are located. # Please see the documentation for all configuration options: # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 updates: - package-ecosystem: "npm" # See documentation for possible values directory: "/" # Location of package manifests schedule: interval: "monthly" ================================================ FILE: .github/pull_request_template.md ================================================ ## Description ## Related Issues ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Documentation - [ ] Refactor - [ ] Other (please describe): ## Testing ## Screenshots (if applicable) ## Additional Notes ================================================ FILE: .github/workflows/chromatic.yml ================================================ name: Chromatic on: push jobs: chromatic: name: Run Chromatic runs-on: ubuntu-latest env: SKIP_ENV_VALIDATION: true steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Bun uses: oven-sh/setup-bun@v2 with: bun-version: 1.3.1 - name: Install dependencies run: bun install --frozen-lockfile - name: Run Chromatic uses: chromaui/action@latest with: projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} workingDir: apps/web/client buildScriptName: build-storybook ================================================ FILE: .github/workflows/ci.yml ================================================ name: CI on: pull_request: push: branches: [main] jobs: # TODO: Enable lint job after applying lint fixes and setting appropriate warning limits # Will be handled in follow-up PR to avoid blocking CI setup / bloating this PR # lint: # name: Lint # runs-on: ubuntu-latest # steps: # - uses: actions/checkout@v4 # - uses: oven-sh/setup-bun@v1 # with: # bun-version: 1.3.1 # - name: Cache dependencies # uses: actions/cache@v4 # with: # path: | # ~/.bun/install/cache # key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }} # - name: Install dependencies # run: bun install --frozen # - name: Run linter # run: bun lint typecheck: name: Typecheck runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 with: bun-version: 1.3.1 - name: Cache dependencies uses: actions/cache@v4 with: path: | ~/.bun/install/cache key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }} - name: Install dependencies run: bun install --frozen - name: Run type checking run: bun typecheck test: name: Unit Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 with: bun-version: 1.3.1 - name: Cache dependencies uses: actions/cache@v4 with: path: | ~/.bun/install/cache key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }} - name: Install dependencies run: bun install --frozen - name: Run tests run: bun test --timeout 30000 --coverage ================================================ FILE: .github/workflows/supabase-push-staging.yml ================================================ name: Push Supabase Drizzle Schema to Staging Environment on: workflow_dispatch: jobs: migrate: runs-on: ubuntu-latest env: SUPABASE_DATABASE_URL: ${{ secrets.STAGING_SUPABASE_DATABASE_URL }} steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 with: bun-version: latest - name: Install dependencies run: bun install - name: Run migrations run: bun run db:push ================================================ FILE: .gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* node_modules dist dist-ssr dist-electron release *.local # Editor directories and files .vscode/.debug.env .vscode/settings.json .idea .DS_Store *.suo *.ntvs* *.njsproj *.sln *.sw? #lockfile package-lock.json pnpm-lock.yaml yarn.lock /test-results/ /playwright-report/ /playwright/.cache/ # Env variables .env .env.production .env.development .env.test .env.local .env.development.local .env.test.local .env.production.local mise.toml # Temporary files .tmp/ ================================================ FILE: .gitmodules ================================================ [submodule "apps/admin"] path = apps/admin url = https://github.com/onlook-dev/admin.git ================================================ FILE: .prettierignore ================================================ dist-electron dist node_modules release demos test/data ================================================ FILE: .vscode/.debug.script.mjs ================================================ import fs from 'node:fs' import path from 'node:path' import { fileURLToPath } from 'node:url' import { createRequire } from 'node:module' import { spawn } from 'node:child_process' const pkg = createRequire(import.meta.url)('../apps/studio/package.json') const __dirname = path.dirname(fileURLToPath(import.meta.url)) // write .debug.env const envContent = Object.entries(pkg.debug.env).map(([key, val]) => `${key}=${val}`) fs.writeFileSync(path.join(__dirname, '.debug.env'), envContent.join('\n')) // bootstrap spawn( process.platform === 'win32' ? 'npm.cmd' : 'npm', ['run', 'dev'], { stdio: 'inherit', env: Object.assign(process.env, { VSCODE_DEBUG: 'true' }), }, ) ================================================ FILE: .vscode/extensions.json ================================================ { // See http://go.microsoft.com/fwlink/?LinkId=827846 // for the documentation about the extensions.json format "recommendations": ["mrmlnc.vscode-json5", "dbaeumer.vscode-eslint"] } ================================================ FILE: .vscode/launch.json ================================================ { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "compounds": [ { "name": "Debug App", "preLaunchTask": "Before Debug", "configurations": [ "Debug Main Process", "Debug Renderer Process" ], "presentation": { "hidden": false, "group": "", "order": 1 }, "stopAll": true } ], "configurations": [ { "name": "Debug Main Process", "type": "node", "request": "launch", "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron", "windows": { "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd" }, "runtimeArgs": [ "--no-sandbox", "--remote-debugging-port=9229", "." ], "envFile": "${workspaceFolder}/.vscode/.debug.env", "console": "integratedTerminal" }, { "name": "Debug Renderer Process", "port": 9229, "request": "attach", "type": "chrome", "timeout": 60000, "skipFiles": [ "/**", "${workspaceRoot}/node_modules/**", "${workspaceRoot}/dist-electron/**", // Skip files in host(VITE_DEV_SERVER_URL) "http://127.0.0.1:7777/**" ] }, ] } ================================================ FILE: .vscode/tasks.json ================================================ { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "Before Debug", "type": "shell", "command": "node .vscode/.debug.script.mjs", "isBackground": true, "problemMatcher": { "owner": "typescript", "fileLocation": "relative", "pattern": { "regexp": "^([a-zA-Z]\\:\/?([\\w\\-]\/?)+\\.\\w+):(\\d+):(\\d+): (ERROR|WARNING)\\: (.*)$", "file": 1, "line": 3, "column": 4, "code": 5, "message": 6 }, "background": { "activeOnStart": true, "beginsPattern": "^.*VITE v.* ready in \\d* ms.*$", "endsPattern": "^.*\\[startup\\] Electron App.*$" } } } ] } ================================================ FILE: AGENTS.md ================================================ ## Onlook Agents Guide Actionable rules for repo agents—keep diffs minimal, safe, token‑efficient. ### Purpose & Scope - Audience: automated coding agents working within this repository. - Goal: small, correct diffs aligned with the project’s architecture. - Non-goals: editing generated artifacts, lockfiles, or `node_modules`. ### Repo Map - Monorepo managed by Bun workspaces (see root `package.json`). - App: `apps/web/client` (Next.js App Router + TailwindCSS). - API routes: `apps/web/client/src/server/api/routers/*`, aggregated in `apps/web/client/src/server/api/root.ts`. - Shared utilities: `packages/*` (e.g., `packages/utility`). ### Stack & Runtimes - UI: Next.js App Router, TailwindCSS. - API: tRPC + Zod (`apps/web/client/src/server/api/*`). - Package manager: Bun only — use Bun for all installs and scripts; do not use npm, yarn, or pnpm. ### Agent Priorities - Correctness first: minimal scope and targeted edits. - Respect client/server boundaries in App Router. - Prefer local patterns and existing abstractions; avoid one-off frameworks. - Do not modify build outputs, generated files, or lockfiles. - Use Bun for all scripts; do not introduce npm/yarn. - Avoid running the local dev server in automation contexts. - Respect type safety and ### Next.js App Router - Default to Server Components. Add `use client` when using events, state/effects, browser APIs, or client-only libs. - App structure: `apps/web/client/src/app/**` (`page.tsx`, `layout.tsx`, `route.ts`). - Client providers live behind a client boundary (e.g., `apps/web/client/src/trpc/react.tsx`). - Example roots: `apps/web/client/src/app/layout.tsx` (RSC shell, providers wired, scripts gated by env). - Components using `mobx-react-lite`'s `observer` must be client components (include `use client`). ### tRPC API - Routers live in `apps/web/client/src/server/api/routers/**` and must be exported from `apps/web/client/src/server/api/root.ts`. - Use `publicProcedure`/`protectedProcedure` from `apps/web/client/src/server/api/trpc.ts`; validate inputs with Zod. - Serialization handled by SuperJSON; return plain objects/arrays. - Client usage via `apps/web/client/src/trpc/react.tsx` (React Query + tRPC links). ### Auth & Supabase - Server-side client: `apps/web/client/src/utils/supabase/server.ts` (uses Next headers/cookies). Use in server components, actions, and routes. - Browser client: `apps/web/client/src/utils/supabase/client/index.ts` for client components. - Never pass server-only clients into client code. ### Env & Config - Define/validate env vars in `apps/web/client/src/env.ts` via `@t3-oss/env-nextjs`. - Expose browser vars with `NEXT_PUBLIC_*` and declare in the `client` schema. - Prefer `env` from `@/env`. In server-only helpers (e.g., base URL in `src/trpc/helpers.ts`), read `process.env` only for deployment vars like `VERCEL_URL`/`PORT`. Never use `process.env` in client code; in shared modules, guard with `typeof window === 'undefined'`. - Import `./src/env` in `apps/web/client/next.config.ts` to enforce validation. ### Imports & Paths - Use path aliases: `@/*` and `~/*` map to `apps/web/client/src/*` (see `apps/web/client/tsconfig.json`). - Do not import server-only modules into client components. Limited exception: editor modules that already use `path`; reuse only there. Never import `process` in client code. - Split code by environment if needed (server file vs client file). ### MobX + React Stores - Create store instances with `useState(() => new Store())` for stability across renders. - Keep active store in `useRef`; clean up async with `setTimeout(() => storeRef.current?.clear(), 0)` to avoid route-change races. - Avoid `useMemo` for store instances; React may drop memoized values leading to data loss. - Avoid putting the store instance in effect deps if it loops; split concerns (e.g., project vs branch). - `observer` components are client-only. Place one client boundary at the feature entry; child observers need not include `use client` (e.g., `apps/web/client/src/app/project/[id]/_components/main.tsx`). - Example store: `apps/web/client/src/components/store/editor/engine.ts:1` (uses `makeAutoObservable`). ### Styling & UI - TailwindCSS-first styling; global styles are already imported in `apps/web/client/src/app/layout.tsx`. - Prefer existing UI components from `@onlook/ui` and local patterns. - Preserve dark theme defaults via `ThemeProvider` usage in layout. ### Internationalization - `next-intl` is configured; provider lives in `apps/web/client/src/app/layout.tsx`. - Strings live in `apps/web/client/messages/*`. Add/modify keys there; avoid hardcoded user-facing text. - Keep keys stable; prefer additions over breaking renames. ### Common Pitfalls - Missing `use client` where needed (events/browser APIs) causes unbound events; a single boundary at the feature root is sufficient. - New tRPC routers not exported in `src/server/api/root.ts` (endpoints unreachable). - Env vars not typed/exposed in `src/env.ts` cause runtime/edge failures. Prefer `env`; avoid new `process.env` reads in client code. - Importing server-only code into client components (bundling/runtime errors). Note: `path` is already used in specific client code-editor modules; avoid expanding Node API usage beyond those areas. - Bypassing i18n by hardcoding strings instead of using message files/hooks. - Avoid `useMemo` to create MobX stores (risk of lost references); avoid synchronous cleanup on route change (race conditions). ### Context Discipline (for Agents) - Search narrowly with ripgrep; open only files you need. - Read small sections; avoid `node_modules`, `.next`, large assets. - Propose minimal diffs aligned with existing conventions; avoid wide refactors. ### Notes - Unit tests can be run with `bun test` - Run type checking with `bun run typecheck` - Apply database updates to local dev with `bun run db:push` - Refrain from running the dev server - DO NOT run `db:gen`. This is reserved for the maintainer. - DO NOT use any type unless necessary ================================================ FILE: CLAUDE.md ================================================ ## Onlook Agents Guide Actionable rules for repo agents—keep diffs minimal, safe, token‑efficient. ### Purpose & Scope - Audience: automated coding agents working within this repository. - Goal: small, correct diffs aligned with the project’s architecture. - Non-goals: editing generated artifacts, lockfiles, or `node_modules`. ### Repo Map - Monorepo managed by Bun workspaces (see root `package.json`). - App: `apps/web/client` (Next.js App Router + TailwindCSS). - API routes: `apps/web/client/src/server/api/routers/*`, aggregated in `apps/web/client/src/server/api/root.ts`. - Shared utilities: `packages/*` (e.g., `packages/utility`). ### Stack & Runtimes - UI: Next.js App Router, TailwindCSS. - API: tRPC + Zod (`apps/web/client/src/server/api/*`). - Package manager: Bun only — use Bun for all installs and scripts; do not use npm, yarn, or pnpm. ### Agent Priorities - Correctness first: minimal scope and targeted edits. - Respect client/server boundaries in App Router. - Prefer local patterns and existing abstractions; avoid one-off frameworks. - Do not modify build outputs, generated files, or lockfiles. - Use Bun for all scripts; do not introduce npm/yarn. - Avoid running the local dev server in automation contexts. - Respect type safety and ### Next.js App Router - Default to Server Components. Add `use client` when using events, state/effects, browser APIs, or client-only libs. - App structure: `apps/web/client/src/app/**` (`page.tsx`, `layout.tsx`, `route.ts`). - Client providers live behind a client boundary (e.g., `apps/web/client/src/trpc/react.tsx`). - Example roots: `apps/web/client/src/app/layout.tsx` (RSC shell, providers wired, scripts gated by env). - Components using `mobx-react-lite`'s `observer` must be client components (include `use client`). ### tRPC API - Routers live in `apps/web/client/src/server/api/routers/**` and must be exported from `apps/web/client/src/server/api/root.ts`. - Use `publicProcedure`/`protectedProcedure` from `apps/web/client/src/server/api/trpc.ts`; validate inputs with Zod. - Serialization handled by SuperJSON; return plain objects/arrays. - Client usage via `apps/web/client/src/trpc/react.tsx` (React Query + tRPC links). ### Auth & Supabase - Server-side client: `apps/web/client/src/utils/supabase/server.ts` (uses Next headers/cookies). Use in server components, actions, and routes. - Browser client: `apps/web/client/src/utils/supabase/client/index.ts` for client components. - Never pass server-only clients into client code. ### Env & Config - Define/validate env vars in `apps/web/client/src/env.ts` via `@t3-oss/env-nextjs`. - Expose browser vars with `NEXT_PUBLIC_*` and declare in the `client` schema. - Prefer `env` from `@/env`. In server-only helpers (e.g., base URL in `src/trpc/helpers.ts`), read `process.env` only for deployment vars like `VERCEL_URL`/`PORT`. Never use `process.env` in client code; in shared modules, guard with `typeof window === 'undefined'`. - Import `./src/env` in `apps/web/client/next.config.ts` to enforce validation. ### Imports & Paths - Use path aliases: `@/*` and `~/*` map to `apps/web/client/src/*` (see `apps/web/client/tsconfig.json`). - Do not import server-only modules into client components. Limited exception: editor modules that already use `path`; reuse only there. Never import `process` in client code. - Split code by environment if needed (server file vs client file). ### MobX + React Stores - Create store instances with `useState(() => new Store())` for stability across renders. - Keep active store in `useRef`; clean up async with `setTimeout(() => storeRef.current?.clear(), 0)` to avoid route-change races. - Avoid `useMemo` for store instances; React may drop memoized values leading to data loss. - Avoid putting the store instance in effect deps if it loops; split concerns (e.g., project vs branch). - `observer` components are client-only. Place one client boundary at the feature entry; child observers need not include `use client` (e.g., `apps/web/client/src/app/project/[id]/_components/main.tsx`). - Example store: `apps/web/client/src/components/store/editor/engine.ts:1` (uses `makeAutoObservable`). ### Styling & UI - TailwindCSS-first styling; global styles are already imported in `apps/web/client/src/app/layout.tsx`. - Prefer existing UI components from `@onlook/ui` and local patterns. - Preserve dark theme defaults via `ThemeProvider` usage in layout. ### Internationalization - `next-intl` is configured; provider lives in `apps/web/client/src/app/layout.tsx`. - Strings live in `apps/web/client/messages/*`. Add/modify keys there; avoid hardcoded user-facing text. - Keep keys stable; prefer additions over breaking renames. ### Common Pitfalls - Missing `use client` where needed (events/browser APIs) causes unbound events; a single boundary at the feature root is sufficient. - New tRPC routers not exported in `src/server/api/root.ts` (endpoints unreachable). - Env vars not typed/exposed in `src/env.ts` cause runtime/edge failures. Prefer `env`; avoid new `process.env` reads in client code. - Importing server-only code into client components (bundling/runtime errors). Note: `path` is already used in specific client code-editor modules; avoid expanding Node API usage beyond those areas. - Bypassing i18n by hardcoding strings instead of using message files/hooks. - Avoid `useMemo` to create MobX stores (risk of lost references); avoid synchronous cleanup on route change (race conditions). ### Context Discipline (for Agents) - Search narrowly with ripgrep; open only files you need. - Read small sections; avoid `node_modules`, `.next`, large assets. - Propose minimal diffs aligned with existing conventions; avoid wide refactors. ### Notes - Unit tests can be run with `bun test` - Run type checking with `bun run typecheck` - Apply database updates to local dev with `bun run db:push` - Refrain from running the dev server - DO NOT run `db:gen`. This is reserved for the maintainer. - DO NOT use any type unless necessary ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards Examples of behavior that contributes to a positive environment for our community include: * Demonstrating empathy and kindness toward other people * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement by emailing [contact@onlook.com](mailto:contact@onlook.com). All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing To keep all docs in one place, we've moved the contributing guide here: https://docs.onlook.com/developers ### Running locally To get set up and run Onlook locally, see here: https://docs.onlook.com/developers/running-locally ================================================ FILE: Dockerfile ================================================ # Build Onlook web client FROM oven/bun:1 WORKDIR /app # Set build and production environment ENV NODE_ENV=production ENV NEXT_TELEMETRY_DISABLED=1 ENV STANDALONE_BUILD=true ENV HOSTNAME=0.0.0.0 ENV PORT=3000 # Copy everything (monorepo structure) COPY . . # Install dependencies and build RUN bun install --frozen-lockfile RUN cd apps/web/client && bun run build:standalone # Expose the application port EXPOSE 3000 # Health check to ensure the application is running HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ CMD bun -e "fetch('http://localhost:3000').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))" # Start the Next.js server CMD ["bun", "apps/web/client/server.js"] ================================================ FILE: LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2024 On Off, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: README.md ================================================
header image

Onlook

Cursor for Designers
Explore the docs »

👨‍💻👩‍💻👨‍💻 We're hiring engineers in SF! 👩‍💻👨‍💻👩‍💻


View Demo · Report Bug · Request Feature

[![Discord][discord-shield]][discord-url] [![LinkedIn][linkedin-shield]][linkedin-url] [![Twitter][twitter-shield]][twitter-url] [中文](https://www.readme-i18n.com/onlook-dev/onlook?lang=zh) | [Español](https://www.readme-i18n.com/onlook-dev/onlook?lang=es) | [Deutsch](https://www.readme-i18n.com/onlook-dev/onlook?lang=de) | [français](https://www.readme-i18n.com/onlook-dev/onlook?lang=fr) | [Português](https://www.readme-i18n.com/onlook-dev/onlook?lang=pt) | [Русский](https://www.readme-i18n.com/onlook-dev/onlook?lang=ru) | [日本語](https://www.readme-i18n.com/onlook-dev/onlook?lang=ja) | [한국어](https://www.readme-i18n.com/onlook-dev/onlook?lang=ko)
# An Open-Source, Visual-First Code Editor Craft websites, prototypes, and designs with AI in Next.js + TailwindCSS. Make edits directly in the browser DOM with a visual editor. Design in realtime with code. An open-source alternative to Bolt.new, Lovable, V0, Replit Agent, Figma Make, Webflow, etc. ### 🚧 🚧 🚧 Onlook is still under development 🚧 🚧 🚧 We're actively looking for contributors to help make Onlook for Web an incredible prompt-to-build experience. Check the [open issues](https://github.com/onlook-dev/onlook/issues) for a full list of proposed features (and known issues), and join our [Discord](https://discord.gg/hERDfFZCsH) to collaborate with hundreds of other builders. ## What you can do with Onlook: - [x] Create Next.js app in seconds - [x] Start from text or image - [x] Use prebuilt templates - [ ] Import from Figma - [ ] Import from GitHub repo - [ ] Make a PR to a GitHub repo - [x] Visually edit your app - [x] Use Figma-like UI - [x] Preview your app in real-time - [x] Manage brand assets and tokens - [x] Create and navigate to Pages - [x] Browse layers - [x] Manage project Images - [x] Detect and use Components – _Previously in [Onlook Desktop](https://github.com/onlook-dev/desktop)_ - [ ] Drag-and-drop Components Panel - [x] Use Branching to experiment with designs - [x] Development Tools - [x] Real-time code editor - [x] Save and restore from checkpoints - [x] Run commands via CLI - [x] Connect with app marketplace - [x] Deploy your app in seconds - [x] Generate sharable links - [x] Link your custom domain - [ ] Collaborate with your team - [x] Real-time editing - [ ] Leave comments - [ ] Advanced AI capabilities - [x] Queue multiple messages at once - [ ] Use Images as references and as assets in a project - [ ] Setup and use MCPs in projects - [ ] Allow Onlook to use itself as a toolcall for branch creation and iteration - [ ] Advanced project support - [ ] Support non-NextJS projects - [ ] Support non-Tailwind projects ![Onlook-GitHub-Example](https://github.com/user-attachments/assets/642de37a-72cc-4056-8eb7-8eb42714cdc4) ## Getting Started Use our [hosted app](https://onlook.com) or [run locally](https://docs.onlook.com/developers/running-locally). ### Usage Onlook will run on any Next.js + TailwindCSS project, import your project into Onlook or start from scratch within the editor. Use the AI chat to create or edit a project you're working on. At any time, you can always right-click an element to open up the exact location of the element in code. image
Draw-in new divs and re-arrange them within their parent containers by dragging-and-dropping. image
Preview the code side-by-side with your site design. image
Use Onlook's editor toolbar to adjust Tailwind styles, directly manipulate objects, and experiment with layouts. image ## Documentation For full documentation, visit [docs.onlook.com](https://docs.onlook.com) To see how to Contribute, visit [Contributing to Onlook](https://docs.onlook.com/developers) in our docs. ## How it works architecture 1. When you create an app, we load the code into a web container 2. The container runs and serves the code 3. Our editor receives the preview link and displays it in an iFrame 4. Our editor reads and indexes the code from the container 5. We instrument the code in order to map elements to their place in code 6. When the element is edited, we edit the element in our iFrame, then in code 7. Our AI chat also has code access and tools to understand and edit the code This architecture can theoretically scale to any language or framework that displays DOM elements declaratively (e.g. jsx/tsx/html). We are focused on making it work well with Next.js and TailwindCSS for now. For a full walkthrough, check out our [Architecture Docs](https://docs.onlook.com/developers/architecture). ### Our Tech Stack #### Front-end - [Next.js](https://nextjs.org/) - Full stack - [TailwindCSS](https://tailwindcss.com/) - Styling - [tRPC](https://trpc.io/) - Server interface #### Database - [Supabase](https://supabase.com/) - Auth, Database, Storage - [Drizzle](https://orm.drizzle.team/) - ORM #### AI - [AI SDK](https://ai-sdk.dev/) - LLM client - [OpenRouter](https://openrouter.ai/) - LLM model provider - [Morph Fast Apply](https://morphllm.com) - Fast apply model provider - [Relace](https://relace.ai) - Fast apply model provider #### Sandbox and hosting - [CodeSandboxSDK](https://codesandbox.io/docs/sdk) - Dev sandbox - [Freestyle](https://www.freestyle.sh/) - Hosting #### Runtime - [Bun](https://bun.sh/) - Monorepo, runtime, bundler - [Docker](https://www.docker.com/) - Container management ## Contributing ![image](https://github.com/user-attachments/assets/ecc94303-df23-46ae-87dc-66b040396e0b) If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also [open issues](https://github.com/onlook-dev/onlook/issues). See the [CONTRIBUTING.md](CONTRIBUTING.md) for instructions and code of conduct. #### Contributors ## Contact ![image](https://github.com/user-attachments/assets/60684b68-1925-4550-8efd-51a1509fc953) - Team: [Discord](https://discord.gg/hERDfFZCsH) - [Twitter](https://twitter.com/onlookdev) - [LinkedIn](https://www.linkedin.com/company/onlook-dev/) - [Email](mailto:contact@onlook.com) - Project: [https://github.com/onlook-dev/onlook](https://github.com/onlook-dev/onlook) - Website: [https://onlook.com](https://onlook.com) ## License Distributed under the Apache 2.0 License. See [LICENSE.md](LICENSE.md) for more information. [contributors-shield]: https://img.shields.io/github/contributors/onlook-dev/studio.svg?style=for-the-badge [contributors-url]: https://github.com/onlook-dev/onlook/graphs/contributors [forks-shield]: https://img.shields.io/github/forks/onlook-dev/studio.svg?style=for-the-badge [forks-url]: https://github.com/onlook-dev/onlook/network/members [stars-shield]: https://img.shields.io/github/stars/onlook-dev/studio.svg?style=for-the-badge [stars-url]: https://github.com/onlook-dev/onlook/stargazers [issues-shield]: https://img.shields.io/github/issues/onlook-dev/studio.svg?style=for-the-badge [issues-url]: https://github.com/onlook-dev/onlook/issues [license-shield]: https://img.shields.io/github/license/onlook-dev/studio.svg?style=for-the-badge [license-url]: https://github.com/onlook-dev/onlook/blob/master/LICENSE.txt [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?logo=linkedin&colorB=555 [linkedin-url]: https://www.linkedin.com/company/onlook-dev [twitter-shield]: https://img.shields.io/badge/-Twitter-black?logo=x&colorB=555 [twitter-url]: https://x.com/onlookdev [discord-shield]: https://img.shields.io/badge/-Discord-black?logo=discord&colorB=555 [discord-url]: https://discord.gg/hERDfFZCsH [React.js]: https://img.shields.io/badge/react-%2320232a.svg?logo=react&logoColor=%2361DAFB [React-url]: https://reactjs.org/ [TailwindCSS]: https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?logo=tailwind-css&logoColor=white [Tailwind-url]: https://tailwindcss.com/ [Electron.js]: https://img.shields.io/badge/Electron-191970?logo=Electron&logoColor=white [Electron-url]: https://www.electronjs.org/ [Vite.js]: https://img.shields.io/badge/vite-%23646CFF.svg?logo=vite&logoColor=white [Vite-url]: https://vitejs.dev/ [product-screenshot]: assets/brand.png [weave-shield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fapp.workweave.ai%2Fapi%2Frepository%2Fbadge%2Forg_pWcXBHJo3Li2Te2Y4WkCPA33%2F820087727&cacheSeconds=3600&labelColor=#131313 [weave-url]: https://app.workweave.ai/reports/repository/org_pWcXBHJo3Li2Te2Y4WkCPA33/820087727 ================================================ FILE: SECURITY.md ================================================ # Security Policy Please contact us at [contact@onlook.com](mailto:contact@onlook.com) with any security issues. ================================================ FILE: apps/backend/.gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* node_modules dist dist-ssr dist-electron release *.local # Editor directories and files .vscode/.debug.env .vscode/settings.json .idea .DS_Store *.suo *.ntvs* *.njsproj *.sln *.sw? #lockfile package-lock.json pnpm-lock.yaml yarn.lock /test-results/ /playwright-report/ /playwright/.cache/ # Env variables .env ================================================ FILE: apps/backend/README.md ================================================ ## Why a backend stack? This is our server stack built in Supabase which you can also run locally or self-host. Used to enable online capabilities such as managing users, collaborating, persisting data, etc. We will offer this as a hosted instance at some point. Ideally, the product should still work offline with no backend connection. ## Usage ### Running locally 1. Make sure you have [Docker] installed 2. Install necessary packages ```bash bun install ``` 3. Run the supabase instance locally ```bash bun run start ``` 4. Set up the latest snapshot of the database ```bash bun run reset ``` ================================================ FILE: apps/backend/package.json ================================================ { "name": "@onlook/backend", "private": true, "scripts": { "start": "supabase start", "stop": "supabase stop", "push": "supabase db push", "reset": "supabase db reset", "db:gen": "supabase gen types --lang=typescript --local --schema public > ../../packages/supabase/src/types/db.ts", "test": "cd supabase/functions/api && deno test", "status": "supabase status -o json" }, "dependencies": {}, "devDependencies": { "@onlook/typescript": "*", "@types/bun": "latest", "supabase": "^2.45.5" }, "peerDependencies": { "typescript": "^5.0.0" } } ================================================ FILE: apps/backend/supabase/.gitignore ================================================ # Supabase .branches .temp .env ================================================ FILE: apps/backend/supabase/config.toml ================================================ project_id = "onlook-web" [api] enabled = true port = 54321 schemas = ["public", "storage"] extra_search_path = ["public"] max_rows = 100 [auth] site_url = "https://onlook.com" additional_redirect_urls = [ "http://localhost:3000", "http://localhost:3000/auth/callback", ] jwt_expiry = 36000 [db] port = 54322 [studio] port = 54323 [auth.external.github] enabled = true client_id = "env(GITHUB_CLIENT_ID)" secret = "env(GITHUB_SECRET)" redirect_uri = "http://127.0.0.1:54321/auth/v1/callback" [auth.external.google] enabled = true client_id = "env(GOOGLE_CLIENT_ID)" secret = "env(GOOGLE_SECRET)" redirect_uri = "http://127.0.0.1:54321/auth/v1/callback" [analytics] enabled = true port = 54327 vector_port = 54328 backend = "postgres" [functions.stripe-webhook] verify_jwt = false [storage.buckets.preview_images] public = true file_size_limit = "10MiB" ================================================ FILE: apps/backend/supabase/migrations/0000_same_human_robot.sql ================================================ DO $$ BEGIN IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'frame_type') THEN CREATE TYPE "public"."frame_type" AS ENUM('web'); END IF; END $$;--> statement-breakpoint DO $$ BEGIN IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'role') THEN CREATE TYPE "public"."message_role" AS ENUM('user', 'assistant'); END IF; END $$;--> statement-breakpoint CREATE TABLE IF NOT EXISTS "canvas" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "project_id" uuid NOT NULL, "scale" numeric NOT NULL, "x" numeric NOT NULL, "y" numeric NOT NULL ); --> statement-breakpoint ALTER TABLE "canvas" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint CREATE TABLE IF NOT EXISTS "frames" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "canvas_id" uuid NOT NULL, "type" "frame_type" NOT NULL, "url" varchar NOT NULL, "x" numeric NOT NULL, "y" numeric NOT NULL, "width" numeric NOT NULL, "height" numeric NOT NULL ); --> statement-breakpoint ALTER TABLE "frames" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint CREATE TABLE IF NOT EXISTS "conversations" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "project_id" uuid NOT NULL, "display_name" varchar, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL ); --> statement-breakpoint CREATE TABLE IF NOT EXISTS "messages" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "conversation_id" uuid NOT NULL, "content" text NOT NULL, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "role" "message_role" NOT NULL, "applied" boolean DEFAULT false NOT NULL, "snapshots" jsonb DEFAULT '{}'::jsonb NOT NULL, "context" jsonb DEFAULT '[]'::jsonb NOT NULL, "parts" jsonb DEFAULT '[]'::jsonb NOT NULL ); --> statement-breakpoint CREATE TABLE IF NOT EXISTS "projects" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "name" varchar NOT NULL, "sandbox_id" varchar NOT NULL, "sandbox_url" varchar NOT NULL, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL, "preview_img" varchar, "description" text ); --> statement-breakpoint ALTER TABLE "projects" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint CREATE TABLE IF NOT EXISTS "users" ( "id" uuid PRIMARY KEY NOT NULL ); --> statement-breakpoint ALTER TABLE "users" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint CREATE TABLE IF NOT EXISTS "user_projects" ( "user_id" uuid NOT NULL, "project_id" uuid NOT NULL, "created_at" timestamp with time zone DEFAULT now(), CONSTRAINT "user_projects_user_id_project_id_pk" PRIMARY KEY("user_id","project_id") ); --> statement-breakpoint ALTER TABLE "user_projects" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "canvas" DROP CONSTRAINT IF EXISTS "canvas_project_id_projects_id_fk";--> statement-breakpoint ALTER TABLE "canvas" ADD CONSTRAINT "canvas_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "frames" DROP CONSTRAINT IF EXISTS "frames_canvas_id_canvas_id_fk";--> statement-breakpoint ALTER TABLE "frames" ADD CONSTRAINT "frames_canvas_id_canvas_id_fk" FOREIGN KEY ("canvas_id") REFERENCES "public"."canvas"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "conversations" DROP CONSTRAINT IF EXISTS "conversations_project_id_projects_id_fk";--> statement-breakpoint ALTER TABLE "conversations" ADD CONSTRAINT "conversations_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "messages" DROP CONSTRAINT IF EXISTS "messages_conversation_id_conversations_id_fk";--> statement-breakpoint ALTER TABLE "messages" ADD CONSTRAINT "messages_conversation_id_conversations_id_fk" FOREIGN KEY ("conversation_id") REFERENCES "public"."conversations"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "users" DROP CONSTRAINT IF EXISTS "users_id_users_id_fk";--> statement-breakpoint ALTER TABLE "users" ADD CONSTRAINT "users_id_users_id_fk" FOREIGN KEY ("id") REFERENCES "auth"."users"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "user_projects" DROP CONSTRAINT IF EXISTS "user_projects_user_id_users_id_fk";--> statement-breakpoint ALTER TABLE "user_projects" ADD CONSTRAINT "user_projects_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "user_projects" DROP CONSTRAINT IF EXISTS "user_projects_project_id_projects_id_fk";--> statement-breakpoint ALTER TABLE "user_projects" ADD CONSTRAINT "user_projects_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade; ================================================ FILE: apps/backend/supabase/migrations/0001_graceful_exodus.sql ================================================ ALTER TABLE "conversations" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "messages" ENABLE ROW LEVEL SECURITY; ================================================ FILE: apps/backend/supabase/migrations/0002_red_crusher_hogan.sql ================================================ CREATE TABLE IF NOT EXISTS "user_settings" ( "id" uuid PRIMARY KEY NOT NULL, "user_id" uuid NOT NULL, "auto_apply_code" boolean DEFAULT true NOT NULL, "expand_code_blocks" boolean DEFAULT true NOT NULL, "show_suggestions" boolean DEFAULT true NOT NULL, "show_mini_chat" boolean DEFAULT true NOT NULL, CONSTRAINT "user_settings_user_id_unique" UNIQUE("user_id") ); --> statement-breakpoint ALTER TABLE "user_settings" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "user_settings" DROP CONSTRAINT IF EXISTS "user_settings_user_id_users_id_fk"; --> statement-breakpoint ALTER TABLE "user_settings" ADD CONSTRAINT "user_settings_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE cascade; ================================================ FILE: apps/backend/supabase/migrations/0003_loud_ozymandias.sql ================================================ CREATE TABLE IF NOT EXISTS "user_canvases" ( "user_id" uuid NOT NULL, "canvas_id" uuid NOT NULL, "scale" numeric NOT NULL, "x" numeric NOT NULL, "y" numeric NOT NULL, CONSTRAINT "user_canvases_user_id_canvas_id_pk" PRIMARY KEY("user_id","canvas_id") ); --> statement-breakpoint ALTER TABLE "user_canvases" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "user_canvases" DROP CONSTRAINT IF EXISTS user_canvases_user_id_users_id_fk; ALTER TABLE "user_canvases" ADD CONSTRAINT "user_canvases_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "user_canvases" DROP CONSTRAINT IF EXISTS user_canvases_canvas_id_canvas_id_fk; ALTER TABLE "user_canvases" ADD CONSTRAINT "user_canvases_canvas_id_canvas_id_fk" FOREIGN KEY ("canvas_id") REFERENCES "public"."canvas"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint -- Copy over the scale, x, and y values from the canvas table to the user_canvases table (if columns exist) DO $$ BEGIN IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name = 'canvas' AND column_name = 'scale') THEN INSERT INTO "user_canvases" ("user_id", "canvas_id", "scale", "x", "y") SELECT up.user_id, c.id as canvas_id, c.scale, c.x, c.y FROM "canvas" c INNER JOIN "user_projects" up ON c.project_id = up.project_id ON CONFLICT (user_id, canvas_id) DO NOTHING; END IF; END $$; ALTER TABLE "canvas" DROP COLUMN IF EXISTS "scale";--> statement-breakpoint ALTER TABLE "canvas" DROP COLUMN IF EXISTS "x";--> statement-breakpoint ALTER TABLE "canvas" DROP COLUMN IF EXISTS "y"; ================================================ FILE: apps/backend/supabase/migrations/0004_pink_expediter.sql ================================================ -- Create ENUMs only if they don't exist DO $$ BEGIN CREATE TYPE "public"."invitation_status" AS ENUM('pending', 'accepted', 'expired'); EXCEPTION WHEN duplicate_object THEN null; END $$;--> statement-breakpoint DO $$ BEGIN CREATE TYPE "public"."project_role" AS ENUM('owner', 'admin'); EXCEPTION WHEN duplicate_object THEN null; END $$;--> statement-breakpoint -- Create table only if it doesn't exist CREATE TABLE IF NOT EXISTS "project_invitations" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "project_id" uuid NOT NULL, "inviter_id" uuid NOT NULL, "invitee_email" varchar NOT NULL, "status" "invitation_status" DEFAULT 'pending' NOT NULL, "token" varchar NOT NULL, "role" "project_role" NOT NULL, "expires_at" timestamp with time zone NOT NULL, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL, CONSTRAINT "project_invitations_token_unique" UNIQUE("token") ); --> statement-breakpoint ALTER TABLE "project_invitations" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "user_projects" ADD COLUMN IF NOT EXISTS "role" "project_role";--> statement-breakpoint -- Set all existing records to 'owner' role (assuming existing users should be owners) UPDATE "user_projects" SET "role" = 'owner' WHERE "role" IS NULL; -- Make the role column NOT NULL after setting default values ALTER TABLE "user_projects" ALTER COLUMN "role" SET NOT NULL; ALTER TABLE "project_invitations" DROP CONSTRAINT IF EXISTS "project_invitations_project_id_projects_id_fk"; ALTER TABLE "project_invitations" ADD CONSTRAINT "project_invitations_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "project_invitations" DROP CONSTRAINT IF EXISTS "project_invitations_inviter_id_users_id_fk"; ALTER TABLE "project_invitations" ADD CONSTRAINT "project_invitations_inviter_id_users_id_fk" FOREIGN KEY ("inviter_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE cascade; ================================================ FILE: apps/backend/supabase/migrations/0005_short_lila_cheney.sql ================================================ ALTER TABLE "project_invitations" DROP COLUMN IF EXISTS "status";--> statement-breakpoint ALTER TABLE "project_invitations" DROP CONSTRAINT IF EXISTS "project_invitations_invitee_email_project_id_unique"; ALTER TABLE "project_invitations" ADD CONSTRAINT "project_invitations_invitee_email_project_id_unique" UNIQUE("invitee_email","project_id");--> statement-breakpoint DROP TYPE IF EXISTS "public"."invitation_status"; ================================================ FILE: apps/backend/supabase/migrations/0006_rls.sql ================================================ -- Helper function to check if user has specific roles for a project CREATE OR REPLACE FUNCTION user_has_project_access( project_id_param UUID, required_roles TEXT[] ) RETURNS BOOLEAN AS $$ BEGIN RETURN EXISTS ( SELECT 1 FROM user_projects WHERE user_projects.project_id = project_id_param AND user_projects.user_id = auth.uid() AND user_projects.role = ANY(required_roles) ); END; $$ LANGUAGE plpgsql SECURITY DEFINER; -- Helper function to check if user has project access via canvas CREATE OR REPLACE FUNCTION user_has_canvas_access( canvas_id_param UUID, required_roles TEXT[] ) RETURNS BOOLEAN AS $$ BEGIN RETURN EXISTS ( SELECT 1 FROM canvas c JOIN user_projects up ON c.project_id = up.project_id WHERE c.id = canvas_id_param AND up.user_id = auth.uid() AND up.role = ANY(required_roles) ); END; $$ LANGUAGE plpgsql SECURITY DEFINER; -- PROJECTS POLICIES DROP POLICY IF EXISTS "projects_insert_policy" ON projects; -- 1. INSERT: Allow only authenticated users to create projects CREATE POLICY "projects_insert_policy" ON projects FOR INSERT TO authenticated WITH CHECK (true); DROP POLICY IF EXISTS "projects_select_policy" ON projects; -- 2. SELECT: Allow users who have an entry in user_projects for that project CREATE POLICY "projects_select_policy" ON projects FOR SELECT TO authenticated USING (user_has_project_access(projects.id, ARRAY['owner', 'admin'])); DROP POLICY IF EXISTS "projects_update_policy" ON projects; -- 3. UPDATE: Allow users with 'owner' or 'admin' role in user_projects CREATE POLICY "projects_update_policy" ON projects FOR UPDATE TO authenticated USING (user_has_project_access(projects.id, ARRAY['owner', 'admin'])); DROP POLICY IF EXISTS "projects_delete_policy" ON projects; -- 4. DELETE: Allow only users with 'owner' role CREATE POLICY "projects_delete_policy" ON projects FOR DELETE TO authenticated USING (user_has_project_access(projects.id, ARRAY['owner'])); -- CANVAS POLICIES DROP POLICY IF EXISTS "canvas_insert_policy" ON canvas; -- 1. INSERT: Allow only users with 'owner' role to create canvas entries CREATE POLICY "canvas_insert_policy" ON canvas FOR INSERT TO authenticated WITH CHECK (user_has_project_access(canvas.project_id, ARRAY['owner'])); DROP POLICY IF EXISTS "canvas_select_policy" ON canvas; -- 2. SELECT: Allow users who have an entry in user_projects for the canvas's project CREATE POLICY "canvas_select_policy" ON canvas FOR SELECT TO authenticated USING (user_has_project_access(canvas.project_id, ARRAY['owner', 'admin'])); DROP POLICY IF EXISTS "canvas_update_policy" ON canvas; -- 3. UPDATE: Allow users with 'owner' or 'admin' role in user_projects for the canvas's project CREATE POLICY "canvas_update_policy" ON canvas FOR UPDATE TO authenticated USING (user_has_project_access(canvas.project_id, ARRAY['owner', 'admin'])) WITH CHECK (user_has_project_access(canvas.project_id, ARRAY['owner', 'admin'])); DROP POLICY IF EXISTS "canvas_delete_policy" ON canvas; -- 4. DELETE: Allow only users with 'owner' role for the canvas's project CREATE POLICY "canvas_delete_policy" ON canvas FOR DELETE TO authenticated USING (user_has_project_access(canvas.project_id, ARRAY['owner'])); -- USER_PROJECTS POLICIES DROP POLICY IF EXISTS "user_projects_select_policy" ON user_projects; -- 1. SELECT: Allow users to see their own entries or project owners/admins to see all entries CREATE POLICY "user_projects_select_policy" ON user_projects FOR SELECT TO authenticated USING ( auth.uid() = user_projects.user_id OR user_has_project_access(user_projects.project_id, ARRAY['owner', 'admin']) ); DROP POLICY IF EXISTS "user_projects_update_policy" ON user_projects; -- 2. UPDATE: Allow only project owners/admins to update user roles CREATE POLICY "user_projects_update_policy" ON user_projects FOR UPDATE TO authenticated USING (user_has_project_access(user_projects.project_id, ARRAY['owner', 'admin'])); DROP POLICY IF EXISTS "user_projects_delete_policy" ON user_projects; -- 3. DELETE: Allow users to remove themselves or project owners to remove anyone CREATE POLICY "user_projects_delete_policy" ON user_projects FOR DELETE TO authenticated USING ( auth.uid() = user_projects.user_id OR user_has_project_access(user_projects.project_id, ARRAY['owner']) ); -- USER_CANVASES POLICIES DROP POLICY IF EXISTS "user_canvases_insert_policy" ON user_canvases; -- 1. INSERT: Allow users to create their own canvas associations CREATE POLICY "user_canvases_insert_policy" ON user_canvases FOR INSERT TO authenticated WITH CHECK ( auth.uid() = user_canvases.user_id ); DROP POLICY IF EXISTS "user_canvases_select_policy" ON user_canvases; -- 2. SELECT: Allow users to see only their own canvas associations CREATE POLICY "user_canvases_select_policy" ON user_canvases FOR SELECT TO authenticated USING ( auth.uid() = user_canvases.user_id ); DROP POLICY IF EXISTS "user_canvases_update_policy" ON user_canvases; -- 3. UPDATE: Allow users to update only their own canvas associations CREATE POLICY "user_canvases_update_policy" ON user_canvases FOR UPDATE TO authenticated USING (auth.uid() = user_canvases.user_id) WITH CHECK (auth.uid() = user_canvases.user_id); DROP POLICY IF EXISTS "user_canvases_delete_policy" ON user_canvases; -- 4. DELETE: Allow users to delete only their own canvas associations CREATE POLICY "user_canvases_delete_policy" ON user_canvases FOR DELETE TO authenticated USING (auth.uid() = user_canvases.user_id); -- FRAMES POLICIES DROP POLICY IF EXISTS "frames_insert_policy" ON frames; -- 1. INSERT: Allow project owners/admins to create frames CREATE POLICY "frames_insert_policy" ON frames FOR INSERT TO authenticated WITH CHECK (user_has_canvas_access(frames.canvas_id, ARRAY['owner', 'admin'])); DROP POLICY IF EXISTS "frames_select_policy" ON frames; -- 2. SELECT: Allow project owners/admins to view frames CREATE POLICY "frames_select_policy" ON frames FOR SELECT TO authenticated USING (user_has_canvas_access(frames.canvas_id, ARRAY['owner', 'admin'])); DROP POLICY IF EXISTS "frames_update_policy" ON frames; -- 3. UPDATE: Allow project owners/admins to update frames CREATE POLICY "frames_update_policy" ON frames FOR UPDATE TO authenticated USING (user_has_canvas_access(frames.canvas_id, ARRAY['owner', 'admin'])) WITH CHECK (user_has_canvas_access(frames.canvas_id, ARRAY['owner', 'admin'])); DROP POLICY IF EXISTS "frames_delete_policy" ON frames; -- 4. DELETE: Allow project owners/admins to delete frames CREATE POLICY "frames_delete_policy" ON frames FOR DELETE TO authenticated USING (user_has_canvas_access(frames.canvas_id, ARRAY['owner', 'admin'])); -- USERS POLICIES DROP POLICY IF EXISTS "users_insert_policy" ON users; -- 1. INSERT: Allow users to create their own user record CREATE POLICY "users_insert_policy" ON users FOR INSERT TO authenticated WITH CHECK (auth.uid() = users.id); DROP POLICY IF EXISTS "users_select_policy" ON users; -- 2. SELECT: Allow users to view only their own user record CREATE POLICY "users_select_policy" ON users FOR SELECT TO authenticated USING (auth.uid() = users.id); DROP POLICY IF EXISTS "users_update_policy" ON users; -- 3. UPDATE: Allow users to update only their own user record CREATE POLICY "users_update_policy" ON users FOR UPDATE TO authenticated USING (auth.uid() = users.id) WITH CHECK (auth.uid() = users.id); DROP POLICY IF EXISTS "users_delete_policy" ON users; -- 4. DELETE: Allow users to delete only their own user record CREATE POLICY "users_delete_policy" ON users FOR DELETE TO authenticated USING (auth.uid() = users.id); -- USER_SETTINGS POLICIES DROP POLICY IF EXISTS "user_settings_insert_policy" ON user_settings; -- 1. INSERT: Allow users to create their own settings CREATE POLICY "user_settings_insert_policy" ON user_settings FOR INSERT TO authenticated WITH CHECK (auth.uid() = user_settings.user_id); DROP POLICY IF EXISTS "user_settings_select_policy" ON user_settings; -- 2. SELECT: Allow users to view only their own settings CREATE POLICY "user_settings_select_policy" ON user_settings FOR SELECT TO authenticated USING (auth.uid() = user_settings.user_id); DROP POLICY IF EXISTS "user_settings_update_policy" ON user_settings; -- 3. UPDATE: Allow users to update only their own settings CREATE POLICY "user_settings_update_policy" ON user_settings FOR UPDATE TO authenticated USING (auth.uid() = user_settings.user_id) WITH CHECK (auth.uid() = user_settings.user_id); DROP POLICY IF EXISTS "user_settings_delete_policy" ON user_settings; -- 4. DELETE: Allow users to delete only their own settings CREATE POLICY "user_settings_delete_policy" ON user_settings FOR DELETE TO authenticated USING (auth.uid() = user_settings.user_id); -- PROJECT_INVITATIONS POLICIES DROP POLICY IF EXISTS "project_invitations_insert_policy" ON project_invitations; -- 1. INSERT: Allow project owners/admins to send invitations CREATE POLICY "project_invitations_insert_policy" ON project_invitations FOR INSERT TO authenticated WITH CHECK ( auth.uid() = project_invitations.inviter_id AND user_has_project_access(project_invitations.project_id, ARRAY['owner', 'admin']) ); DROP POLICY IF EXISTS "project_invitations_select_policy" ON project_invitations; -- 2. SELECT: Allow project owners/admins and invitees to view invitations CREATE POLICY "project_invitations_select_policy" ON project_invitations FOR SELECT TO authenticated USING ( user_has_project_access(project_invitations.project_id, ARRAY['owner', 'admin']) OR EXISTS ( SELECT 1 FROM auth.users WHERE auth.users.id = auth.uid() AND auth.users.email = project_invitations.invitee_email ) ); DROP POLICY IF EXISTS "project_invitations_update_policy" ON project_invitations; -- 3. UPDATE: Allow project owners/admins and invitees to update invitations CREATE POLICY "project_invitations_update_policy" ON project_invitations FOR UPDATE TO authenticated USING ( user_has_project_access(project_invitations.project_id, ARRAY['owner', 'admin']) OR EXISTS ( SELECT 1 FROM auth.users WHERE auth.users.id = auth.uid() AND auth.users.email = project_invitations.invitee_email ) ) WITH CHECK ( user_has_project_access(project_invitations.project_id, ARRAY['owner', 'admin']) OR EXISTS ( SELECT 1 FROM auth.users WHERE auth.users.id = auth.uid() AND auth.users.email = project_invitations.invitee_email ) ); DROP POLICY IF EXISTS "project_invitations_delete_policy" ON project_invitations; -- 4. DELETE: Allow inviters, project owners/admins, and invitees to delete invitations CREATE POLICY "project_invitations_delete_policy" ON project_invitations FOR DELETE TO authenticated USING ( auth.uid() = project_invitations.inviter_id OR user_has_project_access(project_invitations.project_id, ARRAY['owner', 'admin']) OR EXISTS ( SELECT 1 FROM auth.users WHERE auth.users.id = auth.uid() AND auth.users.email = project_invitations.invitee_email ) ); ================================================ FILE: apps/backend/supabase/migrations/0007_realtime_rls.sql ================================================ CREATE OR REPLACE FUNCTION public.project_changes() RETURNS TRIGGER SECURITY DEFINER LANGUAGE plpgsql AS $$ DECLARE topic_project_id uuid; BEGIN IF TG_TABLE_NAME = 'conversations' THEN SELECT c.project_id INTO topic_project_id FROM "conversations" c WHERE c.id = COALESCE(NEW.id, OLD.id); ELSIF TG_TABLE_NAME = 'messages' THEN SELECT c.project_id INTO topic_project_id FROM "messages" m INNER JOIN "conversations" c ON m.conversation_id = c.id WHERE m.id = COALESCE(NEW.id, OLD.id); END IF; -- Only broadcast if we found a valid project_id (i.e., not for projects table) IF topic_project_id IS NOT NULL THEN PERFORM realtime.broadcast_changes( 'topic:' || topic_project_id::text, -- topic - the topic to which we're broadcasting TG_OP, -- event - the event that triggered the function TG_OP, -- operation - the operation that triggered the function TG_TABLE_NAME, -- table - the table that caused the trigger TG_TABLE_SCHEMA, -- schema - the schema of the table that caused the trigger NEW, -- new record - the record after the change OLD -- old record - the record before the change ); END IF; RETURN NULL; END; $$; DROP TRIGGER IF EXISTS handle_conversations_changes ON public.conversations; CREATE TRIGGER handle_conversations_changes AFTER INSERT OR UPDATE OR DELETE ON public.conversations FOR EACH ROW EXECUTE FUNCTION project_changes (); DROP TRIGGER IF EXISTS handle_messages_changes ON public.messages; CREATE TRIGGER handle_messages_changes AFTER INSERT OR UPDATE OR DELETE ON public.messages FOR EACH ROW EXECUTE FUNCTION project_changes (); DROP POLICY IF EXISTS "Authenticated users can receive broadcasts" ON "realtime"."messages"; CREATE POLICY "Authenticated users can receive broadcasts" ON "realtime"."messages" FOR SELECT TO authenticated USING ( TRUE ); ================================================ FILE: apps/backend/supabase/migrations/0008_preview-img-storage.sql ================================================ delete from storage.objects where bucket_id = 'preview_images'; delete from storage.buckets where id = 'preview_images'; insert into storage.buckets (id, name, public) values ('preview_images', 'preview_images', true); -- Allow any users to select from preview_images files drop policy if exists "preview_images_select_policy" on storage.objects; create policy "preview_images_select_policy" on storage.objects for select to public using ( bucket_id = 'preview_images' ); -- Allow any users to insert into preview_images files drop policy if exists "preview_images_insert_policy" on storage.objects; create policy "preview_images_insert_policy" on storage.objects for insert to public with check ( bucket_id = 'preview_images' ); ================================================ FILE: apps/backend/supabase/migrations/0009_project_img_path.sql ================================================ ALTER TABLE "projects" DROP COLUMN IF EXISTS "preview_img_url";--> statement-breakpoint ALTER TABLE "projects" DROP COLUMN IF EXISTS "preview_img_path";--> statement-breakpoint ALTER TABLE "projects" DROP COLUMN IF EXISTS "preview_img_bucket";--> statement-breakpoint ALTER TABLE "projects" ADD COLUMN "preview_img_url" varchar;--> statement-breakpoint ALTER TABLE "projects" ADD COLUMN "preview_img_path" varchar;--> statement-breakpoint ALTER TABLE "projects" ADD COLUMN "preview_img_bucket" varchar;--> statement-breakpoint ================================================ FILE: apps/backend/supabase/migrations/0010_bent_edwin_jarvis.sql ================================================ -- Create new type CREATE TYPE "public"."verification_request_status" AS ENUM('active', 'expired', 'used');--> statement-breakpoint CREATE TABLE "custom_domains" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "apex_domain" text NOT NULL, "verified" boolean DEFAULT false NOT NULL, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL, CONSTRAINT "custom_domains_apex_domain_unique" UNIQUE("apex_domain") ); --> statement-breakpoint CREATE TABLE "preview_domains" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "full_domain" text NOT NULL, "project_id" uuid, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL, CONSTRAINT "preview_domains_full_domain_unique" UNIQUE("full_domain") ); --> statement-breakpoint CREATE TABLE "published_domains" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "domain_id" uuid, "project_id" uuid, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL, "full_domain" text NOT NULL, CONSTRAINT "published_domains_domain_id_unique" UNIQUE("domain_id"), CONSTRAINT "published_domains_full_domain_unique" UNIQUE("full_domain") ); --> statement-breakpoint CREATE TABLE "custom_domain_verification" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "domain_id" uuid NOT NULL, "project_id" uuid NOT NULL, "verification_id" text NOT NULL, "verification_code" text NOT NULL, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL, "status" "verification_request_status" DEFAULT 'active' NOT NULL ); --> statement-breakpoint ALTER TABLE "preview_domains" ADD CONSTRAINT "preview_domains_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "published_domains" ADD CONSTRAINT "published_domains_domain_id_custom_domains_id_fk" FOREIGN KEY ("domain_id") REFERENCES "public"."custom_domains"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "published_domains" ADD CONSTRAINT "published_domains_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "custom_domain_verification" ADD CONSTRAINT "custom_domain_verification_domain_id_custom_domains_id_fk" FOREIGN KEY ("domain_id") REFERENCES "public"."custom_domains"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "custom_domain_verification" ADD CONSTRAINT "custom_domain_verification_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "projects" DROP COLUMN IF EXISTS "preview_img"; ================================================ FILE: apps/backend/supabase/migrations/0011_typical_clea.sql ================================================ ;--> statement-breakpoint CREATE TYPE "public"."price_keys" AS ENUM('PRO_MONTHLY_TIER_1', 'PRO_MONTHLY_TIER_2', 'PRO_MONTHLY_TIER_3', 'PRO_MONTHLY_TIER_4', 'PRO_MONTHLY_TIER_5', 'PRO_MONTHLY_TIER_6', 'PRO_MONTHLY_TIER_7', 'PRO_MONTHLY_TIER_8', 'PRO_MONTHLY_TIER_9', 'PRO_MONTHLY_TIER_10', 'PRO_MONTHLY_TIER_11');--> statement-breakpoint CREATE TYPE "public"."product_type" AS ENUM('free', 'pro');--> statement-breakpoint CREATE TYPE "public"."scheduled_subscription_action" AS ENUM('price_change', 'cancellation');--> statement-breakpoint CREATE TYPE "public"."usage_types" AS ENUM('message', 'deployment');--> statement-breakpoint CREATE TYPE "public"."subscription_status" AS ENUM('active', 'canceled');--> statement-breakpoint CREATE TABLE "project_settings" ( "project_id" uuid NOT NULL, "run_command" text DEFAULT '' NOT NULL, "build_command" text DEFAULT '' NOT NULL, "install_command" text DEFAULT '' NOT NULL, CONSTRAINT "project_settings_project_id_unique" UNIQUE("project_id") ); --> statement-breakpoint ALTER TABLE "project_settings" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint CREATE TABLE "prices" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "product_id" uuid NOT NULL, "price_key" "price_keys" NOT NULL, "monthly_message_limit" integer NOT NULL, "stripe_price_id" text NOT NULL, CONSTRAINT "prices_stripe_price_id_unique" UNIQUE("stripe_price_id") ); --> statement-breakpoint ALTER TABLE "prices" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint CREATE TABLE "products" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "name" text NOT NULL, "type" "product_type" NOT NULL, "stripe_product_id" text NOT NULL, CONSTRAINT "products_stripe_product_id_unique" UNIQUE("stripe_product_id") ); --> statement-breakpoint ALTER TABLE "products" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint CREATE TABLE "subscriptions" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "user_id" uuid NOT NULL, "product_id" uuid NOT NULL, "price_id" uuid NOT NULL, "started_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL, "ended_at" timestamp with time zone, "status" "subscription_status" DEFAULT 'active' NOT NULL, "stripe_customer_id" text NOT NULL, "stripe_subscription_id" text NOT NULL, "stripe_subscription_item_id" text NOT NULL, "scheduled_action" "scheduled_subscription_action", "scheduled_price_id" uuid, "scheduled_change_at" timestamp with time zone, "stripe_subscription_schedule_id" text, CONSTRAINT "subscriptions_stripe_subscription_id_unique" UNIQUE("stripe_subscription_id"), CONSTRAINT "subscriptions_stripe_subscription_item_id_unique" UNIQUE("stripe_subscription_item_id") ); --> statement-breakpoint ALTER TABLE "subscriptions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint CREATE TABLE "usage_records" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "user_id" uuid NOT NULL, "type" "usage_types" DEFAULT 'message' NOT NULL, "timestamp" timestamp with time zone NOT NULL ); --> statement-breakpoint ALTER TABLE "usage_records" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "custom_domains" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "preview_domains" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "published_domains" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "custom_domain_verification" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "custom_domain_verification" ALTER COLUMN "status" SET DATA TYPE "public"."verification_request_status";--> statement-breakpoint ALTER TABLE "custom_domain_verification" ALTER COLUMN "status" SET DEFAULT 'active';--> statement-breakpoint ALTER TABLE "messages" ADD COLUMN "commit_oid" text;--> statement-breakpoint ALTER TABLE "user_settings" ADD COLUMN "should_warn_delete" boolean DEFAULT true NOT NULL;--> statement-breakpoint ALTER TABLE "project_settings" ADD CONSTRAINT "project_settings_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "prices" ADD CONSTRAINT "prices_product_id_products_id_fk" FOREIGN KEY ("product_id") REFERENCES "public"."products"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "subscriptions" ADD CONSTRAINT "subscriptions_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "subscriptions" ADD CONSTRAINT "subscriptions_product_id_products_id_fk" FOREIGN KEY ("product_id") REFERENCES "public"."products"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "subscriptions" ADD CONSTRAINT "subscriptions_price_id_prices_id_fk" FOREIGN KEY ("price_id") REFERENCES "public"."prices"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "subscriptions" ADD CONSTRAINT "subscriptions_scheduled_price_id_prices_id_fk" FOREIGN KEY ("scheduled_price_id") REFERENCES "public"."prices"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "usage_records" ADD CONSTRAINT "usage_records_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint DROP TYPE IF EXISTS "public"."status"; ================================================ FILE: apps/backend/supabase/migrations/0012_file-transfer-bucket.sql ================================================ delete from storage.objects where bucket_id = 'file_transfer'; delete from storage.buckets where id = 'file_transfer'; insert into storage.buckets (id, name, public) values ('file_transfer', 'file_transfer', false); -- Allow authenticated users to select only their own files from file_transfer drop policy if exists "file_transfer_select_policy" on storage.objects; create policy "file_transfer_select_policy" on storage.objects for select to authenticated using ( bucket_id = 'file_transfer' AND auth.uid() = owner ); -- Allow authenticated users to insert into file_transfer with their user ID as owner drop policy if exists "file_transfer_insert_policy" on storage.objects; create policy "file_transfer_insert_policy" on storage.objects for insert to authenticated with check ( bucket_id = 'file_transfer' AND auth.uid() = owner ); -- Allow authenticated users to delete only their own files drop policy if exists "file_transfer_delete_policy" on storage.objects; create policy "file_transfer_delete_policy" on storage.objects for delete to authenticated using ( bucket_id = 'file_transfer' AND auth.uid() = owner ); ================================================ FILE: apps/backend/supabase/migrations/0013_aspiring_kabuki.sql ================================================ CREATE TYPE "public"."project_create_status" AS ENUM('pending', 'completed', 'failed');--> statement-breakpoint CREATE TYPE "public"."deployment_status" AS ENUM('in_progress', 'completed', 'failed');--> statement-breakpoint CREATE TYPE "public"."deployment_type" AS ENUM('preview', 'custom', 'unpublish_preview', 'unpublish_custom');--> statement-breakpoint CREATE TABLE "project_create_requests" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "project_id" uuid NOT NULL, "context" jsonb NOT NULL, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL, "status" "project_create_status" DEFAULT 'pending' NOT NULL, CONSTRAINT "project_create_requests_project_id_unique" UNIQUE("project_id") ); --> statement-breakpoint ALTER TABLE "project_create_requests" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint CREATE TABLE "deployments" ( "id" uuid PRIMARY KEY NOT NULL, "requested_by" uuid NOT NULL, "project_id" uuid NOT NULL, "sandbox_id" text, "urls" text[], "type" "deployment_type" NOT NULL, "status" "deployment_status" NOT NULL, "message" text, "build_log" text, "error" text, "progress" integer, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL ); --> statement-breakpoint ALTER TABLE "deployments" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "users" ADD COLUMN "first_name" text;--> statement-breakpoint ALTER TABLE "users" ADD COLUMN "last_name" text;--> statement-breakpoint ALTER TABLE "users" ADD COLUMN "display_name" text;--> statement-breakpoint ALTER TABLE "users" ADD COLUMN "avatar_url" text;--> statement-breakpoint ALTER TABLE "users" ADD COLUMN "email" text;--> statement-breakpoint ALTER TABLE "users" ADD COLUMN "created_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint ALTER TABLE "users" ADD COLUMN "updated_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint ALTER TABLE "project_create_requests" ADD CONSTRAINT "project_create_requests_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "deployments" ADD CONSTRAINT "deployments_requested_by_users_id_fk" FOREIGN KEY ("requested_by") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "deployments" ADD CONSTRAINT "deployments_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE no action ON UPDATE no action; ================================================ FILE: apps/backend/supabase/migrations/0014_military_marrow.sql ================================================ CREATE TYPE "public"."project_custom_domain_status" AS ENUM('active', 'cancelled');--> statement-breakpoint CREATE TABLE "project_custom_domains" ( "full_domain" text NOT NULL, "custom_domain_id" uuid NOT NULL, "project_id" uuid NOT NULL, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL, "status" "project_custom_domain_status" DEFAULT 'active' NOT NULL, CONSTRAINT "project_custom_domains_custom_domain_id_project_id_pk" PRIMARY KEY("custom_domain_id","project_id") ); --> statement-breakpoint ALTER TABLE "project_custom_domains" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint DROP TABLE "published_domains" CASCADE;--> statement-breakpoint ALTER TABLE "custom_domain_verification" RENAME COLUMN "domain_id" TO "custom_domain_id";--> statement-breakpoint ALTER TABLE "custom_domain_verification" RENAME COLUMN "verification_id" TO "freestyle_verification_id";--> statement-breakpoint ALTER TABLE "custom_domain_verification" DROP CONSTRAINT "custom_domain_verification_domain_id_custom_domains_id_fk"; --> statement-breakpoint ALTER TABLE "custom_domain_verification" DROP COLUMN "status";--> statement-breakpoint DROP TYPE IF EXISTS "public"."verification_request_status";--> statement-breakpoint CREATE TYPE "public"."verification_request_status" AS ENUM('pending', 'verified', 'cancelled');--> statement-breakpoint ALTER TABLE "custom_domain_verification" ADD COLUMN "status" "verification_request_status" NOT NULL DEFAULT 'pending';--> statement-breakpoint ALTER TABLE "custom_domain_verification" ADD COLUMN "full_domain" text NOT NULL;--> statement-breakpoint ALTER TABLE "custom_domain_verification" ADD COLUMN "txt_record" jsonb NOT NULL;--> statement-breakpoint ALTER TABLE "custom_domain_verification" ADD COLUMN "a_records" jsonb DEFAULT '[]'::jsonb NOT NULL;--> statement-breakpoint ALTER TABLE "project_custom_domains" ADD CONSTRAINT "project_custom_domains_custom_domain_id_custom_domains_id_fk" FOREIGN KEY ("custom_domain_id") REFERENCES "public"."custom_domains"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "project_custom_domains" ADD CONSTRAINT "project_custom_domains_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "custom_domain_verification" ADD CONSTRAINT "custom_domain_verification_custom_domain_id_custom_domains_id_fk" FOREIGN KEY ("custom_domain_id") REFERENCES "public"."custom_domains"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "custom_domain_verification" DROP COLUMN "verification_code"; ================================================ FILE: apps/backend/supabase/migrations/0015_same_leo.sql ================================================ --> statement-breakpoint ALTER TYPE "public"."deployment_status" ADD VALUE 'pending' BEFORE 'in_progress';--> statement-breakpoint ALTER TYPE "public"."deployment_status" ADD VALUE 'cancelled';--> statement-breakpoint CREATE TABLE "legacy_subscriptions" ( "email" text PRIMARY KEY NOT NULL, "stripe_coupon_id" text NOT NULL, "stripe_promotion_code_id" text NOT NULL, "stripe_promotion_code" text NOT NULL, "redeem_at" timestamp with time zone, "redeem_by" timestamp with time zone ); --> statement-breakpoint ALTER TABLE "legacy_subscriptions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "deployments" ADD COLUMN "build_script" text;--> statement-breakpoint ALTER TABLE "deployments" ADD COLUMN "build_flags" text;--> statement-breakpoint ALTER TABLE "deployments" ADD COLUMN "env_vars" jsonb; ================================================ FILE: apps/backend/supabase/migrations/0016_pretty_dust.sql ================================================ CREATE TABLE "rate_limits" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "user_id" uuid NOT NULL, "subscription_id" uuid NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL, "started_at" timestamp with time zone NOT NULL, "ended_at" timestamp with time zone NOT NULL, "max" integer NOT NULL, "left" integer DEFAULT 0 NOT NULL, "carry_over_key" uuid NOT NULL, "carry_over_total" integer DEFAULT 0 NOT NULL, "stripe_subscription_item_id" text NOT NULL ); --> statement-breakpoint ALTER TABLE "rate_limits" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "messages" ALTER COLUMN "applied" DROP DEFAULT;--> statement-breakpoint ALTER TABLE "messages" ALTER COLUMN "applied" DROP NOT NULL;--> statement-breakpoint ALTER TABLE "messages" ALTER COLUMN "snapshots" DROP DEFAULT;--> statement-breakpoint ALTER TABLE "messages" ALTER COLUMN "snapshots" DROP NOT NULL;--> statement-breakpoint ALTER TABLE "conversations" ADD COLUMN "suggestions" jsonb DEFAULT '[]'::jsonb;--> statement-breakpoint ALTER TABLE "messages" ADD COLUMN "checkpoints" jsonb DEFAULT '[]'::jsonb NOT NULL;--> statement-breakpoint ALTER TABLE "subscriptions" ADD COLUMN "stripe_current_period_start" timestamp with time zone NOT NULL;--> statement-breakpoint ALTER TABLE "subscriptions" ADD COLUMN "stripe_current_period_end" timestamp with time zone NOT NULL;--> statement-breakpoint ALTER TABLE "users" ADD COLUMN "stripe_customer_id" text;--> statement-breakpoint ALTER TABLE "rate_limits" ADD CONSTRAINT "rate_limits_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "rate_limits" ADD CONSTRAINT "rate_limits_subscription_id_subscriptions_id_fk" FOREIGN KEY ("subscription_id") REFERENCES "public"."subscriptions"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint CREATE INDEX "rate_limits_user_time_idx" ON "rate_limits" USING btree ("user_id","started_at","ended_at");--> statement-breakpoint CREATE INDEX "usage_records_user_time_idx" ON "usage_records" USING btree ("user_id","timestamp");--> statement-breakpoint ================================================ FILE: apps/backend/supabase/migrations/0017_small_xavin.sql ================================================ --> statement-breakpoint CREATE TABLE "feedbacks" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "user_id" uuid, "email" text, "message" text NOT NULL, "page_url" text, "user_agent" text, "attachments" jsonb DEFAULT '[]'::jsonb NOT NULL, "metadata" jsonb DEFAULT '{}'::jsonb NOT NULL, "created_at" timestamp with time zone DEFAULT now() NOT NULL ); --> statement-breakpoint ALTER TABLE "feedbacks" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "project_invitations" DROP CONSTRAINT "project_invitations_invitee_email_project_id_unique";--> statement-breakpoint ALTER TABLE "custom_domain_verification" DROP CONSTRAINT "custom_domain_verification_project_id_projects_id_fk"; --> statement-breakpoint ALTER TABLE "preview_domains" DROP CONSTRAINT "preview_domains_project_id_projects_id_fk"; --> statement-breakpoint ALTER TABLE "deployments" DROP CONSTRAINT "deployments_project_id_projects_id_fk"; --> statement-breakpoint ALTER TABLE "projects" ADD COLUMN "tags" varchar[] DEFAULT '{}';--> statement-breakpoint ALTER TABLE "projects" ADD COLUMN "updated_preview_img_at" timestamp with time zone;--> statement-breakpoint ALTER TABLE "feedbacks" ADD CONSTRAINT "feedbacks_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "custom_domain_verification" ADD CONSTRAINT "custom_domain_verification_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "preview_domains" ADD CONSTRAINT "preview_domains_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "deployments" ADD CONSTRAINT "deployments_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint CREATE INDEX "project_invitations_invitee_email_project_id_idx" ON "project_invitations" USING btree ("invitee_email","project_id"); ================================================ FILE: apps/backend/supabase/migrations/0018_lush_thanos.sql ================================================ CREATE TABLE "branches" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "project_id" uuid NOT NULL, "name" varchar NOT NULL, "description" text, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL, "is_default" boolean DEFAULT false NOT NULL, "git_branch" varchar, "git_commit_sha" varchar, "git_repo_url" varchar, "sandbox_id" varchar NOT NULL ); --> statement-breakpoint ALTER TABLE "branches" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint ALTER TABLE "frames" ALTER COLUMN "type" SET DATA TYPE text;--> statement-breakpoint ALTER TABLE "frames" ALTER COLUMN "type" DROP NOT NULL;--> statement-breakpoint ALTER TABLE "projects" ALTER COLUMN "sandbox_id" DROP NOT NULL;--> statement-breakpoint ALTER TABLE "projects" ALTER COLUMN "sandbox_url" DROP NOT NULL;--> statement-breakpoint ALTER TABLE "frames" ADD COLUMN "branch_id" uuid;--> statement-breakpoint ALTER TABLE "usage_records" ADD COLUMN "trace_id" varchar(255);--> statement-breakpoint ALTER TABLE "branches" ADD CONSTRAINT "branches_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint CREATE INDEX "branches_project_id_idx" ON "branches" USING btree ("project_id");--> statement-breakpoint CREATE UNIQUE INDEX "branches_name_per_project_ux" ON "branches" USING btree ("project_id","name");--> statement-breakpoint CREATE UNIQUE INDEX "branches_default_per_project_ux" ON "branches" USING btree ("project_id") WHERE "branches"."is_default" = true;--> statement-breakpoint ALTER TABLE "frames" ADD CONSTRAINT "frames_branch_id_branches_id_fk" FOREIGN KEY ("branch_id") REFERENCES "public"."branches"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "usage_records" ADD CONSTRAINT "usage_records_user_trace_idx" UNIQUE("user_id","trace_id");--> statement-breakpoint DROP TYPE "public"."frame_type"; ================================================ FILE: apps/backend/supabase/migrations/0019_abandoned_psylocke.sql ================================================ ALTER TYPE "public"."message_role" ADD VALUE 'system';--> statement-breakpoint ALTER TABLE "users" ADD COLUMN "github_installation_id" text; ================================================ FILE: apps/backend/supabase/migrations/meta/0000_snapshot.json ================================================ { "id": "95612ed1-7374-41c8-8f07-1ee3b064226b", "prevId": "00000000-0000-0000-0000-000000000000", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img": { "name": "preview_img", "type": "varchar", "primaryKey": false, "notNull": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0001_snapshot.json ================================================ { "id": "7fab2c6f-cf80-420e-bad4-3d6065d58b9c", "prevId": "95612ed1-7374-41c8-8f07-1ee3b064226b", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img": { "name": "preview_img", "type": "varchar", "primaryKey": false, "notNull": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0002_snapshot.json ================================================ { "id": "cf650e40-2b28-43b0-bfcd-fdd3603f7f88", "prevId": "7fab2c6f-cf80-420e-bad4-3d6065d58b9c", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img": { "name": "preview_img", "type": "varchar", "primaryKey": false, "notNull": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0003_snapshot.json ================================================ { "id": "518e58bf-052b-4c2c-8095-3fa357233432", "prevId": "cf650e40-2b28-43b0-bfcd-fdd3603f7f88", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img": { "name": "preview_img", "type": "varchar", "primaryKey": false, "notNull": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0004_snapshot.json ================================================ { "id": "6187c007-6c6d-4e4f-af6e-a232e3cd5cf6", "prevId": "518e58bf-052b-4c2c-8095-3fa357233432", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "invitation_status", "primaryKey": false, "notNull": true, "default": "'pending'" }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "tableTo": "users", "columnsFrom": [ "inviter_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img": { "name": "preview_img", "type": "varchar", "primaryKey": false, "notNull": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.invitation_status": { "name": "invitation_status", "schema": "public", "values": [ "pending", "accepted", "expired" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0005_snapshot.json ================================================ { "id": "3d0069f3-846f-40fb-903d-6e3375df0e77", "prevId": "6187c007-6c6d-4e4f-af6e-a232e3cd5cf6", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "tableTo": "users", "columnsFrom": [ "inviter_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] }, "project_invitations_invitee_email_project_id_unique": { "name": "project_invitations_invitee_email_project_id_unique", "nullsNotDistinct": false, "columns": [ "invitee_email", "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img": { "name": "preview_img", "type": "varchar", "primaryKey": false, "notNull": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0006_snapshot.json ================================================ { "id": "28cb89f1-cebc-487a-84e2-0341168df378", "prevId": "3d0069f3-846f-40fb-903d-6e3375df0e77", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "columnsFrom": [ "canvas_id" ], "tableTo": "canvas", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "columnsFrom": [ "conversation_id" ], "tableTo": "conversations", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "columnsFrom": [ "inviter_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "columns": [ "token" ], "nullsNotDistinct": false }, "project_invitations_invitee_email_project_id_unique": { "name": "project_invitations_invitee_email_project_id_unique", "columns": [ "invitee_email", "project_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img": { "name": "preview_img", "type": "varchar", "primaryKey": false, "notNull": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "columns": [ "user_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "columnsFrom": [ "id" ], "tableTo": "users", "schemaTo": "auth", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "columnsFrom": [ "canvas_id" ], "tableTo": "canvas", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": {}, "views": {}, "sequences": {}, "roles": {}, "policies": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0007_snapshot.json ================================================ { "id": "138016e8-55b3-439e-9bc9-f5f2d1b38bb6", "prevId": "28cb89f1-cebc-487a-84e2-0341168df378", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "columnsFrom": [ "canvas_id" ], "tableTo": "canvas", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "columnsFrom": [ "conversation_id" ], "tableTo": "conversations", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "columnsFrom": [ "inviter_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "columns": [ "token" ], "nullsNotDistinct": false }, "project_invitations_invitee_email_project_id_unique": { "name": "project_invitations_invitee_email_project_id_unique", "columns": [ "invitee_email", "project_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img": { "name": "preview_img", "type": "varchar", "primaryKey": false, "notNull": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "columns": [ "user_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "columnsFrom": [ "id" ], "tableTo": "users", "schemaTo": "auth", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "columnsFrom": [ "canvas_id" ], "tableTo": "canvas", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": {}, "views": {}, "sequences": {}, "roles": {}, "policies": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0008_snapshot.json ================================================ { "id": "190b8f91-9fa5-44da-a7db-e38b9154da04", "prevId": "138016e8-55b3-439e-9bc9-f5f2d1b38bb6", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "columnsFrom": [ "canvas_id" ], "tableTo": "canvas", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "columnsFrom": [ "conversation_id" ], "tableTo": "conversations", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "columnsFrom": [ "inviter_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "columns": [ "token" ], "nullsNotDistinct": false }, "project_invitations_invitee_email_project_id_unique": { "name": "project_invitations_invitee_email_project_id_unique", "columns": [ "invitee_email", "project_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img": { "name": "preview_img", "type": "varchar", "primaryKey": false, "notNull": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "columns": [ "user_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "columnsFrom": [ "id" ], "tableTo": "users", "schemaTo": "auth", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "columnsFrom": [ "canvas_id" ], "tableTo": "canvas", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": {}, "views": {}, "sequences": {}, "roles": {}, "policies": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0009_snapshot.json ================================================ { "id": "b234e1b4-c30a-471f-b431-233cb4947039", "prevId": "190b8f91-9fa5-44da-a7db-e38b9154da04", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "columnsFrom": [ "canvas_id" ], "tableTo": "canvas", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "columnsFrom": [ "conversation_id" ], "tableTo": "conversations", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "columnsFrom": [ "inviter_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "columns": [ "token" ], "nullsNotDistinct": false }, "project_invitations_invitee_email_project_id_unique": { "name": "project_invitations_invitee_email_project_id_unique", "columns": [ "invitee_email", "project_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img": { "name": "preview_img", "type": "varchar", "primaryKey": false, "notNull": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "columns": [ "user_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "columnsFrom": [ "id" ], "tableTo": "users", "schemaTo": "auth", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "columnsFrom": [ "canvas_id" ], "tableTo": "canvas", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": {}, "views": {}, "sequences": {}, "roles": {}, "policies": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0010_snapshot.json ================================================ { "id": "866fb593-8f7d-431f-b791-226ede7ab0c4", "prevId": "b234e1b4-c30a-471f-b431-233cb4947039", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domains": { "name": "custom_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "apex_domain": { "name": "apex_domain", "type": "text", "primaryKey": false, "notNull": true }, "verified": { "name": "verified", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "custom_domains_apex_domain_unique": { "name": "custom_domains_apex_domain_unique", "nullsNotDistinct": false, "columns": [ "apex_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.preview_domains": { "name": "preview_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "preview_domains_project_id_projects_id_fk": { "name": "preview_domains_project_id_projects_id_fk", "tableFrom": "preview_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "preview_domains_full_domain_unique": { "name": "preview_domains_full_domain_unique", "nullsNotDistinct": false, "columns": [ "full_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.published_domains": { "name": "published_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "domain_id": { "name": "domain_id", "type": "uuid", "primaryKey": false, "notNull": false }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "published_domains_domain_id_custom_domains_id_fk": { "name": "published_domains_domain_id_custom_domains_id_fk", "tableFrom": "published_domains", "tableTo": "custom_domains", "columnsFrom": [ "domain_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "published_domains_project_id_projects_id_fk": { "name": "published_domains_project_id_projects_id_fk", "tableFrom": "published_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "published_domains_domain_id_unique": { "name": "published_domains_domain_id_unique", "nullsNotDistinct": false, "columns": [ "domain_id" ] }, "published_domains_full_domain_unique": { "name": "published_domains_full_domain_unique", "nullsNotDistinct": false, "columns": [ "full_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.custom_domain_verification": { "name": "custom_domain_verification", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "domain_id": { "name": "domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "verification_id": { "name": "verification_id", "type": "text", "primaryKey": false, "notNull": true }, "verification_code": { "name": "verification_code", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "status", "primaryKey": false, "notNull": true, "default": "'active'" } }, "indexes": {}, "foreignKeys": { "custom_domain_verification_domain_id_custom_domains_id_fk": { "name": "custom_domain_verification_domain_id_custom_domains_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "custom_domains", "columnsFrom": [ "domain_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "custom_domain_verification_project_id_projects_id_fk": { "name": "custom_domain_verification_project_id_projects_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "tableTo": "users", "columnsFrom": [ "inviter_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] }, "project_invitations_invitee_email_project_id_unique": { "name": "project_invitations_invitee_email_project_id_unique", "nullsNotDistinct": false, "columns": [ "invitee_email", "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img_url": { "name": "preview_img_url", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_path": { "name": "preview_img_path", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_bucket": { "name": "preview_img_bucket", "type": "varchar", "primaryKey": false, "notNull": false }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.status": { "name": "status", "schema": "public", "values": [ "active", "expired", "used" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0011_snapshot.json ================================================ { "id": "6913ab93-9cf1-4ab2-96f9-7e1d5c124999", "prevId": "866fb593-8f7d-431f-b791-226ede7ab0c4", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "commit_oid": { "name": "commit_oid", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domains": { "name": "custom_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "apex_domain": { "name": "apex_domain", "type": "text", "primaryKey": false, "notNull": true }, "verified": { "name": "verified", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "custom_domains_apex_domain_unique": { "name": "custom_domains_apex_domain_unique", "nullsNotDistinct": false, "columns": [ "apex_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.preview_domains": { "name": "preview_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "preview_domains_project_id_projects_id_fk": { "name": "preview_domains_project_id_projects_id_fk", "tableFrom": "preview_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "preview_domains_full_domain_unique": { "name": "preview_domains_full_domain_unique", "nullsNotDistinct": false, "columns": [ "full_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.published_domains": { "name": "published_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "domain_id": { "name": "domain_id", "type": "uuid", "primaryKey": false, "notNull": false }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "published_domains_domain_id_custom_domains_id_fk": { "name": "published_domains_domain_id_custom_domains_id_fk", "tableFrom": "published_domains", "tableTo": "custom_domains", "columnsFrom": [ "domain_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "published_domains_project_id_projects_id_fk": { "name": "published_domains_project_id_projects_id_fk", "tableFrom": "published_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "published_domains_domain_id_unique": { "name": "published_domains_domain_id_unique", "nullsNotDistinct": false, "columns": [ "domain_id" ] }, "published_domains_full_domain_unique": { "name": "published_domains_full_domain_unique", "nullsNotDistinct": false, "columns": [ "full_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domain_verification": { "name": "custom_domain_verification", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "domain_id": { "name": "domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "verification_id": { "name": "verification_id", "type": "text", "primaryKey": false, "notNull": true }, "verification_code": { "name": "verification_code", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "verification_request_status", "primaryKey": false, "notNull": true, "default": "'active'" } }, "indexes": {}, "foreignKeys": { "custom_domain_verification_domain_id_custom_domains_id_fk": { "name": "custom_domain_verification_domain_id_custom_domains_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "custom_domains", "columnsFrom": [ "domain_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "custom_domain_verification_project_id_projects_id_fk": { "name": "custom_domain_verification_project_id_projects_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "tableTo": "users", "columnsFrom": [ "inviter_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] }, "project_invitations_invitee_email_project_id_unique": { "name": "project_invitations_invitee_email_project_id_unique", "nullsNotDistinct": false, "columns": [ "invitee_email", "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img_url": { "name": "preview_img_url", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_path": { "name": "preview_img_path", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_bucket": { "name": "preview_img_bucket", "type": "varchar", "primaryKey": false, "notNull": false }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_settings": { "name": "project_settings", "schema": "", "columns": { "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "run_command": { "name": "run_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "build_command": { "name": "build_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "install_command": { "name": "install_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" } }, "indexes": {}, "foreignKeys": { "project_settings_project_id_projects_id_fk": { "name": "project_settings_project_id_projects_id_fk", "tableFrom": "project_settings", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_settings_project_id_unique": { "name": "project_settings_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.prices": { "name": "prices", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_key": { "name": "price_key", "type": "price_keys", "primaryKey": false, "notNull": true }, "monthly_message_limit": { "name": "monthly_message_limit", "type": "integer", "primaryKey": false, "notNull": true }, "stripe_price_id": { "name": "stripe_price_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "prices_product_id_products_id_fk": { "name": "prices_product_id_products_id_fk", "tableFrom": "prices", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "prices_stripe_price_id_unique": { "name": "prices_stripe_price_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_price_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.products": { "name": "products", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "product_type", "primaryKey": false, "notNull": true }, "stripe_product_id": { "name": "stripe_product_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "products_stripe_product_id_unique": { "name": "products_stripe_product_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_product_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.subscriptions": { "name": "subscriptions", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_id": { "name": "price_id", "type": "uuid", "primaryKey": false, "notNull": true }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_id": { "name": "stripe_subscription_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true }, "scheduled_action": { "name": "scheduled_action", "type": "scheduled_subscription_action", "primaryKey": false, "notNull": false }, "scheduled_price_id": { "name": "scheduled_price_id", "type": "uuid", "primaryKey": false, "notNull": false }, "scheduled_change_at": { "name": "scheduled_change_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "stripe_subscription_schedule_id": { "name": "stripe_subscription_schedule_id", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "subscriptions_user_id_users_id_fk": { "name": "subscriptions_user_id_users_id_fk", "tableFrom": "subscriptions", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_product_id_products_id_fk": { "name": "subscriptions_product_id_products_id_fk", "tableFrom": "subscriptions", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_price_id_prices_id_fk": { "name": "subscriptions_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_scheduled_price_id_prices_id_fk": { "name": "subscriptions_scheduled_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "scheduled_price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "subscriptions_stripe_subscription_id_unique": { "name": "subscriptions_stripe_subscription_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_id" ] }, "subscriptions_stripe_subscription_item_id_unique": { "name": "subscriptions_stripe_subscription_item_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_item_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.usage_records": { "name": "usage_records", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "usage_types", "primaryKey": false, "notNull": true, "default": "'message'" }, "timestamp": { "name": "timestamp", "type": "timestamp with time zone", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "usage_records_user_id_users_id_fk": { "name": "usage_records_user_id_users_id_fk", "tableFrom": "usage_records", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "should_warn_delete": { "name": "should_warn_delete", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.verification_request_status": { "name": "verification_request_status", "schema": "public", "values": [ "active", "expired", "used" ] }, "public.price_keys": { "name": "price_keys", "schema": "public", "values": [ "PRO_MONTHLY_TIER_1", "PRO_MONTHLY_TIER_2", "PRO_MONTHLY_TIER_3", "PRO_MONTHLY_TIER_4", "PRO_MONTHLY_TIER_5", "PRO_MONTHLY_TIER_6", "PRO_MONTHLY_TIER_7", "PRO_MONTHLY_TIER_8", "PRO_MONTHLY_TIER_9", "PRO_MONTHLY_TIER_10", "PRO_MONTHLY_TIER_11" ] }, "public.product_type": { "name": "product_type", "schema": "public", "values": [ "free", "pro" ] }, "public.scheduled_subscription_action": { "name": "scheduled_subscription_action", "schema": "public", "values": [ "price_change", "cancellation" ] }, "public.usage_types": { "name": "usage_types", "schema": "public", "values": [ "message", "deployment" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0012_snapshot.json ================================================ { "id": "7fe865fd-ad69-4633-8197-fce5dda31a09", "prevId": "6913ab93-9cf1-4ab2-96f9-7e1d5c124999", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "columnsFrom": [ "canvas_id" ], "tableTo": "canvas", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "commit_oid": { "name": "commit_oid", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "columnsFrom": [ "conversation_id" ], "tableTo": "conversations", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domains": { "name": "custom_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "apex_domain": { "name": "apex_domain", "type": "text", "primaryKey": false, "notNull": true }, "verified": { "name": "verified", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "custom_domains_apex_domain_unique": { "name": "custom_domains_apex_domain_unique", "columns": [ "apex_domain" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.preview_domains": { "name": "preview_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "preview_domains_project_id_projects_id_fk": { "name": "preview_domains_project_id_projects_id_fk", "tableFrom": "preview_domains", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "no action", "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "preview_domains_full_domain_unique": { "name": "preview_domains_full_domain_unique", "columns": [ "full_domain" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.published_domains": { "name": "published_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "domain_id": { "name": "domain_id", "type": "uuid", "primaryKey": false, "notNull": false }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "published_domains_domain_id_custom_domains_id_fk": { "name": "published_domains_domain_id_custom_domains_id_fk", "tableFrom": "published_domains", "columnsFrom": [ "domain_id" ], "tableTo": "custom_domains", "columnsTo": [ "id" ], "onUpdate": "no action", "onDelete": "no action" }, "published_domains_project_id_projects_id_fk": { "name": "published_domains_project_id_projects_id_fk", "tableFrom": "published_domains", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "no action", "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "published_domains_domain_id_unique": { "name": "published_domains_domain_id_unique", "columns": [ "domain_id" ], "nullsNotDistinct": false }, "published_domains_full_domain_unique": { "name": "published_domains_full_domain_unique", "columns": [ "full_domain" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domain_verification": { "name": "custom_domain_verification", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "domain_id": { "name": "domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "verification_id": { "name": "verification_id", "type": "text", "primaryKey": false, "notNull": true }, "verification_code": { "name": "verification_code", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "verification_request_status", "primaryKey": false, "notNull": true, "default": "'active'" } }, "indexes": {}, "foreignKeys": { "custom_domain_verification_domain_id_custom_domains_id_fk": { "name": "custom_domain_verification_domain_id_custom_domains_id_fk", "tableFrom": "custom_domain_verification", "columnsFrom": [ "domain_id" ], "tableTo": "custom_domains", "columnsTo": [ "id" ], "onUpdate": "no action", "onDelete": "no action" }, "custom_domain_verification_project_id_projects_id_fk": { "name": "custom_domain_verification_project_id_projects_id_fk", "tableFrom": "custom_domain_verification", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "no action", "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "columnsFrom": [ "inviter_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "columns": [ "token" ], "nullsNotDistinct": false }, "project_invitations_invitee_email_project_id_unique": { "name": "project_invitations_invitee_email_project_id_unique", "columns": [ "invitee_email", "project_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img_url": { "name": "preview_img_url", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_path": { "name": "preview_img_path", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_bucket": { "name": "preview_img_bucket", "type": "varchar", "primaryKey": false, "notNull": false }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_settings": { "name": "project_settings", "schema": "", "columns": { "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "run_command": { "name": "run_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "build_command": { "name": "build_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "install_command": { "name": "install_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" } }, "indexes": {}, "foreignKeys": { "project_settings_project_id_projects_id_fk": { "name": "project_settings_project_id_projects_id_fk", "tableFrom": "project_settings", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_settings_project_id_unique": { "name": "project_settings_project_id_unique", "columns": [ "project_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.prices": { "name": "prices", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_key": { "name": "price_key", "type": "price_keys", "primaryKey": false, "notNull": true }, "monthly_message_limit": { "name": "monthly_message_limit", "type": "integer", "primaryKey": false, "notNull": true }, "stripe_price_id": { "name": "stripe_price_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "prices_product_id_products_id_fk": { "name": "prices_product_id_products_id_fk", "tableFrom": "prices", "columnsFrom": [ "product_id" ], "tableTo": "products", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "prices_stripe_price_id_unique": { "name": "prices_stripe_price_id_unique", "columns": [ "stripe_price_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.products": { "name": "products", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "product_type", "primaryKey": false, "notNull": true }, "stripe_product_id": { "name": "stripe_product_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "products_stripe_product_id_unique": { "name": "products_stripe_product_id_unique", "columns": [ "stripe_product_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.subscriptions": { "name": "subscriptions", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_id": { "name": "price_id", "type": "uuid", "primaryKey": false, "notNull": true }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_id": { "name": "stripe_subscription_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true }, "scheduled_action": { "name": "scheduled_action", "type": "scheduled_subscription_action", "primaryKey": false, "notNull": false }, "scheduled_price_id": { "name": "scheduled_price_id", "type": "uuid", "primaryKey": false, "notNull": false }, "scheduled_change_at": { "name": "scheduled_change_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "stripe_subscription_schedule_id": { "name": "stripe_subscription_schedule_id", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "subscriptions_user_id_users_id_fk": { "name": "subscriptions_user_id_users_id_fk", "tableFrom": "subscriptions", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "no action", "onDelete": "no action" }, "subscriptions_product_id_products_id_fk": { "name": "subscriptions_product_id_products_id_fk", "tableFrom": "subscriptions", "columnsFrom": [ "product_id" ], "tableTo": "products", "columnsTo": [ "id" ], "onUpdate": "no action", "onDelete": "no action" }, "subscriptions_price_id_prices_id_fk": { "name": "subscriptions_price_id_prices_id_fk", "tableFrom": "subscriptions", "columnsFrom": [ "price_id" ], "tableTo": "prices", "columnsTo": [ "id" ], "onUpdate": "no action", "onDelete": "no action" }, "subscriptions_scheduled_price_id_prices_id_fk": { "name": "subscriptions_scheduled_price_id_prices_id_fk", "tableFrom": "subscriptions", "columnsFrom": [ "scheduled_price_id" ], "tableTo": "prices", "columnsTo": [ "id" ], "onUpdate": "no action", "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "subscriptions_stripe_subscription_id_unique": { "name": "subscriptions_stripe_subscription_id_unique", "columns": [ "stripe_subscription_id" ], "nullsNotDistinct": false }, "subscriptions_stripe_subscription_item_id_unique": { "name": "subscriptions_stripe_subscription_item_id_unique", "columns": [ "stripe_subscription_item_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.usage_records": { "name": "usage_records", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "usage_types", "primaryKey": false, "notNull": true, "default": "'message'" }, "timestamp": { "name": "timestamp", "type": "timestamp with time zone", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "usage_records_user_id_users_id_fk": { "name": "usage_records_user_id_users_id_fk", "tableFrom": "usage_records", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "no action", "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "should_warn_delete": { "name": "should_warn_delete", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "columns": [ "user_id" ], "nullsNotDistinct": false } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "columnsFrom": [ "id" ], "tableTo": "users", "schemaTo": "auth", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "columnsFrom": [ "canvas_id" ], "tableTo": "canvas", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "columnsFrom": [ "user_id" ], "tableTo": "users", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "columnsFrom": [ "project_id" ], "tableTo": "projects", "columnsTo": [ "id" ], "onUpdate": "cascade", "onDelete": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.verification_request_status": { "name": "verification_request_status", "schema": "public", "values": [ "active", "expired", "used" ] }, "public.price_keys": { "name": "price_keys", "schema": "public", "values": [ "PRO_MONTHLY_TIER_1", "PRO_MONTHLY_TIER_2", "PRO_MONTHLY_TIER_3", "PRO_MONTHLY_TIER_4", "PRO_MONTHLY_TIER_5", "PRO_MONTHLY_TIER_6", "PRO_MONTHLY_TIER_7", "PRO_MONTHLY_TIER_8", "PRO_MONTHLY_TIER_9", "PRO_MONTHLY_TIER_10", "PRO_MONTHLY_TIER_11" ] }, "public.product_type": { "name": "product_type", "schema": "public", "values": [ "free", "pro" ] }, "public.scheduled_subscription_action": { "name": "scheduled_subscription_action", "schema": "public", "values": [ "price_change", "cancellation" ] }, "public.usage_types": { "name": "usage_types", "schema": "public", "values": [ "message", "deployment" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": {}, "views": {}, "sequences": {}, "roles": {}, "policies": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0013_snapshot.json ================================================ { "id": "ee92d761-f1e2-4588-a659-34e2f8c57e5a", "prevId": "7fe865fd-ad69-4633-8197-fce5dda31a09", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "commit_oid": { "name": "commit_oid", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_create_requests": { "name": "project_create_requests", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_create_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "project_create_requests_project_id_projects_id_fk": { "name": "project_create_requests_project_id_projects_id_fk", "tableFrom": "project_create_requests", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_create_requests_project_id_unique": { "name": "project_create_requests_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.deployments": { "name": "deployments", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "requested_by": { "name": "requested_by", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "text", "primaryKey": false, "notNull": false }, "urls": { "name": "urls", "type": "text[]", "primaryKey": false, "notNull": false }, "type": { "name": "type", "type": "deployment_type", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "deployment_status", "primaryKey": false, "notNull": true }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": false }, "build_log": { "name": "build_log", "type": "text", "primaryKey": false, "notNull": false }, "error": { "name": "error", "type": "text", "primaryKey": false, "notNull": false }, "progress": { "name": "progress", "type": "integer", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "deployments_requested_by_users_id_fk": { "name": "deployments_requested_by_users_id_fk", "tableFrom": "deployments", "tableTo": "users", "columnsFrom": [ "requested_by" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "deployments_project_id_projects_id_fk": { "name": "deployments_project_id_projects_id_fk", "tableFrom": "deployments", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domains": { "name": "custom_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "apex_domain": { "name": "apex_domain", "type": "text", "primaryKey": false, "notNull": true }, "verified": { "name": "verified", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "custom_domains_apex_domain_unique": { "name": "custom_domains_apex_domain_unique", "nullsNotDistinct": false, "columns": [ "apex_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.preview_domains": { "name": "preview_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "preview_domains_project_id_projects_id_fk": { "name": "preview_domains_project_id_projects_id_fk", "tableFrom": "preview_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "preview_domains_full_domain_unique": { "name": "preview_domains_full_domain_unique", "nullsNotDistinct": false, "columns": [ "full_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.published_domains": { "name": "published_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "domain_id": { "name": "domain_id", "type": "uuid", "primaryKey": false, "notNull": false }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "published_domains_domain_id_custom_domains_id_fk": { "name": "published_domains_domain_id_custom_domains_id_fk", "tableFrom": "published_domains", "tableTo": "custom_domains", "columnsFrom": [ "domain_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "published_domains_project_id_projects_id_fk": { "name": "published_domains_project_id_projects_id_fk", "tableFrom": "published_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "published_domains_domain_id_unique": { "name": "published_domains_domain_id_unique", "nullsNotDistinct": false, "columns": [ "domain_id" ] }, "published_domains_full_domain_unique": { "name": "published_domains_full_domain_unique", "nullsNotDistinct": false, "columns": [ "full_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domain_verification": { "name": "custom_domain_verification", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "domain_id": { "name": "domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "verification_id": { "name": "verification_id", "type": "text", "primaryKey": false, "notNull": true }, "verification_code": { "name": "verification_code", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "verification_request_status", "primaryKey": false, "notNull": true, "default": "'active'" } }, "indexes": {}, "foreignKeys": { "custom_domain_verification_domain_id_custom_domains_id_fk": { "name": "custom_domain_verification_domain_id_custom_domains_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "custom_domains", "columnsFrom": [ "domain_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "custom_domain_verification_project_id_projects_id_fk": { "name": "custom_domain_verification_project_id_projects_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "tableTo": "users", "columnsFrom": [ "inviter_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] }, "project_invitations_invitee_email_project_id_unique": { "name": "project_invitations_invitee_email_project_id_unique", "nullsNotDistinct": false, "columns": [ "invitee_email", "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img_url": { "name": "preview_img_url", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_path": { "name": "preview_img_path", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_bucket": { "name": "preview_img_bucket", "type": "varchar", "primaryKey": false, "notNull": false }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_settings": { "name": "project_settings", "schema": "", "columns": { "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "run_command": { "name": "run_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "build_command": { "name": "build_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "install_command": { "name": "install_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" } }, "indexes": {}, "foreignKeys": { "project_settings_project_id_projects_id_fk": { "name": "project_settings_project_id_projects_id_fk", "tableFrom": "project_settings", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_settings_project_id_unique": { "name": "project_settings_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.prices": { "name": "prices", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_key": { "name": "price_key", "type": "price_keys", "primaryKey": false, "notNull": true }, "monthly_message_limit": { "name": "monthly_message_limit", "type": "integer", "primaryKey": false, "notNull": true }, "stripe_price_id": { "name": "stripe_price_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "prices_product_id_products_id_fk": { "name": "prices_product_id_products_id_fk", "tableFrom": "prices", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "prices_stripe_price_id_unique": { "name": "prices_stripe_price_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_price_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.products": { "name": "products", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "product_type", "primaryKey": false, "notNull": true }, "stripe_product_id": { "name": "stripe_product_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "products_stripe_product_id_unique": { "name": "products_stripe_product_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_product_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.subscriptions": { "name": "subscriptions", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_id": { "name": "price_id", "type": "uuid", "primaryKey": false, "notNull": true }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_id": { "name": "stripe_subscription_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true }, "scheduled_action": { "name": "scheduled_action", "type": "scheduled_subscription_action", "primaryKey": false, "notNull": false }, "scheduled_price_id": { "name": "scheduled_price_id", "type": "uuid", "primaryKey": false, "notNull": false }, "scheduled_change_at": { "name": "scheduled_change_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "stripe_subscription_schedule_id": { "name": "stripe_subscription_schedule_id", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "subscriptions_user_id_users_id_fk": { "name": "subscriptions_user_id_users_id_fk", "tableFrom": "subscriptions", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_product_id_products_id_fk": { "name": "subscriptions_product_id_products_id_fk", "tableFrom": "subscriptions", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_price_id_prices_id_fk": { "name": "subscriptions_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_scheduled_price_id_prices_id_fk": { "name": "subscriptions_scheduled_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "scheduled_price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "subscriptions_stripe_subscription_id_unique": { "name": "subscriptions_stripe_subscription_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_id" ] }, "subscriptions_stripe_subscription_item_id_unique": { "name": "subscriptions_stripe_subscription_item_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_item_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.usage_records": { "name": "usage_records", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "usage_types", "primaryKey": false, "notNull": true, "default": "'message'" }, "timestamp": { "name": "timestamp", "type": "timestamp with time zone", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "usage_records_user_id_users_id_fk": { "name": "usage_records_user_id_users_id_fk", "tableFrom": "usage_records", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "should_warn_delete": { "name": "should_warn_delete", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "first_name": { "name": "first_name", "type": "text", "primaryKey": false, "notNull": false }, "last_name": { "name": "last_name", "type": "text", "primaryKey": false, "notNull": false }, "display_name": { "name": "display_name", "type": "text", "primaryKey": false, "notNull": false }, "avatar_url": { "name": "avatar_url", "type": "text", "primaryKey": false, "notNull": false }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.project_create_status": { "name": "project_create_status", "schema": "public", "values": [ "pending", "completed", "failed" ] }, "public.deployment_status": { "name": "deployment_status", "schema": "public", "values": [ "in_progress", "completed", "failed" ] }, "public.deployment_type": { "name": "deployment_type", "schema": "public", "values": [ "preview", "custom", "unpublish_preview", "unpublish_custom" ] }, "public.verification_request_status": { "name": "verification_request_status", "schema": "public", "values": [ "active", "expired", "used" ] }, "public.price_keys": { "name": "price_keys", "schema": "public", "values": [ "PRO_MONTHLY_TIER_1", "PRO_MONTHLY_TIER_2", "PRO_MONTHLY_TIER_3", "PRO_MONTHLY_TIER_4", "PRO_MONTHLY_TIER_5", "PRO_MONTHLY_TIER_6", "PRO_MONTHLY_TIER_7", "PRO_MONTHLY_TIER_8", "PRO_MONTHLY_TIER_9", "PRO_MONTHLY_TIER_10", "PRO_MONTHLY_TIER_11" ] }, "public.product_type": { "name": "product_type", "schema": "public", "values": [ "free", "pro" ] }, "public.scheduled_subscription_action": { "name": "scheduled_subscription_action", "schema": "public", "values": [ "price_change", "cancellation" ] }, "public.usage_types": { "name": "usage_types", "schema": "public", "values": [ "message", "deployment" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0014_snapshot.json ================================================ { "id": "00708cb9-76b7-47b9-ba22-6bf72b1b872d", "prevId": "ee92d761-f1e2-4588-a659-34e2f8c57e5a", "version": "7", "dialect": "postgresql", "tables": { "public.custom_domains": { "name": "custom_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "apex_domain": { "name": "apex_domain", "type": "text", "primaryKey": false, "notNull": true }, "verified": { "name": "verified", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "custom_domains_apex_domain_unique": { "name": "custom_domains_apex_domain_unique", "nullsNotDistinct": false, "columns": [ "apex_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_custom_domains": { "name": "project_custom_domains", "schema": "", "columns": { "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "custom_domain_id": { "name": "custom_domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_custom_domain_status", "primaryKey": false, "notNull": true, "default": "'active'" } }, "indexes": {}, "foreignKeys": { "project_custom_domains_custom_domain_id_custom_domains_id_fk": { "name": "project_custom_domains_custom_domain_id_custom_domains_id_fk", "tableFrom": "project_custom_domains", "tableTo": "custom_domains", "columnsFrom": [ "custom_domain_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_custom_domains_project_id_projects_id_fk": { "name": "project_custom_domains_project_id_projects_id_fk", "tableFrom": "project_custom_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "project_custom_domains_custom_domain_id_project_id_pk": { "name": "project_custom_domains_custom_domain_id_project_id_pk", "columns": [ "custom_domain_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domain_verification": { "name": "custom_domain_verification", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "custom_domain_id": { "name": "custom_domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "freestyle_verification_id": { "name": "freestyle_verification_id", "type": "text", "primaryKey": false, "notNull": true }, "txt_record": { "name": "txt_record", "type": "jsonb", "primaryKey": false, "notNull": true }, "a_records": { "name": "a_records", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "status": { "name": "status", "type": "verification_request_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "custom_domain_verification_custom_domain_id_custom_domains_id_fk": { "name": "custom_domain_verification_custom_domain_id_custom_domains_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "custom_domains", "columnsFrom": [ "custom_domain_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "custom_domain_verification_project_id_projects_id_fk": { "name": "custom_domain_verification_project_id_projects_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.preview_domains": { "name": "preview_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "preview_domains_project_id_projects_id_fk": { "name": "preview_domains_project_id_projects_id_fk", "tableFrom": "preview_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "preview_domains_full_domain_unique": { "name": "preview_domains_full_domain_unique", "nullsNotDistinct": false, "columns": [ "full_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "commit_oid": { "name": "commit_oid", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_create_requests": { "name": "project_create_requests", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_create_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "project_create_requests_project_id_projects_id_fk": { "name": "project_create_requests_project_id_projects_id_fk", "tableFrom": "project_create_requests", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_create_requests_project_id_unique": { "name": "project_create_requests_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.deployments": { "name": "deployments", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "requested_by": { "name": "requested_by", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "text", "primaryKey": false, "notNull": false }, "urls": { "name": "urls", "type": "text[]", "primaryKey": false, "notNull": false }, "type": { "name": "type", "type": "deployment_type", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "deployment_status", "primaryKey": false, "notNull": true }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": false }, "build_log": { "name": "build_log", "type": "text", "primaryKey": false, "notNull": false }, "error": { "name": "error", "type": "text", "primaryKey": false, "notNull": false }, "progress": { "name": "progress", "type": "integer", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "deployments_requested_by_users_id_fk": { "name": "deployments_requested_by_users_id_fk", "tableFrom": "deployments", "tableTo": "users", "columnsFrom": [ "requested_by" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "deployments_project_id_projects_id_fk": { "name": "deployments_project_id_projects_id_fk", "tableFrom": "deployments", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "tableTo": "users", "columnsFrom": [ "inviter_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] }, "project_invitations_invitee_email_project_id_unique": { "name": "project_invitations_invitee_email_project_id_unique", "nullsNotDistinct": false, "columns": [ "invitee_email", "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img_url": { "name": "preview_img_url", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_path": { "name": "preview_img_path", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_bucket": { "name": "preview_img_bucket", "type": "varchar", "primaryKey": false, "notNull": false }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_settings": { "name": "project_settings", "schema": "", "columns": { "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "run_command": { "name": "run_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "build_command": { "name": "build_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "install_command": { "name": "install_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" } }, "indexes": {}, "foreignKeys": { "project_settings_project_id_projects_id_fk": { "name": "project_settings_project_id_projects_id_fk", "tableFrom": "project_settings", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_settings_project_id_unique": { "name": "project_settings_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.prices": { "name": "prices", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_key": { "name": "price_key", "type": "price_keys", "primaryKey": false, "notNull": true }, "monthly_message_limit": { "name": "monthly_message_limit", "type": "integer", "primaryKey": false, "notNull": true }, "stripe_price_id": { "name": "stripe_price_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "prices_product_id_products_id_fk": { "name": "prices_product_id_products_id_fk", "tableFrom": "prices", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "prices_stripe_price_id_unique": { "name": "prices_stripe_price_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_price_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.products": { "name": "products", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "product_type", "primaryKey": false, "notNull": true }, "stripe_product_id": { "name": "stripe_product_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "products_stripe_product_id_unique": { "name": "products_stripe_product_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_product_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.subscriptions": { "name": "subscriptions", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_id": { "name": "price_id", "type": "uuid", "primaryKey": false, "notNull": true }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_id": { "name": "stripe_subscription_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true }, "scheduled_action": { "name": "scheduled_action", "type": "scheduled_subscription_action", "primaryKey": false, "notNull": false }, "scheduled_price_id": { "name": "scheduled_price_id", "type": "uuid", "primaryKey": false, "notNull": false }, "scheduled_change_at": { "name": "scheduled_change_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "stripe_subscription_schedule_id": { "name": "stripe_subscription_schedule_id", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "subscriptions_user_id_users_id_fk": { "name": "subscriptions_user_id_users_id_fk", "tableFrom": "subscriptions", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_product_id_products_id_fk": { "name": "subscriptions_product_id_products_id_fk", "tableFrom": "subscriptions", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_price_id_prices_id_fk": { "name": "subscriptions_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_scheduled_price_id_prices_id_fk": { "name": "subscriptions_scheduled_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "scheduled_price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "subscriptions_stripe_subscription_id_unique": { "name": "subscriptions_stripe_subscription_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_id" ] }, "subscriptions_stripe_subscription_item_id_unique": { "name": "subscriptions_stripe_subscription_item_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_item_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.usage_records": { "name": "usage_records", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "usage_types", "primaryKey": false, "notNull": true, "default": "'message'" }, "timestamp": { "name": "timestamp", "type": "timestamp with time zone", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "usage_records_user_id_users_id_fk": { "name": "usage_records_user_id_users_id_fk", "tableFrom": "usage_records", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "should_warn_delete": { "name": "should_warn_delete", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "first_name": { "name": "first_name", "type": "text", "primaryKey": false, "notNull": false }, "last_name": { "name": "last_name", "type": "text", "primaryKey": false, "notNull": false }, "display_name": { "name": "display_name", "type": "text", "primaryKey": false, "notNull": false }, "avatar_url": { "name": "avatar_url", "type": "text", "primaryKey": false, "notNull": false }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.project_custom_domain_status": { "name": "project_custom_domain_status", "schema": "public", "values": [ "active", "cancelled" ] }, "public.verification_request_status": { "name": "verification_request_status", "schema": "public", "values": [ "pending", "verified", "cancelled" ] }, "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.project_create_status": { "name": "project_create_status", "schema": "public", "values": [ "pending", "completed", "failed" ] }, "public.deployment_status": { "name": "deployment_status", "schema": "public", "values": [ "in_progress", "completed", "failed" ] }, "public.deployment_type": { "name": "deployment_type", "schema": "public", "values": [ "preview", "custom", "unpublish_preview", "unpublish_custom" ] }, "public.price_keys": { "name": "price_keys", "schema": "public", "values": [ "PRO_MONTHLY_TIER_1", "PRO_MONTHLY_TIER_2", "PRO_MONTHLY_TIER_3", "PRO_MONTHLY_TIER_4", "PRO_MONTHLY_TIER_5", "PRO_MONTHLY_TIER_6", "PRO_MONTHLY_TIER_7", "PRO_MONTHLY_TIER_8", "PRO_MONTHLY_TIER_9", "PRO_MONTHLY_TIER_10", "PRO_MONTHLY_TIER_11" ] }, "public.product_type": { "name": "product_type", "schema": "public", "values": [ "free", "pro" ] }, "public.scheduled_subscription_action": { "name": "scheduled_subscription_action", "schema": "public", "values": [ "price_change", "cancellation" ] }, "public.usage_types": { "name": "usage_types", "schema": "public", "values": [ "message", "deployment" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0015_snapshot.json ================================================ { "id": "65e43a14-1d2e-491f-adf1-c073e34f71c8", "prevId": "00708cb9-76b7-47b9-ba22-6bf72b1b872d", "version": "7", "dialect": "postgresql", "tables": { "public.custom_domains": { "name": "custom_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "apex_domain": { "name": "apex_domain", "type": "text", "primaryKey": false, "notNull": true }, "verified": { "name": "verified", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "custom_domains_apex_domain_unique": { "name": "custom_domains_apex_domain_unique", "nullsNotDistinct": false, "columns": [ "apex_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_custom_domains": { "name": "project_custom_domains", "schema": "", "columns": { "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "custom_domain_id": { "name": "custom_domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_custom_domain_status", "primaryKey": false, "notNull": true, "default": "'active'" } }, "indexes": {}, "foreignKeys": { "project_custom_domains_custom_domain_id_custom_domains_id_fk": { "name": "project_custom_domains_custom_domain_id_custom_domains_id_fk", "tableFrom": "project_custom_domains", "tableTo": "custom_domains", "columnsFrom": [ "custom_domain_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_custom_domains_project_id_projects_id_fk": { "name": "project_custom_domains_project_id_projects_id_fk", "tableFrom": "project_custom_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "project_custom_domains_custom_domain_id_project_id_pk": { "name": "project_custom_domains_custom_domain_id_project_id_pk", "columns": [ "custom_domain_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domain_verification": { "name": "custom_domain_verification", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "custom_domain_id": { "name": "custom_domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "freestyle_verification_id": { "name": "freestyle_verification_id", "type": "text", "primaryKey": false, "notNull": true }, "txt_record": { "name": "txt_record", "type": "jsonb", "primaryKey": false, "notNull": true }, "a_records": { "name": "a_records", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "status": { "name": "status", "type": "verification_request_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "custom_domain_verification_custom_domain_id_custom_domains_id_fk": { "name": "custom_domain_verification_custom_domain_id_custom_domains_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "custom_domains", "columnsFrom": [ "custom_domain_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "custom_domain_verification_project_id_projects_id_fk": { "name": "custom_domain_verification_project_id_projects_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.preview_domains": { "name": "preview_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "preview_domains_project_id_projects_id_fk": { "name": "preview_domains_project_id_projects_id_fk", "tableFrom": "preview_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "preview_domains_full_domain_unique": { "name": "preview_domains_full_domain_unique", "nullsNotDistinct": false, "columns": [ "full_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "role", "primaryKey": false, "notNull": true }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "commit_oid": { "name": "commit_oid", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_create_requests": { "name": "project_create_requests", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_create_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "project_create_requests_project_id_projects_id_fk": { "name": "project_create_requests_project_id_projects_id_fk", "tableFrom": "project_create_requests", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_create_requests_project_id_unique": { "name": "project_create_requests_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.deployments": { "name": "deployments", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "requested_by": { "name": "requested_by", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "text", "primaryKey": false, "notNull": false }, "urls": { "name": "urls", "type": "text[]", "primaryKey": false, "notNull": false }, "type": { "name": "type", "type": "deployment_type", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "deployment_status", "primaryKey": false, "notNull": true }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": false }, "build_log": { "name": "build_log", "type": "text", "primaryKey": false, "notNull": false }, "error": { "name": "error", "type": "text", "primaryKey": false, "notNull": false }, "progress": { "name": "progress", "type": "integer", "primaryKey": false, "notNull": false }, "build_script": { "name": "build_script", "type": "text", "primaryKey": false, "notNull": false }, "build_flags": { "name": "build_flags", "type": "text", "primaryKey": false, "notNull": false }, "env_vars": { "name": "env_vars", "type": "jsonb", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "deployments_requested_by_users_id_fk": { "name": "deployments_requested_by_users_id_fk", "tableFrom": "deployments", "tableTo": "users", "columnsFrom": [ "requested_by" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "deployments_project_id_projects_id_fk": { "name": "deployments_project_id_projects_id_fk", "tableFrom": "deployments", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "tableTo": "users", "columnsFrom": [ "inviter_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] }, "project_invitations_invitee_email_project_id_unique": { "name": "project_invitations_invitee_email_project_id_unique", "nullsNotDistinct": false, "columns": [ "invitee_email", "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img_url": { "name": "preview_img_url", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_path": { "name": "preview_img_path", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_bucket": { "name": "preview_img_bucket", "type": "varchar", "primaryKey": false, "notNull": false }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_settings": { "name": "project_settings", "schema": "", "columns": { "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "run_command": { "name": "run_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "build_command": { "name": "build_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "install_command": { "name": "install_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" } }, "indexes": {}, "foreignKeys": { "project_settings_project_id_projects_id_fk": { "name": "project_settings_project_id_projects_id_fk", "tableFrom": "project_settings", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_settings_project_id_unique": { "name": "project_settings_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.legacy_subscriptions": { "name": "legacy_subscriptions", "schema": "", "columns": { "email": { "name": "email", "type": "text", "primaryKey": true, "notNull": true }, "stripe_coupon_id": { "name": "stripe_coupon_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_promotion_code_id": { "name": "stripe_promotion_code_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_promotion_code": { "name": "stripe_promotion_code", "type": "text", "primaryKey": false, "notNull": true }, "redeem_at": { "name": "redeem_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "redeem_by": { "name": "redeem_by", "type": "timestamp with time zone", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.prices": { "name": "prices", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_key": { "name": "price_key", "type": "price_keys", "primaryKey": false, "notNull": true }, "monthly_message_limit": { "name": "monthly_message_limit", "type": "integer", "primaryKey": false, "notNull": true }, "stripe_price_id": { "name": "stripe_price_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "prices_product_id_products_id_fk": { "name": "prices_product_id_products_id_fk", "tableFrom": "prices", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "prices_stripe_price_id_unique": { "name": "prices_stripe_price_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_price_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.products": { "name": "products", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "product_type", "primaryKey": false, "notNull": true }, "stripe_product_id": { "name": "stripe_product_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "products_stripe_product_id_unique": { "name": "products_stripe_product_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_product_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.subscriptions": { "name": "subscriptions", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_id": { "name": "price_id", "type": "uuid", "primaryKey": false, "notNull": true }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "subscription_status", "primaryKey": false, "notNull": true, "default": "'active'" }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_id": { "name": "stripe_subscription_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true }, "scheduled_action": { "name": "scheduled_action", "type": "scheduled_subscription_action", "primaryKey": false, "notNull": false }, "scheduled_price_id": { "name": "scheduled_price_id", "type": "uuid", "primaryKey": false, "notNull": false }, "scheduled_change_at": { "name": "scheduled_change_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "stripe_subscription_schedule_id": { "name": "stripe_subscription_schedule_id", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "subscriptions_user_id_users_id_fk": { "name": "subscriptions_user_id_users_id_fk", "tableFrom": "subscriptions", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_product_id_products_id_fk": { "name": "subscriptions_product_id_products_id_fk", "tableFrom": "subscriptions", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_price_id_prices_id_fk": { "name": "subscriptions_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_scheduled_price_id_prices_id_fk": { "name": "subscriptions_scheduled_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "scheduled_price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "subscriptions_stripe_subscription_id_unique": { "name": "subscriptions_stripe_subscription_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_id" ] }, "subscriptions_stripe_subscription_item_id_unique": { "name": "subscriptions_stripe_subscription_item_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_item_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.usage_records": { "name": "usage_records", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "usage_types", "primaryKey": false, "notNull": true, "default": "'message'" }, "timestamp": { "name": "timestamp", "type": "timestamp with time zone", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "usage_records_user_id_users_id_fk": { "name": "usage_records_user_id_users_id_fk", "tableFrom": "usage_records", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "should_warn_delete": { "name": "should_warn_delete", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "first_name": { "name": "first_name", "type": "text", "primaryKey": false, "notNull": false }, "last_name": { "name": "last_name", "type": "text", "primaryKey": false, "notNull": false }, "display_name": { "name": "display_name", "type": "text", "primaryKey": false, "notNull": false }, "avatar_url": { "name": "avatar_url", "type": "text", "primaryKey": false, "notNull": false }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.project_custom_domain_status": { "name": "project_custom_domain_status", "schema": "public", "values": [ "active", "cancelled" ] }, "public.verification_request_status": { "name": "verification_request_status", "schema": "public", "values": [ "pending", "verified", "cancelled" ] }, "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.role": { "name": "role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.project_create_status": { "name": "project_create_status", "schema": "public", "values": [ "pending", "completed", "failed" ] }, "public.deployment_status": { "name": "deployment_status", "schema": "public", "values": [ "pending", "in_progress", "completed", "failed", "cancelled" ] }, "public.deployment_type": { "name": "deployment_type", "schema": "public", "values": [ "preview", "custom", "unpublish_preview", "unpublish_custom" ] }, "public.price_keys": { "name": "price_keys", "schema": "public", "values": [ "PRO_MONTHLY_TIER_1", "PRO_MONTHLY_TIER_2", "PRO_MONTHLY_TIER_3", "PRO_MONTHLY_TIER_4", "PRO_MONTHLY_TIER_5", "PRO_MONTHLY_TIER_6", "PRO_MONTHLY_TIER_7", "PRO_MONTHLY_TIER_8", "PRO_MONTHLY_TIER_9", "PRO_MONTHLY_TIER_10", "PRO_MONTHLY_TIER_11" ] }, "public.product_type": { "name": "product_type", "schema": "public", "values": [ "free", "pro" ] }, "public.scheduled_subscription_action": { "name": "scheduled_subscription_action", "schema": "public", "values": [ "price_change", "cancellation" ] }, "public.subscription_status": { "name": "subscription_status", "schema": "public", "values": [ "active", "canceled" ] }, "public.usage_types": { "name": "usage_types", "schema": "public", "values": [ "message", "deployment" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": { "auth": "auth" }, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0016_snapshot.json ================================================ { "id": "9c200d7a-5f78-47db-a99d-02e6e0a9c11f", "prevId": "65e43a14-1d2e-491f-adf1-c073e34f71c8", "version": "7", "dialect": "postgresql", "tables": { "public.custom_domains": { "name": "custom_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "apex_domain": { "name": "apex_domain", "type": "text", "primaryKey": false, "notNull": true }, "verified": { "name": "verified", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "custom_domains_apex_domain_unique": { "name": "custom_domains_apex_domain_unique", "nullsNotDistinct": false, "columns": [ "apex_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_custom_domains": { "name": "project_custom_domains", "schema": "", "columns": { "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "custom_domain_id": { "name": "custom_domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_custom_domain_status", "primaryKey": false, "notNull": true, "default": "'active'" } }, "indexes": {}, "foreignKeys": { "project_custom_domains_custom_domain_id_custom_domains_id_fk": { "name": "project_custom_domains_custom_domain_id_custom_domains_id_fk", "tableFrom": "project_custom_domains", "tableTo": "custom_domains", "columnsFrom": [ "custom_domain_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_custom_domains_project_id_projects_id_fk": { "name": "project_custom_domains_project_id_projects_id_fk", "tableFrom": "project_custom_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "project_custom_domains_custom_domain_id_project_id_pk": { "name": "project_custom_domains_custom_domain_id_project_id_pk", "columns": [ "custom_domain_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domain_verification": { "name": "custom_domain_verification", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "custom_domain_id": { "name": "custom_domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "freestyle_verification_id": { "name": "freestyle_verification_id", "type": "text", "primaryKey": false, "notNull": true }, "txt_record": { "name": "txt_record", "type": "jsonb", "primaryKey": false, "notNull": true }, "a_records": { "name": "a_records", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "status": { "name": "status", "type": "verification_request_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "custom_domain_verification_custom_domain_id_custom_domains_id_fk": { "name": "custom_domain_verification_custom_domain_id_custom_domains_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "custom_domains", "columnsFrom": [ "custom_domain_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "custom_domain_verification_project_id_projects_id_fk": { "name": "custom_domain_verification_project_id_projects_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.preview_domains": { "name": "preview_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "preview_domains_project_id_projects_id_fk": { "name": "preview_domains_project_id_projects_id_fk", "tableFrom": "preview_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "preview_domains_full_domain_unique": { "name": "preview_domains_full_domain_unique", "nullsNotDistinct": false, "columns": [ "full_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "suggestions": { "name": "suggestions", "type": "jsonb", "primaryKey": false, "notNull": false, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "message_role", "primaryKey": false, "notNull": true }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "checkpoints": { "name": "checkpoints", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": false }, "commit_oid": { "name": "commit_oid", "type": "text", "primaryKey": false, "notNull": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_create_requests": { "name": "project_create_requests", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_create_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "project_create_requests_project_id_projects_id_fk": { "name": "project_create_requests_project_id_projects_id_fk", "tableFrom": "project_create_requests", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_create_requests_project_id_unique": { "name": "project_create_requests_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.deployments": { "name": "deployments", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "requested_by": { "name": "requested_by", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "text", "primaryKey": false, "notNull": false }, "urls": { "name": "urls", "type": "text[]", "primaryKey": false, "notNull": false }, "type": { "name": "type", "type": "deployment_type", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "deployment_status", "primaryKey": false, "notNull": true }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": false }, "build_log": { "name": "build_log", "type": "text", "primaryKey": false, "notNull": false }, "error": { "name": "error", "type": "text", "primaryKey": false, "notNull": false }, "progress": { "name": "progress", "type": "integer", "primaryKey": false, "notNull": false }, "build_script": { "name": "build_script", "type": "text", "primaryKey": false, "notNull": false }, "build_flags": { "name": "build_flags", "type": "text", "primaryKey": false, "notNull": false }, "env_vars": { "name": "env_vars", "type": "jsonb", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "deployments_requested_by_users_id_fk": { "name": "deployments_requested_by_users_id_fk", "tableFrom": "deployments", "tableTo": "users", "columnsFrom": [ "requested_by" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "deployments_project_id_projects_id_fk": { "name": "deployments_project_id_projects_id_fk", "tableFrom": "deployments", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "tableTo": "users", "columnsFrom": [ "inviter_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] }, "project_invitations_invitee_email_project_id_unique": { "name": "project_invitations_invitee_email_project_id_unique", "nullsNotDistinct": false, "columns": [ "invitee_email", "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img_url": { "name": "preview_img_url", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_path": { "name": "preview_img_path", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_bucket": { "name": "preview_img_bucket", "type": "varchar", "primaryKey": false, "notNull": false }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_settings": { "name": "project_settings", "schema": "", "columns": { "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "run_command": { "name": "run_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "build_command": { "name": "build_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "install_command": { "name": "install_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" } }, "indexes": {}, "foreignKeys": { "project_settings_project_id_projects_id_fk": { "name": "project_settings_project_id_projects_id_fk", "tableFrom": "project_settings", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_settings_project_id_unique": { "name": "project_settings_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.legacy_subscriptions": { "name": "legacy_subscriptions", "schema": "", "columns": { "email": { "name": "email", "type": "text", "primaryKey": true, "notNull": true }, "stripe_coupon_id": { "name": "stripe_coupon_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_promotion_code_id": { "name": "stripe_promotion_code_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_promotion_code": { "name": "stripe_promotion_code", "type": "text", "primaryKey": false, "notNull": true }, "redeem_at": { "name": "redeem_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "redeem_by": { "name": "redeem_by", "type": "timestamp with time zone", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.prices": { "name": "prices", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_key": { "name": "price_key", "type": "price_keys", "primaryKey": false, "notNull": true }, "monthly_message_limit": { "name": "monthly_message_limit", "type": "integer", "primaryKey": false, "notNull": true }, "stripe_price_id": { "name": "stripe_price_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "prices_product_id_products_id_fk": { "name": "prices_product_id_products_id_fk", "tableFrom": "prices", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "prices_stripe_price_id_unique": { "name": "prices_stripe_price_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_price_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.products": { "name": "products", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "product_type", "primaryKey": false, "notNull": true }, "stripe_product_id": { "name": "stripe_product_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "products_stripe_product_id_unique": { "name": "products_stripe_product_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_product_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.rate_limits": { "name": "rate_limits", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "subscription_id": { "name": "subscription_id", "type": "uuid", "primaryKey": false, "notNull": true }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "max": { "name": "max", "type": "integer", "primaryKey": false, "notNull": true }, "left": { "name": "left", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "carry_over_key": { "name": "carry_over_key", "type": "uuid", "primaryKey": false, "notNull": true }, "carry_over_total": { "name": "carry_over_total", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": { "rate_limits_user_time_idx": { "name": "rate_limits_user_time_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "started_at", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "ended_at", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "rate_limits_user_id_users_id_fk": { "name": "rate_limits_user_id_users_id_fk", "tableFrom": "rate_limits", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "rate_limits_subscription_id_subscriptions_id_fk": { "name": "rate_limits_subscription_id_subscriptions_id_fk", "tableFrom": "rate_limits", "tableTo": "subscriptions", "columnsFrom": [ "subscription_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.subscriptions": { "name": "subscriptions", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_id": { "name": "price_id", "type": "uuid", "primaryKey": false, "notNull": true }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "subscription_status", "primaryKey": false, "notNull": true, "default": "'active'" }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_id": { "name": "stripe_subscription_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_schedule_id": { "name": "stripe_subscription_schedule_id", "type": "text", "primaryKey": false, "notNull": false }, "stripe_current_period_start": { "name": "stripe_current_period_start", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "stripe_current_period_end": { "name": "stripe_current_period_end", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "scheduled_action": { "name": "scheduled_action", "type": "scheduled_subscription_action", "primaryKey": false, "notNull": false }, "scheduled_price_id": { "name": "scheduled_price_id", "type": "uuid", "primaryKey": false, "notNull": false }, "scheduled_change_at": { "name": "scheduled_change_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "subscriptions_user_id_users_id_fk": { "name": "subscriptions_user_id_users_id_fk", "tableFrom": "subscriptions", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_product_id_products_id_fk": { "name": "subscriptions_product_id_products_id_fk", "tableFrom": "subscriptions", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_price_id_prices_id_fk": { "name": "subscriptions_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_scheduled_price_id_prices_id_fk": { "name": "subscriptions_scheduled_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "scheduled_price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "subscriptions_stripe_subscription_id_unique": { "name": "subscriptions_stripe_subscription_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_id" ] }, "subscriptions_stripe_subscription_item_id_unique": { "name": "subscriptions_stripe_subscription_item_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_item_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.usage_records": { "name": "usage_records", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "usage_types", "primaryKey": false, "notNull": true, "default": "'message'" }, "timestamp": { "name": "timestamp", "type": "timestamp with time zone", "primaryKey": false, "notNull": true } }, "indexes": { "usage_records_user_time_idx": { "name": "usage_records_user_time_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "timestamp", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "usage_records_user_id_users_id_fk": { "name": "usage_records_user_id_users_id_fk", "tableFrom": "usage_records", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "should_warn_delete": { "name": "should_warn_delete", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "first_name": { "name": "first_name", "type": "text", "primaryKey": false, "notNull": false }, "last_name": { "name": "last_name", "type": "text", "primaryKey": false, "notNull": false }, "display_name": { "name": "display_name", "type": "text", "primaryKey": false, "notNull": false }, "avatar_url": { "name": "avatar_url", "type": "text", "primaryKey": false, "notNull": false }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.project_custom_domain_status": { "name": "project_custom_domain_status", "schema": "public", "values": [ "active", "cancelled" ] }, "public.verification_request_status": { "name": "verification_request_status", "schema": "public", "values": [ "pending", "verified", "cancelled" ] }, "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.message_role": { "name": "message_role", "schema": "public", "values": [ "user", "assistant" ] }, "public.project_create_status": { "name": "project_create_status", "schema": "public", "values": [ "pending", "completed", "failed" ] }, "public.deployment_status": { "name": "deployment_status", "schema": "public", "values": [ "pending", "in_progress", "completed", "failed", "cancelled" ] }, "public.deployment_type": { "name": "deployment_type", "schema": "public", "values": [ "preview", "custom", "unpublish_preview", "unpublish_custom" ] }, "public.price_keys": { "name": "price_keys", "schema": "public", "values": [ "PRO_MONTHLY_TIER_1", "PRO_MONTHLY_TIER_2", "PRO_MONTHLY_TIER_3", "PRO_MONTHLY_TIER_4", "PRO_MONTHLY_TIER_5", "PRO_MONTHLY_TIER_6", "PRO_MONTHLY_TIER_7", "PRO_MONTHLY_TIER_8", "PRO_MONTHLY_TIER_9", "PRO_MONTHLY_TIER_10", "PRO_MONTHLY_TIER_11" ] }, "public.product_type": { "name": "product_type", "schema": "public", "values": [ "free", "pro" ] }, "public.scheduled_subscription_action": { "name": "scheduled_subscription_action", "schema": "public", "values": [ "price_change", "cancellation" ] }, "public.subscription_status": { "name": "subscription_status", "schema": "public", "values": [ "active", "canceled" ] }, "public.usage_types": { "name": "usage_types", "schema": "public", "values": [ "message", "deployment" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0017_snapshot.json ================================================ { "id": "c208e744-6364-4488-bf96-d462f35ea5d1", "prevId": "9c200d7a-5f78-47db-a99d-02e6e0a9c11f", "version": "7", "dialect": "postgresql", "tables": { "public.custom_domains": { "name": "custom_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "apex_domain": { "name": "apex_domain", "type": "text", "primaryKey": false, "notNull": true }, "verified": { "name": "verified", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "custom_domains_apex_domain_unique": { "name": "custom_domains_apex_domain_unique", "nullsNotDistinct": false, "columns": [ "apex_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_custom_domains": { "name": "project_custom_domains", "schema": "", "columns": { "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "custom_domain_id": { "name": "custom_domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_custom_domain_status", "primaryKey": false, "notNull": true, "default": "'active'" } }, "indexes": {}, "foreignKeys": { "project_custom_domains_custom_domain_id_custom_domains_id_fk": { "name": "project_custom_domains_custom_domain_id_custom_domains_id_fk", "tableFrom": "project_custom_domains", "tableTo": "custom_domains", "columnsFrom": [ "custom_domain_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_custom_domains_project_id_projects_id_fk": { "name": "project_custom_domains_project_id_projects_id_fk", "tableFrom": "project_custom_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "project_custom_domains_custom_domain_id_project_id_pk": { "name": "project_custom_domains_custom_domain_id_project_id_pk", "columns": [ "custom_domain_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domain_verification": { "name": "custom_domain_verification", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "custom_domain_id": { "name": "custom_domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "freestyle_verification_id": { "name": "freestyle_verification_id", "type": "text", "primaryKey": false, "notNull": true }, "txt_record": { "name": "txt_record", "type": "jsonb", "primaryKey": false, "notNull": true }, "a_records": { "name": "a_records", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "status": { "name": "status", "type": "verification_request_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "custom_domain_verification_custom_domain_id_custom_domains_id_fk": { "name": "custom_domain_verification_custom_domain_id_custom_domains_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "custom_domains", "columnsFrom": [ "custom_domain_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "custom_domain_verification_project_id_projects_id_fk": { "name": "custom_domain_verification_project_id_projects_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.preview_domains": { "name": "preview_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "preview_domains_project_id_projects_id_fk": { "name": "preview_domains_project_id_projects_id_fk", "tableFrom": "preview_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "preview_domains_full_domain_unique": { "name": "preview_domains_full_domain_unique", "nullsNotDistinct": false, "columns": [ "full_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.feedbacks": { "name": "feedbacks", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": false }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": false }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": true }, "page_url": { "name": "page_url", "type": "text", "primaryKey": false, "notNull": false }, "user_agent": { "name": "user_agent", "type": "text", "primaryKey": false, "notNull": false }, "attachments": { "name": "attachments", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "metadata": { "name": "metadata", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "feedbacks_user_id_users_id_fk": { "name": "feedbacks_user_id_users_id_fk", "tableFrom": "feedbacks", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "frame_type", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "suggestions": { "name": "suggestions", "type": "jsonb", "primaryKey": false, "notNull": false, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "message_role", "primaryKey": false, "notNull": true }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "checkpoints": { "name": "checkpoints", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": false }, "commit_oid": { "name": "commit_oid", "type": "text", "primaryKey": false, "notNull": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_create_requests": { "name": "project_create_requests", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_create_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "project_create_requests_project_id_projects_id_fk": { "name": "project_create_requests_project_id_projects_id_fk", "tableFrom": "project_create_requests", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_create_requests_project_id_unique": { "name": "project_create_requests_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.deployments": { "name": "deployments", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "requested_by": { "name": "requested_by", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "text", "primaryKey": false, "notNull": false }, "urls": { "name": "urls", "type": "text[]", "primaryKey": false, "notNull": false }, "type": { "name": "type", "type": "deployment_type", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "deployment_status", "primaryKey": false, "notNull": true }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": false }, "build_log": { "name": "build_log", "type": "text", "primaryKey": false, "notNull": false }, "error": { "name": "error", "type": "text", "primaryKey": false, "notNull": false }, "progress": { "name": "progress", "type": "integer", "primaryKey": false, "notNull": false }, "build_script": { "name": "build_script", "type": "text", "primaryKey": false, "notNull": false }, "build_flags": { "name": "build_flags", "type": "text", "primaryKey": false, "notNull": false }, "env_vars": { "name": "env_vars", "type": "jsonb", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "deployments_requested_by_users_id_fk": { "name": "deployments_requested_by_users_id_fk", "tableFrom": "deployments", "tableTo": "users", "columnsFrom": [ "requested_by" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "deployments_project_id_projects_id_fk": { "name": "deployments_project_id_projects_id_fk", "tableFrom": "deployments", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "project_invitations_invitee_email_project_id_idx": { "name": "project_invitations_invitee_email_project_id_idx", "columns": [ { "expression": "invitee_email", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "tableTo": "users", "columnsFrom": [ "inviter_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "tags": { "name": "tags", "type": "varchar[]", "primaryKey": false, "notNull": false, "default": "'{}'" }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img_url": { "name": "preview_img_url", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_path": { "name": "preview_img_path", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_bucket": { "name": "preview_img_bucket", "type": "varchar", "primaryKey": false, "notNull": false }, "updated_preview_img_at": { "name": "updated_preview_img_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_settings": { "name": "project_settings", "schema": "", "columns": { "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "run_command": { "name": "run_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "build_command": { "name": "build_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "install_command": { "name": "install_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" } }, "indexes": {}, "foreignKeys": { "project_settings_project_id_projects_id_fk": { "name": "project_settings_project_id_projects_id_fk", "tableFrom": "project_settings", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_settings_project_id_unique": { "name": "project_settings_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.legacy_subscriptions": { "name": "legacy_subscriptions", "schema": "", "columns": { "email": { "name": "email", "type": "text", "primaryKey": true, "notNull": true }, "stripe_coupon_id": { "name": "stripe_coupon_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_promotion_code_id": { "name": "stripe_promotion_code_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_promotion_code": { "name": "stripe_promotion_code", "type": "text", "primaryKey": false, "notNull": true }, "redeem_at": { "name": "redeem_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "redeem_by": { "name": "redeem_by", "type": "timestamp with time zone", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.prices": { "name": "prices", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_key": { "name": "price_key", "type": "price_keys", "primaryKey": false, "notNull": true }, "monthly_message_limit": { "name": "monthly_message_limit", "type": "integer", "primaryKey": false, "notNull": true }, "stripe_price_id": { "name": "stripe_price_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "prices_product_id_products_id_fk": { "name": "prices_product_id_products_id_fk", "tableFrom": "prices", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "prices_stripe_price_id_unique": { "name": "prices_stripe_price_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_price_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.products": { "name": "products", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "product_type", "primaryKey": false, "notNull": true }, "stripe_product_id": { "name": "stripe_product_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "products_stripe_product_id_unique": { "name": "products_stripe_product_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_product_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.rate_limits": { "name": "rate_limits", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "subscription_id": { "name": "subscription_id", "type": "uuid", "primaryKey": false, "notNull": true }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "max": { "name": "max", "type": "integer", "primaryKey": false, "notNull": true }, "left": { "name": "left", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "carry_over_key": { "name": "carry_over_key", "type": "uuid", "primaryKey": false, "notNull": true }, "carry_over_total": { "name": "carry_over_total", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": { "rate_limits_user_time_idx": { "name": "rate_limits_user_time_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "started_at", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "ended_at", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "rate_limits_user_id_users_id_fk": { "name": "rate_limits_user_id_users_id_fk", "tableFrom": "rate_limits", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "rate_limits_subscription_id_subscriptions_id_fk": { "name": "rate_limits_subscription_id_subscriptions_id_fk", "tableFrom": "rate_limits", "tableTo": "subscriptions", "columnsFrom": [ "subscription_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.subscriptions": { "name": "subscriptions", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_id": { "name": "price_id", "type": "uuid", "primaryKey": false, "notNull": true }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "subscription_status", "primaryKey": false, "notNull": true, "default": "'active'" }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_id": { "name": "stripe_subscription_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_schedule_id": { "name": "stripe_subscription_schedule_id", "type": "text", "primaryKey": false, "notNull": false }, "stripe_current_period_start": { "name": "stripe_current_period_start", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "stripe_current_period_end": { "name": "stripe_current_period_end", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "scheduled_action": { "name": "scheduled_action", "type": "scheduled_subscription_action", "primaryKey": false, "notNull": false }, "scheduled_price_id": { "name": "scheduled_price_id", "type": "uuid", "primaryKey": false, "notNull": false }, "scheduled_change_at": { "name": "scheduled_change_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "subscriptions_user_id_users_id_fk": { "name": "subscriptions_user_id_users_id_fk", "tableFrom": "subscriptions", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_product_id_products_id_fk": { "name": "subscriptions_product_id_products_id_fk", "tableFrom": "subscriptions", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_price_id_prices_id_fk": { "name": "subscriptions_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_scheduled_price_id_prices_id_fk": { "name": "subscriptions_scheduled_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "scheduled_price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "subscriptions_stripe_subscription_id_unique": { "name": "subscriptions_stripe_subscription_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_id" ] }, "subscriptions_stripe_subscription_item_id_unique": { "name": "subscriptions_stripe_subscription_item_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_item_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.usage_records": { "name": "usage_records", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "usage_types", "primaryKey": false, "notNull": true, "default": "'message'" }, "timestamp": { "name": "timestamp", "type": "timestamp with time zone", "primaryKey": false, "notNull": true } }, "indexes": { "usage_records_user_time_idx": { "name": "usage_records_user_time_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "timestamp", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "usage_records_user_id_users_id_fk": { "name": "usage_records_user_id_users_id_fk", "tableFrom": "usage_records", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "should_warn_delete": { "name": "should_warn_delete", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "first_name": { "name": "first_name", "type": "text", "primaryKey": false, "notNull": false }, "last_name": { "name": "last_name", "type": "text", "primaryKey": false, "notNull": false }, "display_name": { "name": "display_name", "type": "text", "primaryKey": false, "notNull": false }, "avatar_url": { "name": "avatar_url", "type": "text", "primaryKey": false, "notNull": false }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.project_custom_domain_status": { "name": "project_custom_domain_status", "schema": "public", "values": [ "active", "cancelled" ] }, "public.verification_request_status": { "name": "verification_request_status", "schema": "public", "values": [ "pending", "verified", "cancelled" ] }, "public.frame_type": { "name": "frame_type", "schema": "public", "values": [ "web" ] }, "public.message_role": { "name": "message_role", "schema": "public", "values": [ "user", "assistant" ] }, "public.project_create_status": { "name": "project_create_status", "schema": "public", "values": [ "pending", "completed", "failed" ] }, "public.deployment_status": { "name": "deployment_status", "schema": "public", "values": [ "pending", "in_progress", "completed", "failed", "cancelled" ] }, "public.deployment_type": { "name": "deployment_type", "schema": "public", "values": [ "preview", "custom", "unpublish_preview", "unpublish_custom" ] }, "public.price_keys": { "name": "price_keys", "schema": "public", "values": [ "PRO_MONTHLY_TIER_1", "PRO_MONTHLY_TIER_2", "PRO_MONTHLY_TIER_3", "PRO_MONTHLY_TIER_4", "PRO_MONTHLY_TIER_5", "PRO_MONTHLY_TIER_6", "PRO_MONTHLY_TIER_7", "PRO_MONTHLY_TIER_8", "PRO_MONTHLY_TIER_9", "PRO_MONTHLY_TIER_10", "PRO_MONTHLY_TIER_11" ] }, "public.product_type": { "name": "product_type", "schema": "public", "values": [ "free", "pro" ] }, "public.scheduled_subscription_action": { "name": "scheduled_subscription_action", "schema": "public", "values": [ "price_change", "cancellation" ] }, "public.subscription_status": { "name": "subscription_status", "schema": "public", "values": [ "active", "canceled" ] }, "public.usage_types": { "name": "usage_types", "schema": "public", "values": [ "message", "deployment" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": { "auth": "auth" }, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0018_snapshot.json ================================================ { "id": "c726b804-42fb-40b6-a5d3-6b66e5a50620", "prevId": "c208e744-6364-4488-bf96-d462f35ea5d1", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "branch_id": { "name": "branch_id", "type": "uuid", "primaryKey": false, "notNull": false }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "frames_branch_id_branches_id_fk": { "name": "frames_branch_id_branches_id_fk", "tableFrom": "frames", "tableTo": "branches", "columnsFrom": [ "branch_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "suggestions": { "name": "suggestions", "type": "jsonb", "primaryKey": false, "notNull": false, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "message_role", "primaryKey": false, "notNull": true }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "checkpoints": { "name": "checkpoints", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": false }, "commit_oid": { "name": "commit_oid", "type": "text", "primaryKey": false, "notNull": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domains": { "name": "custom_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "apex_domain": { "name": "apex_domain", "type": "text", "primaryKey": false, "notNull": true }, "verified": { "name": "verified", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "custom_domains_apex_domain_unique": { "name": "custom_domains_apex_domain_unique", "nullsNotDistinct": false, "columns": [ "apex_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_custom_domains": { "name": "project_custom_domains", "schema": "", "columns": { "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "custom_domain_id": { "name": "custom_domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_custom_domain_status", "primaryKey": false, "notNull": true, "default": "'active'" } }, "indexes": {}, "foreignKeys": { "project_custom_domains_custom_domain_id_custom_domains_id_fk": { "name": "project_custom_domains_custom_domain_id_custom_domains_id_fk", "tableFrom": "project_custom_domains", "tableTo": "custom_domains", "columnsFrom": [ "custom_domain_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_custom_domains_project_id_projects_id_fk": { "name": "project_custom_domains_project_id_projects_id_fk", "tableFrom": "project_custom_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "project_custom_domains_custom_domain_id_project_id_pk": { "name": "project_custom_domains_custom_domain_id_project_id_pk", "columns": [ "custom_domain_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domain_verification": { "name": "custom_domain_verification", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "custom_domain_id": { "name": "custom_domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "freestyle_verification_id": { "name": "freestyle_verification_id", "type": "text", "primaryKey": false, "notNull": true }, "txt_record": { "name": "txt_record", "type": "jsonb", "primaryKey": false, "notNull": true }, "a_records": { "name": "a_records", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "status": { "name": "status", "type": "verification_request_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "custom_domain_verification_custom_domain_id_custom_domains_id_fk": { "name": "custom_domain_verification_custom_domain_id_custom_domains_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "custom_domains", "columnsFrom": [ "custom_domain_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "custom_domain_verification_project_id_projects_id_fk": { "name": "custom_domain_verification_project_id_projects_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.deployments": { "name": "deployments", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "requested_by": { "name": "requested_by", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "text", "primaryKey": false, "notNull": false }, "urls": { "name": "urls", "type": "text[]", "primaryKey": false, "notNull": false }, "type": { "name": "type", "type": "deployment_type", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "deployment_status", "primaryKey": false, "notNull": true }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": false }, "build_log": { "name": "build_log", "type": "text", "primaryKey": false, "notNull": false }, "error": { "name": "error", "type": "text", "primaryKey": false, "notNull": false }, "progress": { "name": "progress", "type": "integer", "primaryKey": false, "notNull": false }, "build_script": { "name": "build_script", "type": "text", "primaryKey": false, "notNull": false }, "build_flags": { "name": "build_flags", "type": "text", "primaryKey": false, "notNull": false }, "env_vars": { "name": "env_vars", "type": "jsonb", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "deployments_requested_by_users_id_fk": { "name": "deployments_requested_by_users_id_fk", "tableFrom": "deployments", "tableTo": "users", "columnsFrom": [ "requested_by" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "deployments_project_id_projects_id_fk": { "name": "deployments_project_id_projects_id_fk", "tableFrom": "deployments", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.preview_domains": { "name": "preview_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "preview_domains_project_id_projects_id_fk": { "name": "preview_domains_project_id_projects_id_fk", "tableFrom": "preview_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "preview_domains_full_domain_unique": { "name": "preview_domains_full_domain_unique", "nullsNotDistinct": false, "columns": [ "full_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.feedbacks": { "name": "feedbacks", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": false }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": false }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": true }, "page_url": { "name": "page_url", "type": "text", "primaryKey": false, "notNull": false }, "user_agent": { "name": "user_agent", "type": "text", "primaryKey": false, "notNull": false }, "attachments": { "name": "attachments", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "metadata": { "name": "metadata", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "feedbacks_user_id_users_id_fk": { "name": "feedbacks_user_id_users_id_fk", "tableFrom": "feedbacks", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.branches": { "name": "branches", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "is_default": { "name": "is_default", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "git_branch": { "name": "git_branch", "type": "varchar", "primaryKey": false, "notNull": false }, "git_commit_sha": { "name": "git_commit_sha", "type": "varchar", "primaryKey": false, "notNull": false }, "git_repo_url": { "name": "git_repo_url", "type": "varchar", "primaryKey": false, "notNull": false }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true } }, "indexes": { "branches_project_id_idx": { "name": "branches_project_id_idx", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "branches_name_per_project_ux": { "name": "branches_name_per_project_ux", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "name", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} }, "branches_default_per_project_ux": { "name": "branches_default_per_project_ux", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "where": "\"branches\".\"is_default\" = true", "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "branches_project_id_projects_id_fk": { "name": "branches_project_id_projects_id_fk", "tableFrom": "branches", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_create_requests": { "name": "project_create_requests", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_create_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "project_create_requests_project_id_projects_id_fk": { "name": "project_create_requests_project_id_projects_id_fk", "tableFrom": "project_create_requests", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_create_requests_project_id_unique": { "name": "project_create_requests_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "project_invitations_invitee_email_project_id_idx": { "name": "project_invitations_invitee_email_project_id_idx", "columns": [ { "expression": "invitee_email", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "tableTo": "users", "columnsFrom": [ "inviter_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "tags": { "name": "tags", "type": "varchar[]", "primaryKey": false, "notNull": false, "default": "'{}'" }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img_url": { "name": "preview_img_url", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_path": { "name": "preview_img_path", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_bucket": { "name": "preview_img_bucket", "type": "varchar", "primaryKey": false, "notNull": false }, "updated_preview_img_at": { "name": "updated_preview_img_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": false }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_settings": { "name": "project_settings", "schema": "", "columns": { "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "run_command": { "name": "run_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "build_command": { "name": "build_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "install_command": { "name": "install_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" } }, "indexes": {}, "foreignKeys": { "project_settings_project_id_projects_id_fk": { "name": "project_settings_project_id_projects_id_fk", "tableFrom": "project_settings", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_settings_project_id_unique": { "name": "project_settings_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.legacy_subscriptions": { "name": "legacy_subscriptions", "schema": "", "columns": { "email": { "name": "email", "type": "text", "primaryKey": true, "notNull": true }, "stripe_coupon_id": { "name": "stripe_coupon_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_promotion_code_id": { "name": "stripe_promotion_code_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_promotion_code": { "name": "stripe_promotion_code", "type": "text", "primaryKey": false, "notNull": true }, "redeem_at": { "name": "redeem_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "redeem_by": { "name": "redeem_by", "type": "timestamp with time zone", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.prices": { "name": "prices", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_key": { "name": "price_key", "type": "price_keys", "primaryKey": false, "notNull": true }, "monthly_message_limit": { "name": "monthly_message_limit", "type": "integer", "primaryKey": false, "notNull": true }, "stripe_price_id": { "name": "stripe_price_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "prices_product_id_products_id_fk": { "name": "prices_product_id_products_id_fk", "tableFrom": "prices", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "prices_stripe_price_id_unique": { "name": "prices_stripe_price_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_price_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.products": { "name": "products", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "product_type", "primaryKey": false, "notNull": true }, "stripe_product_id": { "name": "stripe_product_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "products_stripe_product_id_unique": { "name": "products_stripe_product_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_product_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.rate_limits": { "name": "rate_limits", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "subscription_id": { "name": "subscription_id", "type": "uuid", "primaryKey": false, "notNull": true }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "max": { "name": "max", "type": "integer", "primaryKey": false, "notNull": true }, "left": { "name": "left", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "carry_over_key": { "name": "carry_over_key", "type": "uuid", "primaryKey": false, "notNull": true }, "carry_over_total": { "name": "carry_over_total", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": { "rate_limits_user_time_idx": { "name": "rate_limits_user_time_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "started_at", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "ended_at", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "rate_limits_user_id_users_id_fk": { "name": "rate_limits_user_id_users_id_fk", "tableFrom": "rate_limits", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "rate_limits_subscription_id_subscriptions_id_fk": { "name": "rate_limits_subscription_id_subscriptions_id_fk", "tableFrom": "rate_limits", "tableTo": "subscriptions", "columnsFrom": [ "subscription_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.subscriptions": { "name": "subscriptions", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_id": { "name": "price_id", "type": "uuid", "primaryKey": false, "notNull": true }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "subscription_status", "primaryKey": false, "notNull": true, "default": "'active'" }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_id": { "name": "stripe_subscription_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_schedule_id": { "name": "stripe_subscription_schedule_id", "type": "text", "primaryKey": false, "notNull": false }, "stripe_current_period_start": { "name": "stripe_current_period_start", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "stripe_current_period_end": { "name": "stripe_current_period_end", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "scheduled_action": { "name": "scheduled_action", "type": "scheduled_subscription_action", "primaryKey": false, "notNull": false }, "scheduled_price_id": { "name": "scheduled_price_id", "type": "uuid", "primaryKey": false, "notNull": false }, "scheduled_change_at": { "name": "scheduled_change_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "subscriptions_user_id_users_id_fk": { "name": "subscriptions_user_id_users_id_fk", "tableFrom": "subscriptions", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_product_id_products_id_fk": { "name": "subscriptions_product_id_products_id_fk", "tableFrom": "subscriptions", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_price_id_prices_id_fk": { "name": "subscriptions_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_scheduled_price_id_prices_id_fk": { "name": "subscriptions_scheduled_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "scheduled_price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "subscriptions_stripe_subscription_id_unique": { "name": "subscriptions_stripe_subscription_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_id" ] }, "subscriptions_stripe_subscription_item_id_unique": { "name": "subscriptions_stripe_subscription_item_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_item_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.usage_records": { "name": "usage_records", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "usage_types", "primaryKey": false, "notNull": true, "default": "'message'" }, "timestamp": { "name": "timestamp", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "trace_id": { "name": "trace_id", "type": "varchar(255)", "primaryKey": false, "notNull": false } }, "indexes": { "usage_records_user_time_idx": { "name": "usage_records_user_time_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "timestamp", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "usage_records_user_id_users_id_fk": { "name": "usage_records_user_id_users_id_fk", "tableFrom": "usage_records", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "usage_records_user_trace_idx": { "name": "usage_records_user_trace_idx", "nullsNotDistinct": false, "columns": [ "user_id", "trace_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "should_warn_delete": { "name": "should_warn_delete", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "first_name": { "name": "first_name", "type": "text", "primaryKey": false, "notNull": false }, "last_name": { "name": "last_name", "type": "text", "primaryKey": false, "notNull": false }, "display_name": { "name": "display_name", "type": "text", "primaryKey": false, "notNull": false }, "avatar_url": { "name": "avatar_url", "type": "text", "primaryKey": false, "notNull": false }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.message_role": { "name": "message_role", "schema": "public", "values": [ "user", "assistant" ] }, "public.project_custom_domain_status": { "name": "project_custom_domain_status", "schema": "public", "values": [ "active", "cancelled" ] }, "public.verification_request_status": { "name": "verification_request_status", "schema": "public", "values": [ "pending", "verified", "cancelled" ] }, "public.deployment_status": { "name": "deployment_status", "schema": "public", "values": [ "pending", "in_progress", "completed", "failed", "cancelled" ] }, "public.deployment_type": { "name": "deployment_type", "schema": "public", "values": [ "preview", "custom", "unpublish_preview", "unpublish_custom" ] }, "public.project_create_status": { "name": "project_create_status", "schema": "public", "values": [ "pending", "completed", "failed" ] }, "public.price_keys": { "name": "price_keys", "schema": "public", "values": [ "PRO_MONTHLY_TIER_1", "PRO_MONTHLY_TIER_2", "PRO_MONTHLY_TIER_3", "PRO_MONTHLY_TIER_4", "PRO_MONTHLY_TIER_5", "PRO_MONTHLY_TIER_6", "PRO_MONTHLY_TIER_7", "PRO_MONTHLY_TIER_8", "PRO_MONTHLY_TIER_9", "PRO_MONTHLY_TIER_10", "PRO_MONTHLY_TIER_11" ] }, "public.product_type": { "name": "product_type", "schema": "public", "values": [ "free", "pro" ] }, "public.scheduled_subscription_action": { "name": "scheduled_subscription_action", "schema": "public", "values": [ "price_change", "cancellation" ] }, "public.subscription_status": { "name": "subscription_status", "schema": "public", "values": [ "active", "canceled" ] }, "public.usage_types": { "name": "usage_types", "schema": "public", "values": [ "message", "deployment" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": { "auth": "auth" }, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/0019_snapshot.json ================================================ { "id": "029a46b4-3db9-433a-b476-b37f7a8338f5", "prevId": "c726b804-42fb-40b6-a5d3-6b66e5a50620", "version": "7", "dialect": "postgresql", "tables": { "public.canvas": { "name": "canvas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "canvas_project_id_projects_id_fk": { "name": "canvas_project_id_projects_id_fk", "tableFrom": "canvas", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.frames": { "name": "frames", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "branch_id": { "name": "branch_id", "type": "uuid", "primaryKey": false, "notNull": false }, "url": { "name": "url", "type": "varchar", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true }, "width": { "name": "width", "type": "numeric", "primaryKey": false, "notNull": true }, "height": { "name": "height", "type": "numeric", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "frames_canvas_id_canvas_id_fk": { "name": "frames_canvas_id_canvas_id_fk", "tableFrom": "frames", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "frames_branch_id_branches_id_fk": { "name": "frames_branch_id_branches_id_fk", "tableFrom": "frames", "tableTo": "branches", "columnsFrom": [ "branch_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.conversations": { "name": "conversations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "suggestions": { "name": "suggestions", "type": "jsonb", "primaryKey": false, "notNull": false, "default": "'[]'::jsonb" } }, "indexes": {}, "foreignKeys": { "conversations_project_id_projects_id_fk": { "name": "conversations_project_id_projects_id_fk", "tableFrom": "conversations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "conversation_id": { "name": "conversation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "role": { "name": "role", "type": "message_role", "typeSchema": "public", "primaryKey": false, "notNull": true }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "parts": { "name": "parts", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "checkpoints": { "name": "checkpoints", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "applied": { "name": "applied", "type": "boolean", "primaryKey": false, "notNull": false }, "commit_oid": { "name": "commit_oid", "type": "text", "primaryKey": false, "notNull": false }, "snapshots": { "name": "snapshots", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "messages_conversation_id_conversations_id_fk": { "name": "messages_conversation_id_conversations_id_fk", "tableFrom": "messages", "tableTo": "conversations", "columnsFrom": [ "conversation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domains": { "name": "custom_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "apex_domain": { "name": "apex_domain", "type": "text", "primaryKey": false, "notNull": true }, "verified": { "name": "verified", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "custom_domains_apex_domain_unique": { "name": "custom_domains_apex_domain_unique", "nullsNotDistinct": false, "columns": [ "apex_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_custom_domains": { "name": "project_custom_domains", "schema": "", "columns": { "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "custom_domain_id": { "name": "custom_domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_custom_domain_status", "primaryKey": false, "notNull": true, "default": "'active'" } }, "indexes": {}, "foreignKeys": { "project_custom_domains_custom_domain_id_custom_domains_id_fk": { "name": "project_custom_domains_custom_domain_id_custom_domains_id_fk", "tableFrom": "project_custom_domains", "tableTo": "custom_domains", "columnsFrom": [ "custom_domain_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_custom_domains_project_id_projects_id_fk": { "name": "project_custom_domains_project_id_projects_id_fk", "tableFrom": "project_custom_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "project_custom_domains_custom_domain_id_project_id_pk": { "name": "project_custom_domains_custom_domain_id_project_id_pk", "columns": [ "custom_domain_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.custom_domain_verification": { "name": "custom_domain_verification", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "custom_domain_id": { "name": "custom_domain_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "freestyle_verification_id": { "name": "freestyle_verification_id", "type": "text", "primaryKey": false, "notNull": true }, "txt_record": { "name": "txt_record", "type": "jsonb", "primaryKey": false, "notNull": true }, "a_records": { "name": "a_records", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "status": { "name": "status", "type": "verification_request_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "custom_domain_verification_custom_domain_id_custom_domains_id_fk": { "name": "custom_domain_verification_custom_domain_id_custom_domains_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "custom_domains", "columnsFrom": [ "custom_domain_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "custom_domain_verification_project_id_projects_id_fk": { "name": "custom_domain_verification_project_id_projects_id_fk", "tableFrom": "custom_domain_verification", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.deployments": { "name": "deployments", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "requested_by": { "name": "requested_by", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "sandbox_id": { "name": "sandbox_id", "type": "text", "primaryKey": false, "notNull": false }, "urls": { "name": "urls", "type": "text[]", "primaryKey": false, "notNull": false }, "type": { "name": "type", "type": "deployment_type", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "deployment_status", "primaryKey": false, "notNull": true }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": false }, "build_log": { "name": "build_log", "type": "text", "primaryKey": false, "notNull": false }, "error": { "name": "error", "type": "text", "primaryKey": false, "notNull": false }, "progress": { "name": "progress", "type": "integer", "primaryKey": false, "notNull": false }, "build_script": { "name": "build_script", "type": "text", "primaryKey": false, "notNull": false }, "build_flags": { "name": "build_flags", "type": "text", "primaryKey": false, "notNull": false }, "env_vars": { "name": "env_vars", "type": "jsonb", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "deployments_requested_by_users_id_fk": { "name": "deployments_requested_by_users_id_fk", "tableFrom": "deployments", "tableTo": "users", "columnsFrom": [ "requested_by" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "deployments_project_id_projects_id_fk": { "name": "deployments_project_id_projects_id_fk", "tableFrom": "deployments", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.preview_domains": { "name": "preview_domains", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "full_domain": { "name": "full_domain", "type": "text", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "preview_domains_project_id_projects_id_fk": { "name": "preview_domains_project_id_projects_id_fk", "tableFrom": "preview_domains", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "preview_domains_full_domain_unique": { "name": "preview_domains_full_domain_unique", "nullsNotDistinct": false, "columns": [ "full_domain" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.feedbacks": { "name": "feedbacks", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": false }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": false }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": true }, "page_url": { "name": "page_url", "type": "text", "primaryKey": false, "notNull": false }, "user_agent": { "name": "user_agent", "type": "text", "primaryKey": false, "notNull": false }, "attachments": { "name": "attachments", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'[]'::jsonb" }, "metadata": { "name": "metadata", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "feedbacks_user_id_users_id_fk": { "name": "feedbacks_user_id_users_id_fk", "tableFrom": "feedbacks", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.branches": { "name": "branches", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "is_default": { "name": "is_default", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "git_branch": { "name": "git_branch", "type": "varchar", "primaryKey": false, "notNull": false }, "git_commit_sha": { "name": "git_commit_sha", "type": "varchar", "primaryKey": false, "notNull": false }, "git_repo_url": { "name": "git_repo_url", "type": "varchar", "primaryKey": false, "notNull": false }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": true } }, "indexes": { "branches_project_id_idx": { "name": "branches_project_id_idx", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "branches_name_per_project_ux": { "name": "branches_name_per_project_ux", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "name", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} }, "branches_default_per_project_ux": { "name": "branches_default_per_project_ux", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "where": "\"branches\".\"is_default\" = true", "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "branches_project_id_projects_id_fk": { "name": "branches_project_id_projects_id_fk", "tableFrom": "branches", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_create_requests": { "name": "project_create_requests", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "context": { "name": "context", "type": "jsonb", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "status": { "name": "status", "type": "project_create_status", "primaryKey": false, "notNull": true, "default": "'pending'" } }, "indexes": {}, "foreignKeys": { "project_create_requests_project_id_projects_id_fk": { "name": "project_create_requests_project_id_projects_id_fk", "tableFrom": "project_create_requests", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_create_requests_project_id_unique": { "name": "project_create_requests_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_invitations": { "name": "project_invitations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "inviter_id": { "name": "inviter_id", "type": "uuid", "primaryKey": false, "notNull": true }, "invitee_email": { "name": "invitee_email", "type": "varchar", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "varchar", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "project_invitations_invitee_email_project_id_idx": { "name": "project_invitations_invitee_email_project_id_idx", "columns": [ { "expression": "invitee_email", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "project_invitations_project_id_projects_id_fk": { "name": "project_invitations_project_id_projects_id_fk", "tableFrom": "project_invitations", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "project_invitations_inviter_id_users_id_fk": { "name": "project_invitations_inviter_id_users_id_fk", "tableFrom": "project_invitations", "tableTo": "users", "columnsFrom": [ "inviter_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_invitations_token_unique": { "name": "project_invitations_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "tags": { "name": "tags", "type": "varchar[]", "primaryKey": false, "notNull": false, "default": "'{}'" }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "preview_img_url": { "name": "preview_img_url", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_path": { "name": "preview_img_path", "type": "varchar", "primaryKey": false, "notNull": false }, "preview_img_bucket": { "name": "preview_img_bucket", "type": "varchar", "primaryKey": false, "notNull": false }, "updated_preview_img_at": { "name": "updated_preview_img_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "sandbox_id": { "name": "sandbox_id", "type": "varchar", "primaryKey": false, "notNull": false }, "sandbox_url": { "name": "sandbox_url", "type": "varchar", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.project_settings": { "name": "project_settings", "schema": "", "columns": { "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "run_command": { "name": "run_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "build_command": { "name": "build_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "install_command": { "name": "install_command", "type": "text", "primaryKey": false, "notNull": true, "default": "''" } }, "indexes": {}, "foreignKeys": { "project_settings_project_id_projects_id_fk": { "name": "project_settings_project_id_projects_id_fk", "tableFrom": "project_settings", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "project_settings_project_id_unique": { "name": "project_settings_project_id_unique", "nullsNotDistinct": false, "columns": [ "project_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.legacy_subscriptions": { "name": "legacy_subscriptions", "schema": "", "columns": { "email": { "name": "email", "type": "text", "primaryKey": true, "notNull": true }, "stripe_coupon_id": { "name": "stripe_coupon_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_promotion_code_id": { "name": "stripe_promotion_code_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_promotion_code": { "name": "stripe_promotion_code", "type": "text", "primaryKey": false, "notNull": true }, "redeem_at": { "name": "redeem_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "redeem_by": { "name": "redeem_by", "type": "timestamp with time zone", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.prices": { "name": "prices", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_key": { "name": "price_key", "type": "price_keys", "primaryKey": false, "notNull": true }, "monthly_message_limit": { "name": "monthly_message_limit", "type": "integer", "primaryKey": false, "notNull": true }, "stripe_price_id": { "name": "stripe_price_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "prices_product_id_products_id_fk": { "name": "prices_product_id_products_id_fk", "tableFrom": "prices", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "prices_stripe_price_id_unique": { "name": "prices_stripe_price_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_price_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.products": { "name": "products", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "product_type", "primaryKey": false, "notNull": true }, "stripe_product_id": { "name": "stripe_product_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "products_stripe_product_id_unique": { "name": "products_stripe_product_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_product_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.rate_limits": { "name": "rate_limits", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "subscription_id": { "name": "subscription_id", "type": "uuid", "primaryKey": false, "notNull": true }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "max": { "name": "max", "type": "integer", "primaryKey": false, "notNull": true }, "left": { "name": "left", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "carry_over_key": { "name": "carry_over_key", "type": "uuid", "primaryKey": false, "notNull": true }, "carry_over_total": { "name": "carry_over_total", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": { "rate_limits_user_time_idx": { "name": "rate_limits_user_time_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "started_at", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "ended_at", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "rate_limits_user_id_users_id_fk": { "name": "rate_limits_user_id_users_id_fk", "tableFrom": "rate_limits", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "rate_limits_subscription_id_subscriptions_id_fk": { "name": "rate_limits_subscription_id_subscriptions_id_fk", "tableFrom": "rate_limits", "tableTo": "subscriptions", "columnsFrom": [ "subscription_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.subscriptions": { "name": "subscriptions", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "product_id": { "name": "product_id", "type": "uuid", "primaryKey": false, "notNull": true }, "price_id": { "name": "price_id", "type": "uuid", "primaryKey": false, "notNull": true }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "ended_at": { "name": "ended_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "subscription_status", "primaryKey": false, "notNull": true, "default": "'active'" }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_id": { "name": "stripe_subscription_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_item_id": { "name": "stripe_subscription_item_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_schedule_id": { "name": "stripe_subscription_schedule_id", "type": "text", "primaryKey": false, "notNull": false }, "stripe_current_period_start": { "name": "stripe_current_period_start", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "stripe_current_period_end": { "name": "stripe_current_period_end", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "scheduled_action": { "name": "scheduled_action", "type": "scheduled_subscription_action", "primaryKey": false, "notNull": false }, "scheduled_price_id": { "name": "scheduled_price_id", "type": "uuid", "primaryKey": false, "notNull": false }, "scheduled_change_at": { "name": "scheduled_change_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "subscriptions_user_id_users_id_fk": { "name": "subscriptions_user_id_users_id_fk", "tableFrom": "subscriptions", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_product_id_products_id_fk": { "name": "subscriptions_product_id_products_id_fk", "tableFrom": "subscriptions", "tableTo": "products", "columnsFrom": [ "product_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_price_id_prices_id_fk": { "name": "subscriptions_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "subscriptions_scheduled_price_id_prices_id_fk": { "name": "subscriptions_scheduled_price_id_prices_id_fk", "tableFrom": "subscriptions", "tableTo": "prices", "columnsFrom": [ "scheduled_price_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "subscriptions_stripe_subscription_id_unique": { "name": "subscriptions_stripe_subscription_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_id" ] }, "subscriptions_stripe_subscription_item_id_unique": { "name": "subscriptions_stripe_subscription_item_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_item_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.usage_records": { "name": "usage_records", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "usage_types", "primaryKey": false, "notNull": true, "default": "'message'" }, "timestamp": { "name": "timestamp", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "trace_id": { "name": "trace_id", "type": "varchar(255)", "primaryKey": false, "notNull": false } }, "indexes": { "usage_records_user_time_idx": { "name": "usage_records_user_time_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "timestamp", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "usage_records_user_id_users_id_fk": { "name": "usage_records_user_id_users_id_fk", "tableFrom": "usage_records", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "usage_records_user_trace_idx": { "name": "usage_records_user_trace_idx", "nullsNotDistinct": false, "columns": [ "user_id", "trace_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "auth.users": { "name": "users", "schema": "auth", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_confirmed_at": { "name": "email_confirmed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "raw_user_meta_data": { "name": "raw_user_meta_data", "type": "jsonb", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_settings": { "name": "user_settings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "auto_apply_code": { "name": "auto_apply_code", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "expand_code_blocks": { "name": "expand_code_blocks", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_suggestions": { "name": "show_suggestions", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "show_mini_chat": { "name": "show_mini_chat", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "should_warn_delete": { "name": "should_warn_delete", "type": "boolean", "primaryKey": false, "notNull": true, "default": true } }, "indexes": {}, "foreignKeys": { "user_settings_user_id_users_id_fk": { "name": "user_settings_user_id_users_id_fk", "tableFrom": "user_settings", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_settings_user_id_unique": { "name": "user_settings_user_id_unique", "nullsNotDistinct": false, "columns": [ "user_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true }, "first_name": { "name": "first_name", "type": "text", "primaryKey": false, "notNull": false }, "last_name": { "name": "last_name", "type": "text", "primaryKey": false, "notNull": false }, "display_name": { "name": "display_name", "type": "text", "primaryKey": false, "notNull": false }, "avatar_url": { "name": "avatar_url", "type": "text", "primaryKey": false, "notNull": false }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": false }, "github_installation_id": { "name": "github_installation_id", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "users_id_users_id_fk": { "name": "users_id_users_id_fk", "tableFrom": "users", "tableTo": "users", "schemaTo": "auth", "columnsFrom": [ "id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_canvases": { "name": "user_canvases", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "canvas_id": { "name": "canvas_id", "type": "uuid", "primaryKey": false, "notNull": true }, "scale": { "name": "scale", "type": "numeric", "primaryKey": false, "notNull": true }, "x": { "name": "x", "type": "numeric", "primaryKey": false, "notNull": true }, "y": { "name": "y", "type": "numeric", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_canvases_user_id_users_id_fk": { "name": "user_canvases_user_id_users_id_fk", "tableFrom": "user_canvases", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_canvases_canvas_id_canvas_id_fk": { "name": "user_canvases_canvas_id_canvas_id_fk", "tableFrom": "user_canvases", "tableTo": "canvas", "columnsFrom": [ "canvas_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_canvases_user_id_canvas_id_pk": { "name": "user_canvases_user_id_canvas_id_pk", "columns": [ "user_id", "canvas_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true }, "public.user_projects": { "name": "user_projects", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "uuid", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "uuid", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false, "default": "now()" }, "role": { "name": "role", "type": "project_role", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "user_projects_user_id_users_id_fk": { "name": "user_projects_user_id_users_id_fk", "tableFrom": "user_projects", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" }, "user_projects_project_id_projects_id_fk": { "name": "user_projects_project_id_projects_id_fk", "tableFrom": "user_projects", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": { "user_projects_user_id_project_id_pk": { "name": "user_projects_user_id_project_id_pk", "columns": [ "user_id", "project_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": true } }, "enums": { "public.message_role": { "name": "message_role", "schema": "public", "values": [ "user", "assistant", "system" ] }, "public.project_custom_domain_status": { "name": "project_custom_domain_status", "schema": "public", "values": [ "active", "cancelled" ] }, "public.verification_request_status": { "name": "verification_request_status", "schema": "public", "values": [ "pending", "verified", "cancelled" ] }, "public.deployment_status": { "name": "deployment_status", "schema": "public", "values": [ "pending", "in_progress", "completed", "failed", "cancelled" ] }, "public.deployment_type": { "name": "deployment_type", "schema": "public", "values": [ "preview", "custom", "unpublish_preview", "unpublish_custom" ] }, "public.project_create_status": { "name": "project_create_status", "schema": "public", "values": [ "pending", "completed", "failed" ] }, "public.price_keys": { "name": "price_keys", "schema": "public", "values": [ "PRO_MONTHLY_TIER_1", "PRO_MONTHLY_TIER_2", "PRO_MONTHLY_TIER_3", "PRO_MONTHLY_TIER_4", "PRO_MONTHLY_TIER_5", "PRO_MONTHLY_TIER_6", "PRO_MONTHLY_TIER_7", "PRO_MONTHLY_TIER_8", "PRO_MONTHLY_TIER_9", "PRO_MONTHLY_TIER_10", "PRO_MONTHLY_TIER_11" ] }, "public.product_type": { "name": "product_type", "schema": "public", "values": [ "free", "pro" ] }, "public.scheduled_subscription_action": { "name": "scheduled_subscription_action", "schema": "public", "values": [ "price_change", "cancellation" ] }, "public.subscription_status": { "name": "subscription_status", "schema": "public", "values": [ "active", "canceled" ] }, "public.usage_types": { "name": "usage_types", "schema": "public", "values": [ "message", "deployment" ] }, "public.project_role": { "name": "project_role", "schema": "public", "values": [ "owner", "admin" ] } }, "schemas": { "auth": "auth" }, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } } ================================================ FILE: apps/backend/supabase/migrations/meta/_journal.json ================================================ { "version": "7", "dialect": "postgresql", "entries": [ { "idx": 0, "version": "7", "when": 1747780205535, "tag": "0000_same_human_robot", "breakpoints": true }, { "idx": 1, "version": "7", "when": 1747780749310, "tag": "0001_graceful_exodus", "breakpoints": true }, { "idx": 2, "version": "7", "when": 1748028633785, "tag": "0002_red_crusher_hogan", "breakpoints": true }, { "idx": 3, "version": "7", "when": 1748335865371, "tag": "0003_loud_ozymandias", "breakpoints": true }, { "idx": 4, "version": "7", "when": 1748355015711, "tag": "0004_pink_expediter", "breakpoints": true }, { "idx": 5, "version": "7", "when": 1748430282890, "tag": "0005_short_lila_cheney", "breakpoints": true }, { "idx": 6, "version": "7", "when": 1748548078866, "tag": "0006_rls", "breakpoints": true }, { "idx": 7, "version": "7", "when": 1748618860222, "tag": "0007_realtime_rls", "breakpoints": true }, { "idx": 8, "version": "7", "when": 1748969281653, "tag": "0008_preview-img-storage", "breakpoints": true }, { "idx": 9, "version": "7", "when": 1748969954773, "tag": "0009_project_img_path", "breakpoints": true }, { "idx": 10, "version": "7", "when": 1749589432515, "tag": "0010_bent_edwin_jarvis", "breakpoints": true }, { "idx": 11, "version": "7", "when": 1751069383054, "tag": "0011_typical_clea", "breakpoints": true }, { "idx": 12, "version": "7", "when": 1751069449613, "tag": "0012_file-transfer-bucket", "breakpoints": true }, { "idx": 13, "version": "7", "when": 1751914112866, "tag": "0013_aspiring_kabuki", "breakpoints": true }, { "idx": 14, "version": "7", "when": 1752263777650, "tag": "0014_military_marrow", "breakpoints": true }, { "idx": 15, "version": "7", "when": 1753208692842, "tag": "0015_same_leo", "breakpoints": true }, { "idx": 16, "version": "7", "when": 1755044168112, "tag": "0016_pretty_dust", "breakpoints": true }, { "idx": 17, "version": "7", "when": 1756677811694, "tag": "0017_small_xavin", "breakpoints": true }, { "idx": 18, "version": "7", "when": 1757372913453, "tag": "0018_lush_thanos", "breakpoints": true }, { "idx": 19, "version": "7", "when": 1758255985926, "tag": "0019_abandoned_psylocke", "breakpoints": true } ] } ================================================ FILE: apps/backend/tsconfig.json ================================================ { "compilerOptions": { // Enable latest features "lib": ["ESNext", "DOM"], "target": "ESNext", "module": "ESNext", "moduleDetection": "force", "jsx": "react-jsx", "allowJs": true, // Bundler mode "moduleResolution": "bundler", "allowImportingTsExtensions": true, "verbatimModuleSyntax": true, "noEmit": true, // Best practices "strict": true, "skipLibCheck": true, "noFallthroughCasesInSwitch": true, // Some stricter flags (disabled by default) "noUnusedLocals": false, "noUnusedParameters": false, "noPropertyAccessFromIndexSignature": false } } ================================================ FILE: apps/web/.gitignore ================================================ # dependencies (bun install) node_modules # output out dist *.tgz # code coverage coverage *.lcov # logs logs _.log report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json # dotenv environment variable files .env .env.development.local .env.test.local .env.production.local .env.local # caches .eslintcache .cache *.tsbuildinfo # IntelliJ based IDEs .idea # Finder (MacOS) folder config .DS_Store ================================================ FILE: apps/web/README.md ================================================ # Web project Structure - Client - Next.js client that is served as app front-end - Server - The control server that will be used to interact with the template app - Shared - All the shared packages for the web project - Preload - The script that gets injected into Template app. This allows communnicating directly with the app DOM through iframe ================================================ FILE: apps/web/client/.gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # database /prisma/db.sqlite /prisma/db.sqlite-journal db.sqlite # next.js /.next/ /out/ next-env.d.ts # production /build # misc .DS_Store *.pem # debug npm-debug.log* yarn-debug.log* yarn-error.log* .pnpm-debug.log* # local env files # do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables .env .env*.local # vercel .vercel # typescript *.tsbuildinfo # idea files .idea # mastra .mastra/ *storybook.log storybook-static ================================================ FILE: apps/web/client/.storybook/main.ts ================================================ import type { StorybookConfig } from "@storybook/nextjs-vite"; import { dirname, join, relative } from "path" import { fileURLToPath } from "url" import { existsSync } from "fs" /** * This function is used to resolve the absolute path of a package. * It is needed in projects that use Yarn PnP or are set up within a monorepo. */ function getAbsolutePath(value: string): any { return dirname(fileURLToPath(import.meta.resolve(`${value}/package.json`))) } /** * Find the git repository root by walking up the directory tree */ function findGitRoot(startPath: string): string | null { let currentPath = startPath; while (currentPath !== dirname(currentPath)) { if (existsSync(join(currentPath, '.git'))) { return currentPath; } currentPath = dirname(currentPath); } return null; } const config: StorybookConfig = { "stories": [ "../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)" ], "addons": [ getAbsolutePath('@chromatic-com/storybook'), getAbsolutePath('@storybook/addon-docs'), getAbsolutePath('@storybook/addon-onboarding'), getAbsolutePath("@storybook/addon-a11y"), getAbsolutePath("@storybook/addon-vitest") ], "framework": { "name": getAbsolutePath("@storybook/nextjs-vite"), "options": {} }, "staticDirs": [ "../public" ], async viteFinal(config) { const { mergeConfig } = await import('vite'); const __dirname = dirname(fileURLToPath(import.meta.url)); const storybookDir = join(__dirname, '..'); const gitRoot = findGitRoot(storybookDir); const storybookLocation = gitRoot ? relative(gitRoot, storybookDir) : ''; return mergeConfig(config, { define: { 'process.env': '{}', 'process': '{"env": {}}', }, resolve: { alias: { '@/utils/supabase/client': fileURLToPath( new URL('./mocks/supabase-client.ts', import.meta.url) ), '@/trpc/react': fileURLToPath( new URL('./mocks/trpc-react.tsx', import.meta.url) ), '~/trpc/react': fileURLToPath( new URL('./mocks/trpc-react.tsx', import.meta.url) ), }, }, plugins: [ { name: 'onbook-metadata', configureServer(server) { // Serve metadata in dev mode server.middlewares.use((req, res, next) => { if (req.url === '/onbook-metadata.json') { res.setHeader('Content-Type', 'application/json'); res.setHeader('Access-Control-Allow-Origin', '*'); res.end(JSON.stringify({ storybookLocation })); return; } next(); }); }, configurePreviewServer(server) { // Serve metadata in preview/build mode (for Chromatic) server.middlewares.use((req, res, next) => { if (req.url === '/onbook-metadata.json') { res.setHeader('Content-Type', 'application/json'); res.setHeader('Access-Control-Allow-Origin', '*'); res.end(JSON.stringify({ storybookLocation })); return; } next(); }); }, }, ], }); }, }; export default config; ================================================ FILE: apps/web/client/.storybook/mocks/supabase-client.ts ================================================ /** * Mock Supabase client utilities for Storybook * * This mock prevents the import chain: * getFileUrlFromStorage → @/env → @t3-oss/env-nextjs → process.cwd() * * Stories should use type: 'url' for preview images instead of type: 'storage' * to avoid needing actual storage path resolution. */ export const getFileUrlFromStorage = (bucket: string, path: string) => { // Return a mock URL - this shouldn't be called if stories use type: 'url' return `https://example.com/storage/${bucket}/${path}`; }; // Mock implementation for file info export const getFileInfoFromStorage = async (bucket: string, path: string) => { return null; }; // Mock implementation for upload export const uploadBlobToStorage = async ( bucket: string, path: string, file: Blob, options: { upsert?: boolean; contentType?: string; cacheControl?: string; } ) => { return null; }; ================================================ FILE: apps/web/client/.storybook/mocks/trpc-react.tsx ================================================ 'use client'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { createTRPCReact, httpBatchLink } from '@trpc/react-query'; import { useState } from 'react'; /** * Mock tRPC client for Storybook * * This mock provides a functional tRPC context without making real API calls. * It prevents the import chain: AppRouter → subscriptionRouter/usageRouter → @onlook/stripe → dotenv.config() * * The mock client uses a dummy HTTP link that will never be called in Storybook * since we don't actually trigger mutations/queries in stories. */ // Create a minimal mock AppRouter type to avoid importing real routers type MockAppRouter = Record; export const api = createTRPCReact(); // Mock type exports to satisfy TypeScript export type RouterInputs = Record; export type RouterOutputs = Record; // Create QueryClient singleton for Storybook let queryClientSingleton: QueryClient | undefined = undefined; const getQueryClient = () => { if (!queryClientSingleton) { queryClientSingleton = new QueryClient({ defaultOptions: { queries: { staleTime: 60 * 1000, retry: false, }, }, }); } return queryClientSingleton; }; export function TRPCReactProvider(props: { children: React.ReactNode }) { const queryClient = getQueryClient(); const [trpcClient] = useState(() => api.createClient({ links: [ httpBatchLink({ url: '/api/trpc', // This will never actually be called in Storybook }), ], }), ); return ( {props.children} ); } ================================================ FILE: apps/web/client/.storybook/preview-head.html ================================================ ================================================ FILE: apps/web/client/.storybook/preview.tsx ================================================ import type { Preview } from '@storybook/nextjs-vite' import '@onlook/ui/globals.css' import { Inter } from 'next/font/google' import { NextIntlClientProvider } from 'next-intl' import { ThemeProvider } from 'next-themes' import messages from '../messages/en.json' import { TRPCReactProvider } from './mocks/trpc-react' const inter = Inter({ subsets: ['latin'], variable: '--font-inter', }) const preview: Preview = { decorators: [ (Story) => (
), ], parameters: { controls: { matchers: { color: /(background|color)$/i, date: /Date$/i, }, }, a11y: { // 'todo' - show a11y violations in the test UI only // 'error' - fail CI on a11y violations // 'off' - skip a11y checks entirely test: 'todo' } }, }; export default preview; ================================================ FILE: apps/web/client/.storybook/vitest.setup.ts ================================================ import * as a11yAddonAnnotations from "@storybook/addon-a11y/preview"; import { setProjectAnnotations } from '@storybook/nextjs-vite'; import * as projectAnnotations from './preview'; // This is an important step to apply the right configuration when testing your stories. // More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations setProjectAnnotations([a11yAddonAnnotations, projectAnnotations]); ================================================ FILE: apps/web/client/README.md ================================================ # Create T3 App This is a [T3 Stack](https://create.t3.gg/) project bootstrapped with `create-t3-app`. ## What's next? How do I make an app with this? We try to keep this project as simple as possible, so you can start with just the scaffolding we set up for you, and add additional things later when they become necessary. If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our [Discord](https://t3.gg/discord) and ask for help. - [Next.js](https://nextjs.org) - [Drizzle](https://orm.drizzle.team) - [Tailwind CSS](https://tailwindcss.com) - [tRPC](https://trpc.io) ## Learn More To learn more about the [T3 Stack](https://create.t3.gg/), take a look at the following resources: - [Documentation](https://create.t3.gg/) - [Learn the T3 Stack](https://create.t3.gg/en/faq#what-learning-resources-are-currently-available) — Check out these awesome tutorials You can check out the [create-t3-app GitHub repository](https://github.com/t3-oss/create-t3-app) — your feedback and contributions are welcome! ## How do I deploy this? Follow our deployment guides for [Vercel](https://create.t3.gg/en/deployment/vercel), [Netlify](https://create.t3.gg/en/deployment/netlify) and [Docker](https://create.t3.gg/en/deployment/docker) for more information. ================================================ FILE: apps/web/client/chromatic.config.json ================================================ { "projectToken": "chpt_549eddb0e603baf", "buildScriptName": "build-storybook", "exitZeroOnChanges": true } ================================================ FILE: apps/web/client/components.json ================================================ { "$schema": "https://ui.shadcn.com/schema.json", "style": "new-york", "rsc": true, "tsx": true, "tailwind": { "config": "", "css": "src/styles/globals.css", "baseColor": "slate", "cssVariables": false, "prefix": "" }, "aliases": { "components": "@/components", "utils": "@/lib/utils", "ui": "@/components/ui", "lib": "@/lib", "hooks": "@/hooks" }, "iconLibrary": "lucide" } ================================================ FILE: apps/web/client/eslint.config.js ================================================ // For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format import storybook from "eslint-plugin-storybook"; import baseConfig from "@onlook/eslint/base"; import nextjsConfig, { restrictEnvAccess } from "@onlook/eslint/nextjs"; import reactConfig from "@onlook/eslint/react"; /** @type {import('typescript-eslint').Config} */ export default [{ ignores: [".next/**"], }, ...baseConfig, ...reactConfig, ...nextjsConfig, ...restrictEnvAccess, ...storybook.configs["flat/recommended"]]; ================================================ FILE: apps/web/client/messages/en.d.json.ts ================================================ // This file is auto-generated by next-intl, do not edit directly. // See: https://next-intl.dev/docs/workflows/typescript#messages-arguments declare const messages: { "projects": { "create": { "settings": { "title": "Settings", "tooltip": "Configure new project settings" }, "success": "Project created successfully.", "steps": { "count": "{current} of {total}", "error": "Project data is missing." }, "methods": { "new": "Create New Project", "load": "Load Existing Project" }, "loading": { "title": "Setting up your new Onlook app...", "description": "This may take a few seconds", "cancel": "Cancel" }, "error": { "title": "Error creating your Onlook app", "backToPrompt": "Back to Prompting" } }, "select": { "empty": "No projects found", "sort": { "recent": "Recently Updated", "name": "Project Name" }, "lastEdited": "Last edited {time} ago" }, "actions": { "import": "Import Project", "close": "Close", "about": "About Onlook", "signOut": "Sign out", "editApp": "Edit App", "projectSettings": "Project settings", "showInExplorer": "Show in Explorer", "renameProject": "Rename Project", "deleteProject": "Delete Project", "cloneProject": "Clone Project", "cancel": "Cancel", "delete": "Delete", "rename": "Rename", "clone": "Clone", "goToAllProjects": "Go to all Projects", "newProject": "New Project", "blankProject": "Blank Project", "startFromScratch": "Start from scratch", "importProject": "Import a project", "subscriptions": "Subscriptions", "settings": "Settings", "downloadCode": "Download Code", "downloadingCode": "Preparing download...", "downloadSuccess": "Download started successfully", "downloadError": "Failed to prepare download", "recentProjects": "Recent Projects" }, "dialogs": { "delete": { "title": "Are you sure you want to delete this project?", "description": "This action cannot be undone. This will permanently delete your project and remove all associated data.", "moveToTrash": "Also move folder to trash" }, "rename": { "title": "Rename Project", "label": "Project Name", "error": "Project name can't be empty" }, "clone": { "title": "Clone Project", "label": "Project Name", "placeholder": "Enter name for cloned project", "error": "Project name can't be empty" } }, "prompt": { "title": "What kind of website do you want to make?", "description": "Tell us a bit about your project. Be as detailed as possible.", "input": { "placeholder": "Paste a reference screenshot, write a novel, get creative...", "imageUpload": "Upload Image Reference", "fileReference": "File Reference", "submit": "Start building your site" }, "blankStart": "Start from a blank page" } }, "welcome": { "title": "Welcome to Onlook", "titleReturn": "Welcome back to Onlook", "description": "A next-generation visual code editor that lets designers and product managers craft web experiences with AI.", "alpha": "Alpha", "login": { "github": "Login with GitHub", "google": "Login with Google", "lastUsed": "You used this last time", "loginToEdit": "Login to Edit", "shareProjects": "No credit card required • Get a site in seconds" }, "terms": { "agreement": "By signing up, you agree to our", "privacy": "Privacy Policy", "and": "and", "tos": "Terms of Service" }, "version": "Version {version}" }, "pricing": { "plans": { "basic": { "name": "Basic", "price": "$0/month", "description": "Prototype and experiment in code with ease.", "features": [ "Visual code editor access", "Unlimited projects", "{dailyMessages} AI chat messages a day", "{monthlyMessages} AI messages a month", "Limited to 1 screenshot per chat" ] }, "pro": { "name": "Pro", "price": "$20/month", "description": "Creativity – unconstrained. Build stunning sites with AI.", "features": [ "Visual code editor access", "Unlimited projects", "Unlimited AI chat messages a day", "Unlimited monthly chats", "Remove built with Onlook watermark", "1 free custom domain hosted with Onlook", "Priority support" ] }, "launch": { "name": "Launch", "price": "$50/month", "description": "Perfect for startups and growing teams", "features": [ "Unlimited daily messages", "Priority support", "Advanced integrations", "Team collaboration features" ] }, "scale": { "name": "Scale", "price": "$100/month", "description": "Enterprise-grade features for large teams", "features": [ "Everything in Launch plan", "Dedicated account manager", "Custom integrations", "Advanced analytics", "24/7 premium support" ] } }, "titles": { "choosePlan": "Choose your plan", "proMember": "Thanks for being a Pro member!" }, "buttons": { "currentPlan": "Current Plan", "getPro": "Get Pro", "manageSubscription": "Manage Subscription" }, "loading": { "checkingPayment": "Checking for payment..." }, "toasts": { "checkingOut": { "title": "Checking out", "description": "You will now be redirected to Stripe to complete the payment." }, "redirectingToStripe": { "title": "Redirecting to Stripe", "description": "You will now be redirected to Stripe to manage your subscription." }, "error": { "title": "Error", "description": "Could not initiate checkout process. Please try again." } }, "footer": { "unusedMessages": "Unused chat messages will roll over to the next month." } }, "editor": { "modes": { "design": { "name": "Design", "description": "Edit and modify your website's design", "tooltip": "Switch to design mode" }, "code": { "name": "Code", "description": "Edit and modify your website's code", "tooltip": "Switch to code mode" }, "preview": { "name": "Preview", "description": "Preview and test your website's functionality", "tooltip": "Switch to Preview mode" } }, "toolbar": { "tools": { "select": { "name": "Select", "tooltip": "Select and modify elements" }, "pan": { "name": "Pan", "tooltip": "Pan and move around the canvas" }, "insertDiv": { "name": "Insert Container", "tooltip": "Add a new container element" }, "insertText": { "name": "Insert Text", "tooltip": "Add a new text element" } }, "versionHistory": "Version History" }, "panels": { "edit": { "tabs": { "chat": { "name": "Chat", "emptyState": "Select an element to chat with AI", "emptyStateStart": "Start the project to chat", "input": { "placeholder": "Type your message...", "tooltip": "Chat with AI about the selected element" }, "mode": { "tooltip": "Switch between Build and Ask modes" }, "controls": { "newChat": "New Chat", "history": "Chat History" }, "settings": { "showSuggestions": "Show suggestions", "showMiniChat": "Show mini chat", "autoApplyCode": "Auto-apply results", "expandCodeBlocks": "Show code while rendering" }, "miniChat": { "button": "Chat with AI" }, "openInCode": { "button": "Open in Code" } }, "styles": { "name": "Styles", "emptyState": "Select an element to edit its style properties", "groups": { "position": "Position & Dimensions", "layout": "Flexbox & Layout", "style": "Styles", "text": "Text" }, "tailwind": { "title": "Tailwind Classes", "placeholder": "Add tailwind classes here", "componentClasses": { "title": "Main Component Classes", "tooltip": "Changes apply to component code. This is the default." }, "instanceClasses": { "title": "Instance Classes", "tooltip": "Changes apply to instance code." } } } } }, "layers": { "name": "Layers", "tabs": { "layers": "Layers", "pages": "Pages", "components": "Elements", "images": "Images", "windows": { "name": "Windows", "emptyState": "Select a window to edit its settings" }, "brand": "Brand", "branches": "Branches", "apps": "Apps" } } }, "settings": { "preferences": { "language": "Language", "theme": "Theme", "deleteWarning": "Delete Warning", "analytics": "Analytics", "editor": { "ide": "Editor", "shouldWarnDelete": "Warn when deleting elements", "enableAnalytics": "Enable analytics" }, "shortcuts": "Shortcuts" } }, "frame": { "startDesigning": { "prefix": "Press ", "action": "Play", "suffix": " to start designing your App" }, "playButton": "Play", "waitingForApp": "Waiting for the App to start..." }, "runButton": { "portInUse": "Port in Use", "loading": "Loading", "play": "Play", "retry": "Retry", "stop": "Stop" }, "zoom": { "level": "Zoom Level", "in": "Zoom In", "out": "Zoom Out", "fit": "Zoom Fit", "reset": "Zoom 100%", "double": "Zoom 200%" } }, "help": { "menu": { "reloadOnlook": "Reload Onlook", "theme": { "title": "Theme", "light": "Light", "dark": "Dark", "system": "System" }, "language": "Language", "openSettings": "Open Settings", "contactUs": { "title": "Contact Us", "website": "Website", "discord": "Discord", "github": "GitHub", "email": "Email" }, "reportIssue": "Report Issue", "shortcuts": "Shortcuts" } } }; export default messages; ================================================ FILE: apps/web/client/messages/en.json ================================================ { "projects": { "create": { "settings": { "title": "Settings", "tooltip": "Configure new project settings" }, "success": "Project created successfully.", "steps": { "count": "{current} of {total}", "error": "Project data is missing." }, "methods": { "new": "Create New Project", "load": "Load Existing Project" }, "loading": { "title": "Setting up your new Onlook app...", "description": "This may take a few seconds", "cancel": "Cancel" }, "error": { "title": "Error creating your Onlook app", "backToPrompt": "Back to Prompting" } }, "select": { "empty": "No projects found", "sort": { "recent": "Recently Updated", "name": "Project Name" }, "lastEdited": "Last edited {time} ago" }, "actions": { "import": "Import Project", "close": "Close", "about": "About Onlook", "signOut": "Sign out", "editApp": "Edit App", "projectSettings": "Project settings", "showInExplorer": "Show in Explorer", "renameProject": "Rename Project", "deleteProject": "Delete Project", "cloneProject": "Clone Project", "cancel": "Cancel", "delete": "Delete", "rename": "Rename", "clone": "Clone", "goToAllProjects": "Go to all Projects", "newProject": "New Project", "blankProject": "Blank Project", "startFromScratch": "Start from scratch", "importProject": "Import a project", "subscriptions": "Subscriptions", "settings": "Settings", "downloadCode": "Download Code", "downloadingCode": "Preparing download...", "downloadSuccess": "Download started successfully", "downloadError": "Failed to prepare download", "recentProjects": "Recent Projects" }, "dialogs": { "delete": { "title": "Are you sure you want to delete this project?", "description": "This action cannot be undone. This will permanently delete your project and remove all associated data.", "moveToTrash": "Also move folder to trash" }, "rename": { "title": "Rename Project", "label": "Project Name", "error": "Project name can't be empty" }, "clone": { "title": "Clone Project", "label": "Project Name", "placeholder": "Enter name for cloned project", "error": "Project name can't be empty" } }, "prompt": { "title": "What kind of website do you want to make?", "description": "Tell us a bit about your project. Be as detailed as possible.", "input": { "placeholder": "Paste a reference screenshot, write a novel, get creative...", "imageUpload": "Upload Image Reference", "fileReference": "File Reference", "submit": "Start building your site" }, "blankStart": "Start from a blank page" } }, "welcome": { "title": "Welcome to Onlook", "titleReturn": "Welcome back to Onlook", "description": "A next-generation visual code editor that lets designers and product managers craft web experiences with AI.", "alpha": "Alpha", "login": { "github": "Login with GitHub", "google": "Login with Google", "lastUsed": "You used this last time", "loginToEdit": "Login to Edit", "shareProjects": "No credit card required • Get a site in seconds" }, "terms": { "agreement": "By signing up, you agree to our", "privacy": "Privacy Policy", "and": "and", "tos": "Terms of Service" }, "version": "Version {version}" }, "pricing": { "plans": { "basic": { "name": "Basic", "price": "$0/month", "description": "Prototype and experiment in code with ease.", "features": [ "Visual code editor access", "Unlimited projects", "{dailyMessages} AI chat messages a day", "{monthlyMessages} AI messages a month", "Limited to 1 screenshot per chat" ] }, "pro": { "name": "Pro", "price": "$20/month", "description": "Creativity – unconstrained. Build stunning sites with AI.", "features": [ "Visual code editor access", "Unlimited projects", "Unlimited AI chat messages a day", "Unlimited monthly chats", "Remove built with Onlook watermark", "1 free custom domain hosted with Onlook", "Priority support" ] }, "launch": { "name": "Launch", "price": "$50/month", "description": "Perfect for startups and growing teams", "features": [ "Unlimited daily messages", "Priority support", "Advanced integrations", "Team collaboration features" ] }, "scale": { "name": "Scale", "price": "$100/month", "description": "Enterprise-grade features for large teams", "features": [ "Everything in Launch plan", "Dedicated account manager", "Custom integrations", "Advanced analytics", "24/7 premium support" ] } }, "titles": { "choosePlan": "Choose your plan", "proMember": "Thanks for being a Pro member!" }, "buttons": { "currentPlan": "Current Plan", "getPro": "Get Pro", "manageSubscription": "Manage Subscription" }, "loading": { "checkingPayment": "Checking for payment..." }, "toasts": { "checkingOut": { "title": "Checking out", "description": "You will now be redirected to Stripe to complete the payment." }, "redirectingToStripe": { "title": "Redirecting to Stripe", "description": "You will now be redirected to Stripe to manage your subscription." }, "error": { "title": "Error", "description": "Could not initiate checkout process. Please try again." } }, "footer": { "unusedMessages": "Unused chat messages will roll over to the next month." } }, "editor": { "modes": { "design": { "name": "Design", "description": "Edit and modify your website's design", "tooltip": "Switch to design mode" }, "code": { "name": "Code", "description": "Edit and modify your website's code", "tooltip": "Switch to code mode" }, "preview": { "name": "Preview", "description": "Preview and test your website's functionality", "tooltip": "Switch to Preview mode" } }, "toolbar": { "tools": { "select": { "name": "Select", "tooltip": "Select and modify elements" }, "pan": { "name": "Pan", "tooltip": "Pan and move around the canvas" }, "insertDiv": { "name": "Insert Container", "tooltip": "Add a new container element" }, "insertText": { "name": "Insert Text", "tooltip": "Add a new text element" } }, "versionHistory": "Version History" }, "panels": { "edit": { "tabs": { "chat": { "name": "Chat", "emptyState": "Select an element to chat with AI", "emptyStateStart": "Start the project to chat", "input": { "placeholder": "Type your message...", "tooltip": "Chat with AI about the selected element" }, "mode": { "tooltip": "Switch between Build and Ask modes" }, "controls": { "newChat": "New Chat", "history": "Chat History" }, "settings": { "showSuggestions": "Show suggestions", "showMiniChat": "Show mini chat", "autoApplyCode": "Auto-apply results", "expandCodeBlocks": "Show code while rendering" }, "miniChat": { "button": "Chat with AI" }, "openInCode": { "button": "Open in Code" } }, "styles": { "name": "Styles", "emptyState": "Select an element to edit its style properties", "groups": { "position": "Position & Dimensions", "layout": "Flexbox & Layout", "style": "Styles", "text": "Text" }, "tailwind": { "title": "Tailwind Classes", "placeholder": "Add tailwind classes here", "componentClasses": { "title": "Main Component Classes", "tooltip": "Changes apply to component code. This is the default." }, "instanceClasses": { "title": "Instance Classes", "tooltip": "Changes apply to instance code." } } } } }, "layers": { "name": "Layers", "tabs": { "layers": "Layers", "pages": "Pages", "components": "Elements", "images": "Images", "windows": { "name": "Windows", "emptyState": "Select a window to edit its settings" }, "brand": "Brand", "branches": "Branches", "apps": "Apps" } } }, "settings": { "preferences": { "language": "Language", "theme": "Theme", "deleteWarning": "Delete Warning", "analytics": "Analytics", "editor": { "ide": "Editor", "shouldWarnDelete": "Warn when deleting elements", "enableAnalytics": "Enable analytics" }, "shortcuts": "Shortcuts" } }, "frame": { "startDesigning": { "prefix": "Press ", "action": "Play", "suffix": " to start designing your App" }, "playButton": "Play", "waitingForApp": "Waiting for the App to start..." }, "runButton": { "portInUse": "Port in Use", "loading": "Loading", "play": "Play", "retry": "Retry", "stop": "Stop" }, "zoom": { "level": "Zoom Level", "in": "Zoom In", "out": "Zoom Out", "fit": "Zoom Fit", "reset": "Zoom 100%", "double": "Zoom 200%" } }, "help": { "menu": { "reloadOnlook": "Reload Onlook", "theme": { "title": "Theme", "light": "Light", "dark": "Dark", "system": "System" }, "language": "Language", "openSettings": "Open Settings", "contactUs": { "title": "Contact Us", "website": "Website", "discord": "Discord", "github": "GitHub", "email": "Email" }, "reportIssue": "Report Issue", "shortcuts": "Shortcuts" } } } ================================================ FILE: apps/web/client/messages/es.json ================================================ { "projects": { "create": { "settings": { "title": "Configuración", "tooltip": "Configurar ajustes del nuevo proyecto" }, "success": "Proyecto creado exitosamente.", "steps": { "count": "{current} de {total}", "error": "Faltan datos del proyecto." }, "methods": { "new": "Crear Nuevo Proyecto", "load": "Cargar Proyecto Existente" }, "loading": { "title": "Configurando su nueva aplicación Onlook...", "description": "Esto puede tomar unos segundos", "cancel": "Cancelar" }, "error": { "title": "Error al crear su aplicación Onlook", "backToPrompt": "Volver al Prompt" } }, "select": { "empty": "No se encontraron proyectos", "sort": { "recent": "Recientemente Actualizado", "name": "Nombre del Proyecto" }, "lastEdited": "Última edición hace {time}" }, "actions": { "import": "Importar", "close": "Cerrar", "about": "Acerca de Onlook", "signOut": "Cerrar sesión", "editApp": "Editar Aplicación", "projectSettings": "Configuración del proyecto", "showInExplorer": "Mostrar en Explorador", "renameProject": "Renombrar Proyecto", "deleteProject": "Eliminar Proyecto", "cloneProject": "Clonar Proyecto", "cancel": "Cancelar", "delete": "Eliminar", "rename": "Renombrar", "clone": "Clonar", "goToAllProjects": "Ir a todos los Proyectos", "newProject": "Nuevo Proyecto", "blankProject": "Proyecto en Blanco", "startFromScratch": "Empezar desde cero", "importProject": "Importar un proyecto", "subscriptions": "Suscripciones", "settings": "Configuración", "downloadCode": "Descargar Código", "downloadingCode": "Preparando descarga...", "downloadSuccess": "Descarga iniciada correctamente", "downloadError": "Error al preparar la descarga", "recentProjects": "Proyectos Recientes" }, "dialogs": { "delete": { "title": "¿Está seguro de que desea eliminar este proyecto?", "description": "Esta acción no se puede deshacer. Esto eliminará permanentemente su proyecto y todos los datos asociados.", "moveToTrash": "También mover carpeta a la papelera" }, "rename": { "title": "Renombrar Proyecto", "label": "Nombre del Proyecto", "error": "El nombre del proyecto no puede estar vacío" }, "clone": { "title": "Clonar Proyecto", "label": "Nombre del Proyecto", "placeholder": "Ingrese el nombre para el proyecto clonado", "error": "El nombre del proyecto no puede estar vacío" } }, "prompt": { "title": "¿Qué tipo de sitio web desea crear?", "description": "Cuéntenos un poco sobre su proyecto. Sea lo más detallado posible.", "input": { "placeholder": "Pegue una captura de pantalla de referencia, escriba una novela, sea creativo...", "imageUpload": "Subir Imagen de Referencia", "fileReference": "Referencia de Archivo", "submit": "Comenzar a construir su sitio" }, "blankStart": "Empezar desde una página en blanco" } }, "welcome": { "title": "Bienvenido a Onlook", "titleReturn": "Bienvenido de vuelta a Onlook", "description": "Un editor visual de código de última generación que permite a diseñadores y gerentes de productos crear experiencias web con IA.", "alpha": "Alpha", "login": { "github": "Iniciar sesión con GitHub", "google": "Iniciar sesión con Google", "lastUsed": "Usó esto la última vez", "loginToEdit": "Iniciar sesión para Editar", "shareProjects": "Sin tarjeta de crédito • Crea un sitio en segundos" }, "terms": { "agreement": "Al registrarse, acepta nuestra", "privacy": "Política de Privacidad", "and": "y", "tos": "Términos de Servicio" }, "version": "Versión {version}" }, "pricing": { "plans": { "basic": { "name": "Onlook Básico", "price": "$0/mes", "description": "Prototipe y experimente en código con facilidad.", "features": [ "Acceso al editor visual de código", "Proyectos ilimitados", "{dailyMessages} mensajes de chat IA por día", "{monthlyMessages} mensajes IA por mes", "Limitado a 1 captura de pantalla por chat" ] }, "pro": { "name": "Onlook Pro", "price": "$20/mes", "description": "Creatividad sin restricciones. Construya sitios impresionantes con IA.", "features": [ "Acceso al editor visual de código", "Proyectos ilimitados", "Mensajes de chat IA ilimitados por día", "Chats mensuales ilimitados", "Remover marca de agua 'construido con Onlook'", "1 dominio personalizado gratuito alojado con Onlook", "Soporte prioritario" ] }, "launch": { "name": "Launch", "price": "$50/mes", "description": "Perfecto para startups y equipos en crecimiento", "features": [ "Mensajes diarios ilimitados", "Soporte prioritario", "Integraciones avanzadas", "Funciones de colaboración en equipo" ] }, "scale": { "name": "Scale", "price": "$100/mes", "description": "Funciones de nivel empresarial para equipos grandes", "features": [ "Todo en el plan Launch", "Gerente de cuenta dedicado", "Integraciones personalizadas", "Analíticas avanzadas", "Soporte premium 24/7" ] } }, "titles": { "choosePlan": "Elija su plan", "proMember": "¡Gracias por ser miembro Pro!" }, "buttons": { "currentPlan": "Plan Actual", "getPro": "Obtener Pro", "manageSubscription": "Gestionar Suscripción" }, "loading": { "checkingPayment": "Verificando pago..." }, "toasts": { "checkingOut": { "title": "Procesando pago", "description": "Ahora será redirigido a Stripe para completar el pago." }, "redirectingToStripe": { "title": "Redirigiendo a Stripe", "description": "Ahora será redirigido a Stripe para gestionar su suscripción." }, "error": { "title": "Error", "description": "No se pudo iniciar el proceso de pago. Por favor, inténtelo de nuevo." } }, "footer": { "unusedMessages": "Los mensajes de chat no utilizados se transferirán al siguiente mes" } }, "editor": { "modes": { "design": { "name": "Diseño", "description": "Edite y modifique el diseño de su sitio web", "tooltip": "Cambiar al modo diseño" }, "code": { "name": "Código", "description": "Edite y modifique el código de su sitio web", "tooltip": "Cambiar al modo código" }, "preview": { "name": "Vista Previa", "description": "Previsualice y pruebe la funcionalidad de su sitio web", "tooltip": "Cambiar al modo Vista Previa" } }, "toolbar": { "tools": { "select": { "name": "Seleccionar", "tooltip": "Seleccionar y modificar elementos" }, "pan": { "name": "Desplazar", "tooltip": "Desplazar y moverse por el lienzo" }, "insertDiv": { "name": "Insertar Contenedor", "tooltip": "Agregar un nuevo elemento contenedor" }, "insertText": { "name": "Insertar Texto", "tooltip": "Agregar un nuevo elemento de texto" } }, "versionHistory": "Historial de Versiones" }, "panels": { "edit": { "tabs": { "chat": { "name": "Chat", "emptyState": "Seleccione un elemento para chatear con IA", "emptyStateStart": "Inicie el proyecto para chatear", "input": { "placeholder": "Escriba su mensaje...", "tooltip": "Chatee con IA sobre el elemento seleccionado" }, "mode": { "tooltip": "Cambiar entre modos Construir y Preguntar" }, "controls": { "newChat": "Nuevo Chat", "history": "Historial de Chat" }, "settings": { "showSuggestions": "Mostrar sugerencias", "showMiniChat": "Mostrar mini chat", "autoApplyCode": "Aplicar resultados automáticamente", "expandCodeBlocks": "Mostrar código durante la renderización" }, "miniChat": { "button": "Chatear con IA" }, "openInCode": { "button": "Abrir en Code" } }, "styles": { "name": "Estilos", "emptyState": "Seleccione un elemento para editar sus propiedades de estilo", "groups": { "position": "Posición y Dimensiones", "layout": "Flexbox y Diseño", "style": "Estilos", "text": "Texto" }, "tailwind": { "title": "Clases Tailwind", "placeholder": "Agregar clases tailwind aquí", "componentClasses": { "title": "Clases del Componente Principal", "tooltip": "Los cambios se aplican al código del componente. Este es el predeterminado." }, "instanceClasses": { "title": "Clases de Instancia", "tooltip": "Los cambios se aplican al código de instancia." } } } } }, "layers": { "name": "Capas", "tabs": { "layers": "Capas", "pages": "Páginas", "components": "Elementos", "images": "Imágenes", "windows": { "name": "Ventanas", "emptyState": "Seleccione una ventana para editar su configuración" }, "brand": "Marca", "branches": "Ramas", "apps": "Aplicaciones" } } }, "settings": { "preferences": { "language": "Idioma", "theme": "Tema", "deleteWarning": "Advertencia de Eliminación", "analytics": "Análisis", "editor": { "ide": "Editor", "shouldWarnDelete": "Advertir al eliminar elementos", "enableAnalytics": "Habilitar análisis" }, "shortcuts": "Atajos" } }, "frame": { "startDesigning": { "prefix": "Presione ", "action": "Reproducir", "suffix": " para comenzar a diseñar su Aplicación" }, "playButton": "Reproducir", "waitingForApp": "Esperando que la Aplicación inicie..." }, "runButton": { "portInUse": "Puerto en Uso", "loading": "Cargando", "play": "Reproducir", "retry": "Reintentar", "stop": "Detener" }, "zoom": { "level": "Nivel de Zoom", "in": "Acercar", "out": "Alejar", "fit": "Ajustar Zoom", "reset": "Zoom 100%", "double": "Zoom 200%" } }, "help": { "menu": { "reloadOnlook": "Recargar Onlook", "theme": { "title": "Tema", "light": "Claro", "dark": "Oscuro", "system": "Sistema" }, "language": "Idioma", "openSettings": "Abrir Configuración", "contactUs": { "title": "Contáctenos", "website": "Sitio Web", "discord": "Discord", "github": "GitHub", "email": "Correo Electrónico" }, "reportIssue": "Reportar Problema", "shortcuts": "Atajos" } } } ================================================ FILE: apps/web/client/messages/ja.json ================================================ { "pricing": { "plans": { "basic": { "name": "Basic", "price": "$0/月", "description": "コードで簡単にプロトタイピングと実験を。", "features": [ "ビジュアルコードエディタのアクセス", "無制限のプロジェクト", "1日{{dailyMessages}}回のAIチャットメッセージ", "月間{{monthlyMessages}}回のAIメッセージ", "1つのチャットにつき1枚のスクリーンショット制限" ] }, "pro": { "name": "Pro", "price": "$20/月", "description": "創造性を解き放とう。AIで美しいサイトを構築。", "features": [ "ビジュアルコードエディタのアクセス", "無制限のプロジェクト", "無制限のAIチャットメッセージ(1日あたり)", "無制限の月間チャット", "ビルド時にOnlookの透かしを削除", "Onlookでホスティングされた1つの無料カスタムドメイン", "優先サポート" ] }, "launch": { "name": "Launch", "price": "$50/月", "description": "スタートアップや成長中のチームに最適", "features": [ "無制限の毎日のメッセージ", "優先サポート", "高度な統合", "チームコラボレーション機能" ] }, "scale": { "name": "Scale", "price": "$100/月", "description": "大規模チーム向けのエンタープライズ機能", "features": [ "Launchプランのすべて", "専任のアカウントマネージャー", "カスタム統合", "高度な分析", "24/7プレミアムサポート" ] } }, "titles": { "choosePlan": "プランを選択", "proMember": "Proメンバーをご利用いただきありがとうございます!" }, "buttons": { "currentPlan": "現在のプラン", "getPro": "Proを取得", "manageSubscription": "サブスクリプションを管理" }, "loading": { "checkingPayment": "支払いを確認中..." }, "toasts": { "checkingOut": { "title": "チェックアウト中", "description": "支払いを完了するためStripeにリダイレクトされます。" }, "redirectingToStripe": { "title": "Stripeにリダイレクト中", "description": "サブスクリプションを管理するためStripeにリダイレクトされます。" }, "error": { "title": "エラー", "description": "チェックアウトプロセスを開始できませんでした。もう一度お試しください。" } }, "footer": { "unusedMessages": "未使用のチャットメッセージは翌月に繰り越されます。" } }, "editor": { "modes": { "design": { "name": "デザイン", "description": "ウェブサイトのデザインを編集・変更します", "tooltip": "デザインモードに切り替え" }, "code": { "name": "コード", "description": "ウェブサイトのコードを編集・変更します", "tooltip": "コードモードに切り替え" }, "preview": { "name": "プレビュー", "description": "ウェブサイトの機能をプレビュー&テストします", "tooltip": "プレビューモードに切り替え" } }, "toolbar": { "tools": { "select": { "name": "選択", "tooltip": "要素を選択して変更" }, "pan": { "name": "画面移動", "tooltip": "キャンバスをパンして移動" }, "insertDiv": { "name": "コンテナ挿入", "tooltip": "新しいコンテナ要素を追加" }, "insertText": { "name": "テキスト挿入", "tooltip": "新しいテキスト要素を追加" } }, "versionHistory": "バージョン履歴" }, "panels": { "edit": { "tabs": { "chat": { "name": "チャット", "emptyState": "AIとやり取りする要素を選択してください", "emptyStateStart": "チャットを始めるにはプロジェクトを開始してください", "input": { "placeholder": "メッセージを入力...", "tooltip": "選択した要素についてAIとチャット" }, "mode": { "tooltip": "ビルドモードと質問モードを切り替え" }, "controls": { "newChat": "新規チャット", "history": "チャット履歴" }, "settings": { "showSuggestions": "提案を表示", "showMiniChat": "ミニチャットを表示", "autoApplyCode": "結果を自動適用", "expandCodeBlocks": "レンダリング時にコードを表示" }, "miniChat": { "button": "AIとチャット" }, "openInCode": { "button": "コードで開く" } }, "styles": { "name": "スタイル", "emptyState": "スタイルを編集する要素を選択してください", "groups": { "position": "位置 & 寸法", "layout": "フレックスボックス & レイアウト", "style": "スタイル", "text": "テキスト" }, "tailwind": { "title": "Tailwindクラス", "placeholder": "ここにTailwindクラスを追加", "componentClasses": { "title": "メインコンポーネントクラス", "tooltip": "変更はコンポーネントのコードに適用されます。これがデフォルトです。" }, "instanceClasses": { "title": "インスタンスクラス", "tooltip": "変更はインスタンスのコードに適用されます。" } } } } }, "layers": { "name": "レイヤー", "tabs": { "layers": "レイヤー", "pages": "ページ", "components": "コンポーネント", "images": "画像", "windows": { "name": "ウィンドウ", "emptyState": "編集するウィンドウを選択してください" }, "brand": "ブランド", "branches": "ブランチ", "apps": "アプリ" } } }, "settings": { "preferences": { "language": "言語", "theme": "テーマ", "deleteWarning": "削除警告", "analytics": "アナリティクス", "editor": { "ide": "エディタ", "shouldWarnDelete": "要素を削除する時に警告する", "enableAnalytics": "アナリティクスを有効にする" }, "shortcuts": "ショートカット" } }, "frame": { "startDesigning": { "prefix": "ボタン", "action": "起動", "suffix": "を押してアプリのデザインを開始" }, "playButton": "起動", "waitingForApp": "アプリの起動を待っています..." }, "zoom": { "level": "ズームレベル", "in": "拡大", "out": "縮小", "fit": "全体表示", "reset": "100%表示", "double": "200%表示" }, "runButton": { "portInUse": "ポートが使用中", "loading": "読み込み中", "play": "起動", "retry": "再試行", "stop": "停止" } }, "projects": { "create": { "settings": { "title": "設定", "tooltip": "新しいプロジェクトの設定を構成" }, "success": "プロジェクトが正常に作成されました。", "steps": { "count": "{{total}}のうち{{current}}", "error": "プロジェクトデータが不足しています。" }, "methods": { "new": "新規プロジェクトを作成", "load": "既存のプロジェクトを読み込む" }, "loading": { "title": "新しいOnlookアプリをセットアップしています...", "description": "数秒かかる場合があります", "cancel": "キャンセル" }, "error": { "title": "Onlookアプリの作成中にエラーが発生しました", "backToPrompt": "プロンプトに戻る" } }, "select": { "empty": "プロジェクトがありません", "sort": { "recent": "最新更新順", "name": "プロジェクト名" }, "lastEdited": "{{time}}前に最後に編集" }, "actions": { "import": "インポート", "close": "閉じる", "about": "Onlookについて", "signOut": "サインアウト", "editApp": "アプリを編集", "projectSettings": "プロジェクト設定", "showInExplorer": "エクスプローラーで表示", "renameProject": "プロジェクトの名前変更", "deleteProject": "プロジェクトを削除", "cloneProject": "プロジェクトをクローン", "cancel": "キャンセル", "delete": "削除", "rename": "名前変更", "clone": "クローン", "goToAllProjects": "すべてのプロジェクトへ", "newProject": "新規プロジェクト", "blankProject": "空白プロジェクト", "startFromScratch": "新規作成", "importProject": "プロジェクトをインポート", "subscriptions": "サブスクリプション", "settings": "設定", "downloadCode": "コードをダウンロード", "downloadingCode": "ダウンロードを準備中...", "downloadSuccess": "ダウンロードが正常に開始されました", "downloadError": "ダウンロードの準備に失敗しました", "recentProjects": "最近のプロジェクト" }, "dialogs": { "delete": { "title": "このプロジェクトを本当に削除しますか?", "description": "この操作は取り消せません。プロジェクトを完全に削除し、関連データをすべて削除します。", "moveToTrash": "フォルダもゴミ箱に移動" }, "rename": { "title": "プロジェクトの名前変更", "label": "プロジェクト名", "error": "プロジェクト名は空にできません" }, "clone": { "title": "プロジェクトをクローン", "label": "プロジェクト名", "placeholder": "クローンプロジェクトの名前を入力", "error": "プロジェクト名は空にできません" } }, "prompt": { "title": "どんなウェブサイトを作りたいですか?", "description": "プロジェクトについて教えてください。できるだけ詳しく説明してください。", "input": { "placeholder": "参考スクリーンショットを貼り付けたり、アイデアを書いたり、自由に表現してください...", "imageUpload": "画像参照をアップロード", "fileReference": "ファイル参照", "submit": "サイトの構築を開始" }, "blankStart": "空白のページから始める" } }, "welcome": { "title": "Onlookへようこそ", "titleReturn": "Onlookにお帰りなさい", "description": "AIを活用した次世代のビジュアルコードエディタで、デザイナーとプロダクトマネージャーがコードでウェブ体験を作成できます。", "alpha": "アルファ版", "login": { "github": "GitHubでログイン", "google": "Googleでログイン", "lastUsed": "最後に使用したアカウント", "loginToEdit": "編集するにはログインしてください", "shareProjects": "クレジットカード不要 • サイトを秒で作成" }, "terms": { "agreement": "サインアップすることで、以下に同意したとみなされます", "privacy": "プライバシーポリシー", "and": "および", "tos": "利用規約" }, "version": "バージョン{{version}}" }, "help": { "menu": { "reloadOnlook": "Onlookを再読み込み", "theme": { "title": "テーマ", "light": "ライト", "dark": "ダーク", "system": "システム" }, "language": "言語", "openSettings": "設定を開く", "contactUs": { "title": "お問い合わせ", "website": "ウェブサイト", "discord": "Discord", "github": "GitHub", "email": "メール" }, "reportIssue": "問題を報告", "shortcuts": "ショートカット" } } } ================================================ FILE: apps/web/client/messages/ko.json ================================================ { "projects": { "create": { "settings": { "title": "설정", "tooltip": "새 프로젝트 설정 구성" }, "success": "프로젝트가 성공적으로 생성되었습니다.", "steps": { "count": "{{current}} / {{total}}", "error": "프로젝트 데이터가 없습니다." }, "methods": { "new": "새 프로젝트 생성", "load": "기존 프로젝트 불러오기" }, "loading": { "title": "새 Onlook 앱 설정 중입니다...", "description": "몇 초 정도 걸릴 수 있습니다.", "cancel": "취소" }, "error": { "title": "Onlook 앱 생성 중 오류가 발생했습니다.", "backToPrompt": "프롬프트로 돌아가기" } }, "select": { "empty": "프로젝트를 찾을 수 없습니다.", "sort": { "recent": "최근 업데이트 순", "name": "프로젝트 이름 순" }, "lastEdited": "{{time}} 전에 마지막으로 수정됨" }, "actions": { "import": "가져오기", "close": "닫기", "about": "Onlook 소개", "signOut": "로그아웃", "editApp": "앱 편집하기", "projectSettings": "프로젝트 설정", "showInExplorer": "탐색기에서 보기", "renameProject": "프로젝트 이름 변경", "deleteProject": "프로젝트 삭제", "cloneProject": "프로젝트 복제", "cancel": "취소", "delete": "삭제", "rename": "이름 변경", "clone": "복제", "goToAllProjects": "모든 프로젝트로 이동", "newProject": "새 프로젝트", "blankProject": "빈 프로젝트", "startFromScratch": "처음부터 시작하기", "importProject": "프로젝트 가져오기", "subscriptions": "구독하기", "settings": "설정", "downloadCode": "코드 다운로드", "downloadingCode": "다운로드 준비 중...", "downloadSuccess": "다운로드가 성공적으로 시작되었습니다.", "downloadError": "다운로드 준비에 실패했습니다.", "recentProjects": "최근 프로젝트" }, "dialogs": { "delete": { "title": "이 프로젝트를 삭제하시겠습니까?", "description": "이 작업은 되돌릴 수 없습니다. 프로젝트와 모든 관련 데이터가 영구적으로 삭제됩니다.", "moveToTrash": "폴더도 휴지통으로 이동" }, "rename": { "title": "프로젝트 이름 변경", "label": "프로젝트 이름", "error": "프로젝트 이름은 비워둘 수 없습니다." }, "clone": { "title": "프로젝트 복제", "label": "프로젝트 이름", "placeholder": "복제된 프로젝트의 이름을 입력하세요", "error": "프로젝트 이름은 비워둘 수 없습니다." } }, "prompt": { "title": "어떤 종류의 웹사이트를 만들고 싶으신가요?", "description": "프로젝트에 대해 알려주세요. 최대한 자세하게 설명해주세요.", "input": { "placeholder": "참고로 스크린샷을 붙여넣거나, 자세히 작성하거나, 창의적으로 표현해보세요...", "imageUpload": "이미지 참조 업로드", "fileReference": "파일 참조", "submit": "사이트 구축 시작하기" }, "blankStart": "빈 페이지로 시작하기" } }, "welcome": { "title": "Onlook에 오신 것을 환영합니다", "titleReturn": "Onlook에 다시 오신 것을 환영합니다", "description": "AI를 활용한 차세대 비주얼 코드 에디터로, 디자이너와 제품 관리자가 코드로 웹 경험을 만들 수 있습니다.", "alpha": "알파", "login": { "github": "GitHub으로 로그인", "google": "Google로 로그인", "lastUsed": "마지막으로 로그인한 계정", "loginToEdit": "편집하려면 로그인하세요", "shareProjects": "크레딧 카드 없이 • 초 단위로 사이트 만들기" }, "terms": { "agreement": "가입함으로써 다음에 동의합니다:", "privacy": "개인정보 처리방침", "and": "및", "tos": "서비스 이용약관" }, "version": "버전 {{version}}" }, "pricing": { "plans": { "basic": { "name": "Onlook 베이직", "price": "$0/월", "description": "코드로 쉽게 프로토타입을 만들고 실험해보세요.", "features": [ "비주얼 코드 에디터 사용", "무제한 프로젝트", "매일 {{dailyMessages}}개의 AI 채팅 메시지", "월 {{monthlyMessages}}개의 AI 메시지", "채팅당 스크린샷 1개로 제한" ] }, "pro": { "name": "Onlook 프로", "price": "$20/월", "description": "창의성의 한계를 넘어서다. AI로 멋진 사이트를 만들어보세요.", "features": [ "비주얼 코드 에디터 사용", "무제한 프로젝트", "매일 무제한 AI 채팅 메시지", "월 무제한 채팅", "Onlook 워터마크 제거", "Onlook에서 호스팅되는 1개의 무료 사용자 지정 도메인", "우선 지원 서비스" ] }, "launch": { "name": "Launch", "price": "$50/월", "description": "스타트업과 성장 중인 팀에 적합", "features": [ "무제한 일일 메시지", "우선 지원", "고급 통합", "팀 협업 기능" ] }, "scale": { "name": "Scale", "price": "$100/월", "description": "대규모 팀을 위한 엔터프라이즈급 기능", "features": [ "Launch 플랜의 모든 기능", "전담 계정 관리자", "맞춤형 통합", "고급 분석", "24/7 프리미엄 지원" ] } }, "titles": { "choosePlan": "요금제 선택", "proMember": "프로 멤버가 되어주셔서 감사합니다!" }, "buttons": { "currentPlan": "현재 사용중인 요금제", "getPro": "프로 구독하기", "manageSubscription": "구독 관리" }, "loading": { "checkingPayment": "결제 확인 중..." }, "toasts": { "checkingOut": { "title": "결제 진행 중", "description": "결제를 완료하기 위해 Stripe로 이동합니다." }, "redirectingToStripe": { "title": "Stripe로 이동 중", "description": "구독을 관리하기 위해 Stripe로 이동합니다." }, "error": { "title": "오류", "description": "결제 프로세스를 시작할 수 없습니다. 다시 시도해 주세요." } }, "footer": { "unusedMessages": "사용하지 않은 채팅 메시지는 다음 달로 이월됩니다." } }, "editor": { "modes": { "design": { "name": "디자인", "description": "웹사이트 디자인 편집 및 수정", "tooltip": "디자인 모드로 변경" }, "code": { "name": "코드", "description": "웹사이트 코드 편집 및 수정", "tooltip": "코드 모드로 변경" }, "preview": { "name": "미리보기", "description": "웹사이트 기능 미리보기 및 테스트", "tooltip": "미리보기 모드로 변경" } }, "toolbar": { "tools": { "select": { "name": "선택", "tooltip": "요소 선택 및 수정" }, "pan": { "name": "이동", "tooltip": "캔버스 이동 및 주변 탐색" }, "insertDiv": { "name": "컨테이너 추가", "tooltip": "새 컨테이너 요소 추가" }, "insertText": { "name": "텍스트 추가", "tooltip": "새 텍스트 요소 추가" } }, "versionHistory": "버전 기록" }, "panels": { "edit": { "tabs": { "chat": { "name": "채팅", "emptyState": "AI와 채팅할 요소를 선택하세요", "emptyStateStart": "채팅을 시작하려면 프로젝트를 시작하세요", "input": { "placeholder": "메시지를 입력하세요...", "tooltip": "선택한 요소에 대해 AI와 채팅" }, "mode": { "tooltip": "빌드 모드와 질문 모드 전환" }, "controls": { "newChat": "새 채팅", "history": "채팅 기록" }, "settings": { "showSuggestions": "제안 표시", "showMiniChat": "미니 채팅 표시", "autoApplyCode": "결과 자동 적용", "expandCodeBlocks": "렌더링 시 코드 표시" }, "miniChat": { "button": "AI와 채팅하기" }, "openInCode": { "button": "코드에서 열기" } }, "styles": { "name": "스타일", "emptyState": "스타일 속성을 편집할 요소를 선택하세요", "groups": { "position": "위치 및 크기", "layout": "Flexbox & 레이아웃", "style": "스타일", "text": "텍스트" }, "tailwind": { "title": "Tailwind 클래스", "placeholder": "여기에 Tailwind 클래스를 추가하세요.", "componentClasses": { "title": "메인 컴포넌트 클래스", "tooltip": "기본값으로 변경 사항이 컴포넌트 코드에 적용됩니다." }, "instanceClasses": { "title": "인스턴스 클래스", "tooltip": "변경 사항이 인스턴스 코드에 적용됩니다." } } } } }, "layers": { "name": "레이어", "tabs": { "layers": "레이어", "pages": "페이지", "components": "컴포넌트", "images": "이미지", "windows": { "name": "윈도우", "emptyState": "설정을 편집할 창(윈도우)을 선택하세요" }, "brand": "브랜드", "branches": "브랜치", "apps": "앱" } } }, "settings": { "preferences": { "language": "언어", "theme": "테마", "deleteWarning": "삭제 경고", "analytics": "분석", "editor": { "ide": "편집기", "shouldWarnDelete": "요소 삭제 시 경고", "enableAnalytics": "분석 사용" }, "shortcuts": "단축키" } }, "frame": { "startDesigning": { "prefix": "", "action": "실행", "suffix": "버튼을 눌러 앱 디자인을 시작하세요" }, "playButton": "실행", "waitingForApp": "앱 시작을 기다리는 중..." }, "runButton": { "portInUse": "포트 사용 중", "loading": "로딩 중", "play": "시작", "retry": "재시도", "stop": "중지" }, "zoom": { "level": "확대/축소", "in": "확대", "out": "축소", "fit": "화면에 맞춤", "reset": "100% 보기", "double": "200% 확대" } }, "help": { "menu": { "reloadOnlook": "Onlook 새로고침", "theme": { "title": "테마", "light": "라이트", "dark": "다크", "system": "시스템" }, "language": "언어", "openSettings": "설정 열기", "contactUs": { "title": "문의하기", "website": "웹사이트", "discord": "Discord", "github": "GitHub", "email": "이메일" }, "reportIssue": "오류 신고하기", "shortcuts": "단축키" } } } ================================================ FILE: apps/web/client/messages/zh.json ================================================ { "projects": { "create": { "settings": { "title": "设置", "tooltip": "配置新项目设置" }, "success": "项目创建成功。", "steps": { "count": "第 {{current}} 步,共 {{total}} 步", "error": "缺少项目数据。" }, "methods": { "new": "创建新项目", "load": "加载现有项目" }, "loading": { "title": "正在设置您的新 Onlook 应用...", "description": "这可能需要几秒钟", "cancel": "取消" }, "error": { "title": "创建 Onlook 应用时出错", "backToPrompt": "返回提示" } }, "select": { "empty": "未找到项目", "sort": { "recent": "最近更新", "name": "项目名称" }, "lastEdited": "上次编辑于 {{time}} 之前" }, "actions": { "import": "导入", "close": "关闭", "about": "关于 Onlook", "signOut": "退出登录", "editApp": "编辑应用", "projectSettings": "项目设置", "showInExplorer": "在资源管理器中显示", "renameProject": "重命名项目", "deleteProject": "删除项目", "cloneProject": "克隆项目", "cancel": "取消", "delete": "删除", "rename": "重命名", "clone": "克隆", "goToAllProjects": "查看所有项目", "newProject": "新建项目", "blankProject": "空白项目", "startFromScratch": "从零开始", "importProject": "导入项目", "subscriptions": "订阅", "settings": "设置", "downloadCode": "下载代码", "downloadingCode": "准备下载...", "downloadSuccess": "下载成功", "downloadError": "下载失败", "recentProjects": "最近项目" }, "dialogs": { "delete": { "title": "确定要删除此项目吗?", "description": "此操作无法撤销。这将永久删除您的项目并移除所有相关数据。", "moveToTrash": "同时将文件夹移至回收站" }, "rename": { "title": "重命名项目", "label": "项目名称", "error": "项目名称不能为空" }, "clone": { "title": "克隆项目", "label": "项目名称", "placeholder": "为克隆项目输入名称", "error": "项目名称不能为空" } }, "prompt": { "title": "想要制作什么样的网站?", "description": "请告诉我们一些关于您的项目的信息,越详细越好。", "input": { "placeholder": "粘贴参考截图、写一篇长文、发挥创造力……", "imageUpload": "上传图像参考", "fileReference": "文件参考", "submit": "开始构建您的网站" }, "blankStart": "从空白页面开始" } }, "welcome": { "title": "欢迎使用 Onlook", "titleReturn": "欢迎回到 Onlook", "description": "一个下一代的视觉代码编辑器,让设计师和产品经理用 AI 在代码中创造网页体验。", "alpha": "Alpha", "login": { "github": "使用 GitHub 登录", "google": "使用 Google 登录", "lastUsed": "上次使用了此方式", "loginToEdit": "登入後即可編輯", "shareProjects": "无需信用卡 • 秒建网站" }, "terms": { "agreement": "注册即表示您同意我们的", "privacy": "隐私政策", "and": "和", "tos": "服务条款" }, "version": "版本 {{version}}" }, "pricing": { "plans": { "basic": { "name": "Basic", "price": "$0/月", "description": "轻松在代码中进行原型设计和实验。", "features": [ "可视化代码编辑器访问", "无限制项目", "每天 {{dailyMessages}} 条 AI 聊天消息", "每月 {{monthlyMessages}} 条 AI 消息", "每次聊天限 1 张截图" ] }, "pro": { "name": "Pro", "price": "$20/月", "description": "释放创意,不受限制。使用 AI 构建惊艳网站。", "features": [ "可视化代码编辑器访问", "无限制项目", "每日无限制 AI 聊天消息", "每月无限制聊天", "移除 Onlook 水印", "1 个免费使用 Onlook 托管的自定义域名", "优先支持" ] }, "launch": { "name": "Launch", "price": "$50/月", "description": "适用于初创公司和成长型团队", "features": [ "无限制的每日消息", "优先支持", "高级集成", "团队协作功能" ] }, "scale": { "name": "Scale", "price": "$100/月", "description": "面向大型团队的企业级功能", "features": [ "包含 Launch 计划的所有内容", "专属客户经理", "自定义集成", "高级分析", "24/7 高级支持" ] } }, "titles": { "choosePlan": "选择方案", "proMember": "感谢您成为 Pro 会员!" }, "buttons": { "currentPlan": "当前方案", "getPro": "升级到 Pro", "manageSubscription": "管理订阅" }, "loading": { "checkingPayment": "正在检查付款..." }, "toasts": { "checkingOut": { "title": "正在结账", "description": "您将被重定向至 Stripe 完成付款。" }, "redirectingToStripe": { "title": "正在重定向至 Stripe", "description": "您将被重定向至 Stripe 管理您的订阅。" }, "error": { "title": "错误", "description": "无法启动结账流程,请重试。" } }, "footer": { "unusedMessages": "未使用的聊天消息会结转到下个月" } }, "editor": { "modes": { "design": { "name": "设计", "description": "编辑并修改网站的设计", "tooltip": "切换到设计模式" }, "code": { "name": "代码", "description": "编辑并修改网站的代码", "tooltip": "切换到代码模式" }, "preview": { "name": "预览", "description": "预览并测试网站功能", "tooltip": "切换到预览模式" } }, "toolbar": { "tools": { "select": { "name": "选择", "tooltip": "选择并修改元素" }, "pan": { "name": "平移", "tooltip": "在画布上平移并移动" }, "insertDiv": { "name": "插入容器", "tooltip": "添加新容器元素" }, "insertText": { "name": "插入文本", "tooltip": "添加新文本元素" } }, "versionHistory": "版本历史" }, "panels": { "edit": { "tabs": { "chat": { "name": "聊天", "emptyState": "选择一个元素与 AI 聊天", "emptyStateStart": "启动项目以便开始聊天", "input": { "placeholder": "输入您的消息…", "tooltip": "就所选元素与 AI 进行讨论" }, "mode": { "tooltip": "在构建和询问模式之间切换" }, "controls": { "newChat": "新聊天", "history": "聊天记录" }, "settings": { "showSuggestions": "显示建议", "showMiniChat": "显示迷你聊天", "autoApplyCode": "自动应用结果", "expandCodeBlocks": "渲染时显示代码" }, "miniChat": { "button": "与 AI 聊天" }, "openInCode": { "button": "在代码中打开" } }, "styles": { "name": "样式", "emptyState": "选择一个元素以编辑其样式属性", "groups": { "position": "位置 & 尺寸", "layout": "弹性布局", "style": "样式", "text": "文本" }, "tailwind": { "title": "Tailwind 类", "placeholder": "在此添加 Tailwind 类", "componentClasses": { "title": "主组件类", "tooltip": "更改会应用于组件代码(默认)。" }, "instanceClasses": { "title": "实例类", "tooltip": "更改会应用于实例代码。" } } } } }, "layers": { "name": "图层", "tabs": { "layers": "图层", "pages": "页面", "components": "组件", "images": "图像", "windows": { "name": "窗口", "emptyState": "选择一个窗口以编辑其设置" }, "brand": "品牌", "branches": "分支", "apps": "应用" } } }, "settings": { "preferences": { "language": "语言", "theme": "主题", "deleteWarning": "删除警告", "analytics": "分析", "editor": { "ide": "编辑器", "shouldWarnDelete": "删除元素时警告", "enableAnalytics": "启用分析" }, "shortcuts": "快捷键" } }, "frame": { "startDesigning": { "prefix": "按", "action": "播放", "suffix": "开始设计您的应用" }, "playButton": "播放", "waitingForApp": "正在等待应用启动..." }, "zoom": { "level": "缩放级别", "in": "放大", "out": "缩小", "fit": "适应屏幕", "reset": "100% 缩放", "double": "200% 缩放" }, "runButton": { "portInUse": "端口占用", "loading": "加载中", "play": "播放", "retry": "重试", "stop": "停止" } }, "help": { "menu": { "reloadOnlook": "重新加载 Onlook", "theme": { "title": "主题", "light": "浅色", "dark": "深色", "system": "系统" }, "language": "语言", "openSettings": "打开设置", "contactUs": { "title": "联系我们", "website": "网站", "discord": "Discord", "github": "GitHub", "email": "邮箱" }, "reportIssue": "报告问题", "shortcuts": "快捷键" } } } ================================================ FILE: apps/web/client/next.config.ts ================================================ /** * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful * for Docker builds. */ import { NextConfig } from 'next'; import createNextIntlPlugin from 'next-intl/plugin'; import path from 'node:path'; import './src/env'; const nextConfig: NextConfig = { devIndicators: false, ...(process.env.STANDALONE_BUILD === 'true' && { output: 'standalone' }), eslint: { // Don't run ESLint during builds - handle it separately in CI ignoreDuringBuilds: true, }, }; if (process.env.NODE_ENV === 'development') { nextConfig.outputFileTracingRoot = path.join(__dirname, '../../..'); } const withNextIntl = createNextIntlPlugin({ experimental: { createMessagesDeclaration: './messages/en.json' } }); export default withNextIntl(nextConfig); ================================================ FILE: apps/web/client/package.json ================================================ { "productName": "Onlook", "name": "@onlook/web-client", "version": "0.1.0", "private": true, "homepage": "https://onlook.com", "description": "The first-ever devtool for designers", "license": "Apache-2.0", "author": { "name": "Onlook", "email": "contact@onlook.com" }, "repository": { "type": "git", "url": "https://github.com/onlook-dev/onlook.git" }, "type": "module", "scripts": { "dev": "next dev --turbo", "lint": "eslint . --max-warnings 0", "format": "eslint --fix .", "typecheck": "tsc --noEmit", "build": "next build", "start": "next start", "preview": "bun run build && bun run start", "build:standalone": "STANDALONE_BUILD=true next build && { cp -r public .next/standalone/apps/web/client/ && cp -r .next/static .next/standalone/apps/web/client/.next/; } 2>/dev/null", "start:standalone": "bun .next/standalone/apps/web/client/server.js", "preview:standalone": "bun run build:standalone && bun run start:standalone", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build", "preview-storybook": "bun --bun x serve storybook-static -p 6007", "chromatic": "chromatic --exit-zero-on-changes" }, "dependencies": { "@ai-sdk/provider-utils": "^3.0.10", "@ai-sdk/react": "2.0.60", "@codemirror/lang-css": "^6.2.0", "@codemirror/lang-html": "^6.4.7", "@codemirror/lang-javascript": "^6.2.3", "@codemirror/lang-json": "^6.0.1", "@codemirror/lang-markdown": "^6.1.7", "@onlook/code-provider": "*", "@onlook/constants": "*", "@onlook/db": "*", "@onlook/email": "*", "@onlook/fonts": "*", "@onlook/github": "*", "@onlook/growth": "*", "@onlook/image-server": "*", "@onlook/models": "*", "@onlook/parser": "*", "@onlook/penpal": "*", "@onlook/rpc": "*", "@onlook/stripe": "*", "@onlook/ui": "*", "@onlook/utility": "*", "@opentelemetry/api-logs": "0.57.2", "@opentelemetry/instrumentation": "0.57.2", "@opentelemetry/sdk-logs": "0.57.2", "@storybook/test": "^8.6.14", "@supabase/ssr": "^0.6.1", "@t3-oss/env-nextjs": "^0.12.0", "@tanstack/react-query": "^5.69.0", "@trpc/client": "^11.0.0", "@trpc/react-query": "^11.0.0", "@trpc/server": "^11.0.0", "@uiw/codemirror-extensions-basic-setup": "^4.23.10", "@uiw/react-codemirror": "^4.23.10", "@vercel/otel": "^1.13.0", "@xterm/addon-fit": "^0.10.0", "@xterm/xterm": "^5.5.0", "@zenfs/core": "2.4.0", "@zenfs/dom": "1.2.5", "ai": "5.0.26", "blob-util": "^2.0.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "culori": "^4.0.1", "date-fns": "^4.1.0", "flexsearch": "^0.8.160", "freestyle-sandboxes": "^0.0.78", "gleap": "^14.8.8", "langfuse-vercel": "^3.38.4", "localforage": "^1.10.0", "lru-cache": "^11.2.1", "lucide-react": "^0.486.0", "mobx-react-lite": "^4.1.0", "motion": "^12.23.19", "next": "16.0.7", "next-intl": "^4.0.2", "next-themes": "^0.4.6", "octokit": "^5.0.3", "penpal": "^7.0.4", "posthog-js": "^1.246.0", "posthog-node": "^4.17.2", "prosemirror-commands": "^1.7.1", "prosemirror-history": "^1.4.1", "prosemirror-keymap": "^1.2.2", "react": "19.2.0", "react-arborist": "^3.4.3", "react-codemirror-merge": "4.23.10", "react-dom": "19.2.0", "react-hotkeys-hook": "^5.0.1", "react-markdown": "^10.1.0", "remark-gfm": "^4.0.1", "server-only": "^0.0.1", "shiki": "^3.2.2", "strip-ansi": "^7.1.0", "superjson": "^2.2.1", "tailwind-merge": "^3.2.0", "tldts": "^7.0.12", "tw-animate-css": "^1.2.5", "unicornstudio-react": "^1.4.33", "use-resize-observer": "^9.1.0", "uuid": "^11.1.0", "webfontloader": "^1.6.28", "zod": "^4.1.3" }, "devDependencies": { "@chromatic-com/storybook": "^4.1.2", "@eslint/eslintrc": "^3.3.1", "@onlook/eslint": "*", "@onlook/typescript": "*", "@storybook/addon-a11y": "^10.0.4", "@storybook/addon-actions": "^9.0.8", "@storybook/addon-docs": "^10.0.4", "@storybook/addon-onboarding": "^10.0.4", "@storybook/addon-vitest": "^10.0.4", "@storybook/nextjs-vite": "^10.0.4", "@tailwindcss/postcss": "^4.0.15", "@types/culori": "^4.0.0", "@types/node": "^20.14.10", "@types/react": "19.2.2", "@types/react-dom": "19.2.2", "@types/webfontloader": "^1.6.38", "@vitest/browser-playwright": "^4.0.7", "@vitest/coverage-v8": "^4.0.7", "chromatic": "^13.3.3", "eslint": "^9.0.0", "eslint-plugin-storybook": "^10.0.4", "playwright": "^1.56.1", "postcss": "^8.5.3", "storybook": "^10.0.4", "tailwindcss": "^4.0.15", "type-fest": "^4.41.0", "typescript": "^5.5.4", "vitest": "^4.0.7" }, "ct3aMetadata": { "initVersion": "7.39.2" }, "overrides": { "@types/react": "19.2.2", "@types/react-dom": "19.2.2" } } ================================================ FILE: apps/web/client/postcss.config.js ================================================ export default { plugins: { '@tailwindcss/postcss': {}, }, }; ================================================ FILE: apps/web/client/public/onlook-preload-script.js ================================================ var U4=Object.create;var{getPrototypeOf:J4,defineProperty:Je,getOwnPropertyNames:P4}=Object;var E4=Object.prototype.hasOwnProperty;var Xh=(r,t,i)=>{i=r!=null?U4(J4(r)):{};let o=t||!r||!r.__esModule?Je(i,"default",{value:r,enumerable:!0}):i;for(let n of P4(r))if(!E4.call(o,n))Je(o,n,{get:()=>r[n],enumerable:!0});return o};var vr=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var j=(r,t)=>{for(var i in t)Je(r,i,{get:t[i],enumerable:!0,configurable:!0,set:(o)=>t[i]=()=>o})};var Pe=vr((oU,Wh)=>{function K4(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}Wh.exports=K4});var Nh=vr((eU,qh)=>{var L4=typeof global=="object"&&global&&global.Object===Object&&global;qh.exports=L4});var Ee=vr((lU,Sh)=>{var X4=Nh(),W4=typeof self=="object"&&self&&self.Object===Object&&self,q4=X4||W4||Function("return this")();Sh.exports=q4});var Yh=vr((cU,Vh)=>{var N4=Ee(),S4=function(){return N4.Date.now()};Vh.exports=S4});var Qh=vr((uU,Fh)=>{var V4=/\s/;function Y4(r){var t=r.length;while(t--&&V4.test(r.charAt(t)));return t}Fh.exports=Y4});var Ah=vr((gU,Gh)=>{var F4=Qh(),Q4=/^\s+/;function G4(r){return r?r.slice(0,F4(r)+1).replace(Q4,""):r}Gh.exports=G4});var Ke=vr((mU,Bh)=>{var A4=Ee(),B4=A4.Symbol;Bh.exports=B4});var Mh=vr((bU,Hh)=>{var yh=Ke(),Rh=Object.prototype,y4=Rh.hasOwnProperty,R4=Rh.toString,wn=yh?yh.toStringTag:void 0;function H4(r){var t=y4.call(r,wn),i=r[wn];try{r[wn]=void 0;var o=!0}catch(e){}var n=R4.call(r);if(o)if(t)r[wn]=i;else delete r[wn];return n}Hh.exports=H4});var Th=vr((vU,Zh)=>{var M4=Object.prototype,Z4=M4.toString;function T4(r){return Z4.call(r)}Zh.exports=T4});var r$=vr((hU,sh)=>{var Ch=Ke(),C4=Mh(),d4=Th(),s4="[object Null]",ra="[object Undefined]",dh=Ch?Ch.toStringTag:void 0;function ta(r){if(r==null)return r===void 0?ra:s4;return dh&&dh in Object(r)?C4(r):d4(r)}sh.exports=ta});var n$=vr(($U,t$)=>{function na(r){return r!=null&&typeof r=="object"}t$.exports=na});var o$=vr((fU,i$)=>{var ia=r$(),oa=n$(),ea="[object Symbol]";function la(r){return typeof r=="symbol"||oa(r)&&ia(r)==ea}i$.exports=la});var u$=vr((xU,c$)=>{var ca=Ah(),e$=Pe(),ua=o$(),l$=NaN,ga=/^[-+]0x[0-9a-f]+$/i,ma=/^0b[01]+$/i,ba=/^0o[0-7]+$/i,va=parseInt;function ha(r){if(typeof r=="number")return r;if(ua(r))return l$;if(e$(r)){var t=typeof r.valueOf=="function"?r.valueOf():r;r=e$(t)?t+"":t}if(typeof r!="string")return r===0?r:+r;r=ca(r);var i=ma.test(r);return i||ba.test(r)?va(r.slice(2),i?2:8):ga.test(r)?l$:+r}c$.exports=ha});var Xe=vr((wU,m$)=>{var $a=Pe(),Le=Yh(),g$=u$(),fa="Expected a function",xa=Math.max,wa=Math.min;function aa(r,t,i){var o,n,e,l,u,g,c=0,m=!1,v=!1,h=!0;if(typeof r!="function")throw TypeError(fa);if(t=g$(t)||0,$a(i))m=!!i.leading,v="maxWait"in i,e=v?xa(g$(i.maxWait)||0,t):e,h="trailing"in i?!!i.trailing:h;function b(V){var A=o,tr=n;return o=n=void 0,c=V,l=r.apply(tr,A),l}function x(V){return c=V,u=setTimeout(O,t),m?b(V):l}function D(V){var A=V-g,tr=V-c,Ue=t-A;return v?wa(Ue,e-tr):Ue}function I(V){var A=V-g,tr=V-c;return g===void 0||A>=t||A<0||v&&tr>=e}function O(){var V=Le();if(I(V))return J(V);u=setTimeout(O,D(V))}function J(V){if(u=void 0,h&&o)return b(V);return o=n=void 0,l}function q(){if(u!==void 0)clearTimeout(u);c=0,o=g=n=u=void 0}function E(){return u===void 0?l:J(Le())}function L(){var V=Le(),A=I(V);if(o=arguments,n=this,g=V,A){if(u===void 0)return x(g);if(v)return clearTimeout(u),u=setTimeout(O,t),b(g)}if(u===void 0)u=setTimeout(O,t);return l}return L.cancel=q,L.flush=E,L}m$.exports=aa});var b0=vr((f6)=>{var m0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");f6.encode=function(r){if(0<=r&&r{var v0=b0(),Me=5,h0=1<>1;return t?-i:i}_6.encode=function(t){var i="",o,n=a6(t);do{if(o=n&$0,n>>>=Me,n>0)o|=f0;i+=v0.encode(o)}while(n>0);return i};_6.decode=function(t,i,o){var n=t.length,e=0,l=0,u,g;do{if(i>=n)throw Error("Expected more digits in base 64 VLQ value.");if(g=v0.decode(t.charCodeAt(i++)),g===-1)throw Error("Invalid base64 digit: "+t.charAt(i-1));u=!!(g&f0),g&=$0,e=e+(g<{function p6(r,t,i){if(t in r)return r[t];else if(arguments.length===3)return i;else throw Error('"'+t+'" is a required argument.')}S6.getArg=p6;var w0=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,I6=/^data:.+\,.+$/;function kn(r){var t=r.match(w0);if(!t)return null;return{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}}S6.urlParse=kn;function yt(r){var t="";if(r.scheme)t+=r.scheme+":";if(t+="//",r.auth)t+=r.auth+"@";if(r.host)t+=r.host;if(r.port)t+=":"+r.port;if(r.path)t+=r.path;return t}S6.urlGenerate=yt;var j6=32;function k6(r){var t=[];return function(i){for(var o=0;oj6)t.pop();return e}}var Ze=k6(function(t){var i=t,o=kn(t);if(o){if(!o.path)return t;i=o.path}var n=S6.isAbsolute(i),e=[],l=0,u=0;while(!0)if(l=u,u=i.indexOf("/",l),u===-1){e.push(i.slice(l));break}else{e.push(i.slice(l,u));while(u=0;u--)if(g=e[u],g===".")e.splice(u,1);else if(g==="..")c++;else if(c>0)if(g==="")e.splice(u+1,c),c=0;else e.splice(u,2),c--;if(i=e.join("/"),i==="")i=n?"/":".";if(o)return o.path=i,yt(o);return i});S6.normalize=Ze;function a0(r,t){if(r==="")r=".";if(t==="")t=".";var i=kn(t),o=kn(r);if(o)r=o.path||"/";if(i&&!i.scheme){if(o)i.scheme=o.scheme;return yt(i)}if(i||t.match(I6))return t;if(o&&!o.host&&!o.path)return o.host=t,yt(o);var n=t.charAt(0)==="/"?t:Ze(r.replace(/\/+$/,"")+"/"+t);if(o)return o.path=n,yt(o);return n}S6.join=a0;S6.isAbsolute=function(r){return r.charAt(0)==="/"||w0.test(r)};function U6(r,t){if(r==="")r=".";r=r.replace(/\/$/,"");var i=0;while(t.indexOf(r+"/")!==0){var o=r.lastIndexOf("/");if(o<0)return t;if(r=r.slice(0,o),r.match(/^([^\/]+:\/)?\/*$/))return t;++i}return Array(i+1).join("../")+t.substr(r.length+1)}S6.relative=U6;var z0=function(){var r=Object.create(null);return!("__proto__"in r)}();function _0(r){return r}function J6(r){if(O0(r))return"$"+r;return r}S6.toSetString=z0?_0:J6;function P6(r){if(O0(r))return r.slice(1);return r}S6.fromSetString=z0?_0:P6;function O0(r){if(!r)return!1;var t=r.length;if(t<9)return!1;if(r.charCodeAt(t-1)!==95||r.charCodeAt(t-2)!==95||r.charCodeAt(t-3)!==111||r.charCodeAt(t-4)!==116||r.charCodeAt(t-5)!==111||r.charCodeAt(t-6)!==114||r.charCodeAt(t-7)!==112||r.charCodeAt(t-8)!==95||r.charCodeAt(t-9)!==95)return!1;for(var i=t-10;i>=0;i--)if(r.charCodeAt(i)!==36)return!1;return!0}function E6(r,t,i){var o=tt(r.source,t.source);if(o!==0)return o;if(o=r.originalLine-t.originalLine,o!==0)return o;if(o=r.originalColumn-t.originalColumn,o!==0||i)return o;if(o=r.generatedColumn-t.generatedColumn,o!==0)return o;if(o=r.generatedLine-t.generatedLine,o!==0)return o;return tt(r.name,t.name)}S6.compareByOriginalPositions=E6;function K6(r,t,i){var o=r.originalLine-t.originalLine;if(o!==0)return o;if(o=r.originalColumn-t.originalColumn,o!==0||i)return o;if(o=r.generatedColumn-t.generatedColumn,o!==0)return o;if(o=r.generatedLine-t.generatedLine,o!==0)return o;return tt(r.name,t.name)}S6.compareByOriginalPositionsNoSource=K6;function L6(r,t,i){var o=r.generatedLine-t.generatedLine;if(o!==0)return o;if(o=r.generatedColumn-t.generatedColumn,o!==0||i)return o;if(o=tt(r.source,t.source),o!==0)return o;if(o=r.originalLine-t.originalLine,o!==0)return o;if(o=r.originalColumn-t.originalColumn,o!==0)return o;return tt(r.name,t.name)}S6.compareByGeneratedPositionsDeflated=L6;function X6(r,t,i){var o=r.generatedColumn-t.generatedColumn;if(o!==0||i)return o;if(o=tt(r.source,t.source),o!==0)return o;if(o=r.originalLine-t.originalLine,o!==0)return o;if(o=r.originalColumn-t.originalColumn,o!==0)return o;return tt(r.name,t.name)}S6.compareByGeneratedPositionsDeflatedNoLine=X6;function tt(r,t){if(r===t)return 0;if(r===null)return 1;if(t===null)return-1;if(r>t)return 1;return-1}function W6(r,t){var i=r.generatedLine-t.generatedLine;if(i!==0)return i;if(i=r.generatedColumn-t.generatedColumn,i!==0)return i;if(i=tt(r.source,t.source),i!==0)return i;if(i=r.originalLine-t.originalLine,i!==0)return i;if(i=r.originalColumn-t.originalColumn,i!==0)return i;return tt(r.name,t.name)}S6.compareByGeneratedPositionsInflated=W6;function q6(r){return JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}S6.parseSourceMapInput=q6;function N6(r,t,i){if(t=t||"",r){if(r[r.length-1]!=="/"&&t[0]!=="/")r+="/";t=r+t}if(i){var o=kn(i);if(!o)throw Error("sourceMapURL could not be parsed");if(o.path){var n=o.path.lastIndexOf("/");if(n>=0)o.path=o.path.substring(0,n+1)}t=a0(yt(o),t)}return Ze(t)}S6.computeSourceURL=N6});var D0=vr((rz)=>{var Te=Zi(),Ce=Object.prototype.hasOwnProperty,Ut=typeof Map<"u";function nt(){this._array=[],this._set=Ut?new Map:Object.create(null)}nt.fromArray=function(t,i){var o=new nt;for(var n=0,e=t.length;n=0)return i}else{var o=Te.toSetString(t);if(Ce.call(this._set,o))return this._set[o]}throw Error('"'+t+'" is not in the set.')};nt.prototype.at=function(t){if(t>=0&&t{var p0=Zi();function nz(r,t){var i=r.generatedLine,o=t.generatedLine,n=r.generatedColumn,e=t.generatedColumn;return o>i||o==i&&e>=n||p0.compareByGeneratedPositionsInflated(r,t)<=0}function Ti(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Ti.prototype.unsortedForEach=function(t,i){this._array.forEach(t,i)};Ti.prototype.add=function(t){if(nz(this._last,t))this._last=t,this._array.push(t);else this._sorted=!1,this._array.push(t)};Ti.prototype.toArray=function(){if(!this._sorted)this._array.sort(p0.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};iz.MappingList=Ti});var mt="PENPAL_CHILD";var j4=Xh(Xe(),1);var za=class extends Error{code;constructor(r,t){super(t);this.name="PenpalError",this.code=r}},Or=za,_a=(r)=>({name:r.name,message:r.message,stack:r.stack,penpalCode:r instanceof Or?r.code:void 0}),Oa=({name:r,message:t,stack:i,penpalCode:o})=>{let n=o?new Or(o,t):Error(t);return n.name=r,n.stack=i,n},Da=Symbol("Reply"),pa=class{value;transferables;#r=Da;constructor(r,t){this.value=r,this.transferables=t?.transferables}},Ia=pa,Jr="penpal",Li=(r)=>{return typeof r==="object"&&r!==null},f$=(r)=>{return typeof r==="function"},ja=(r)=>{return Li(r)&&r.namespace===Jr},Nt=(r)=>{return r.type==="SYN"},Xi=(r)=>{return r.type==="ACK1"},an=(r)=>{return r.type==="ACK2"},x$=(r)=>{return r.type==="CALL"},w$=(r)=>{return r.type==="REPLY"},ka=(r)=>{return r.type==="DESTROY"},a$=(r,t=[])=>{let i=[];for(let o of Object.keys(r)){let n=r[o];if(f$(n))i.push([...t,o]);else if(Li(n))i.push(...a$(n,[...t,o]))}return i},Ua=(r,t)=>{let i=r.reduce((o,n)=>{return Li(o)?o[n]:void 0},t);return f$(i)?i:void 0},bt=(r)=>{return r.join(".")},b$=(r,t,i)=>({namespace:Jr,channel:r,type:"REPLY",callId:t,isError:!0,...i instanceof Error?{value:_a(i),isSerializedErrorInstance:!0}:{value:i}}),Ja=(r,t,i,o)=>{let n=!1,e=async(l)=>{if(n)return;if(!x$(l))return;o?.(`Received ${bt(l.methodPath)}() call`,l);let{methodPath:u,args:g,id:c}=l,m,v;try{let h=Ua(u,t);if(!h)throw new Or("METHOD_NOT_FOUND",`Method \`${bt(u)}\` is not found.`);let b=await h(...g);if(b instanceof Ia)v=b.transferables,b=await b.value;m={namespace:Jr,channel:i,type:"REPLY",callId:c,value:b}}catch(h){m=b$(i,c,h)}if(n)return;try{o?.(`Sending ${bt(u)}() reply`,m),r.sendMessage(m,v)}catch(h){if(h.name==="DataCloneError")m=b$(i,c,h),o?.(`Sending ${bt(u)}() reply`,m),r.sendMessage(m);throw h}};return r.addMessageHandler(e),()=>{n=!0,r.removeMessageHandler(e)}},Pa=Ja,z$=crypto.randomUUID?.bind(crypto)??(()=>[,,,,].fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")),Ea=Symbol("CallOptions"),Ka=class{transferables;timeout;#r=Ea;constructor(r){this.transferables=r?.transferables,this.timeout=r?.timeout}},La=Ka,Xa=new Set(["apply","call","bind"]),_$=(r,t,i=[])=>{return new Proxy(i.length?()=>{}:Object.create(null),{get(o,n){if(n==="then")return;if(i.length&&Xa.has(n))return Reflect.get(o,n);return _$(r,t,[...i,n])},apply(o,n,e){return r(i,e)}})},v$=(r)=>{return new Or("CONNECTION_DESTROYED",`Method call ${bt(r)}() failed due to destroyed connection`)},Wa=(r,t,i)=>{let o=!1,n=new Map,e=(g)=>{if(!w$(g))return;let{callId:c,value:m,isError:v,isSerializedErrorInstance:h}=g,b=n.get(c);if(!b)return;if(n.delete(c),i?.(`Received ${bt(b.methodPath)}() call`,g),v)b.reject(h?Oa(m):m);else b.resolve(m)};return r.addMessageHandler(e),{remoteProxy:_$((g,c)=>{if(o)throw v$(g);let m=z$(),v=c[c.length-1],h=v instanceof La,{timeout:b,transferables:x}=h?v:{},D=h?c.slice(0,-1):c;return new Promise((I,O)=>{let J=b!==void 0?window.setTimeout(()=>{n.delete(m),O(new Or("METHOD_CALL_TIMEOUT",`Method call ${bt(g)}() timed out after ${b}ms`))},b):void 0;n.set(m,{methodPath:g,resolve:I,reject:O,timeoutId:J});try{let q={namespace:Jr,channel:t,type:"CALL",id:m,methodPath:g,args:D};i?.(`Sending ${bt(g)}() call`,q),r.sendMessage(q,x)}catch(q){O(new Or("TRANSMISSION_FAILED",q.message))}})},i),destroy:()=>{o=!0,r.removeMessageHandler(e);for(let{methodPath:g,reject:c,timeoutId:m}of n.values())clearTimeout(m),c(v$(g));n.clear()}}},qa=Wa,Na=()=>{let r,t;return{promise:new Promise((o,n)=>{r=o,t=n}),resolve:r,reject:t}},Sa=Na,Va=class extends Error{constructor(r){super(`You've hit a bug in Penpal. Please file an issue with the following information: ${r}`)}},St=Va,We="deprecated-penpal",Ya=(r)=>{return Li(r)&&"penpal"in r},Fa=(r)=>r.split("."),h$=(r)=>r.join("."),O$=(r)=>{return new St(`Unexpected message to translate: ${JSON.stringify(r)}`)},Qa=(r)=>{if(r.penpal==="syn")return{namespace:Jr,channel:void 0,type:"SYN",participantId:We};if(r.penpal==="ack")return{namespace:Jr,channel:void 0,type:"ACK2"};if(r.penpal==="call")return{namespace:Jr,channel:void 0,type:"CALL",id:r.id,methodPath:Fa(r.methodName),args:r.args};if(r.penpal==="reply")if(r.resolution==="fulfilled")return{namespace:Jr,channel:void 0,type:"REPLY",callId:r.id,value:r.returnValue};else return{namespace:Jr,channel:void 0,type:"REPLY",callId:r.id,isError:!0,...r.returnValueIsError?{value:r.returnValue,isSerializedErrorInstance:!0}:{value:r.returnValue}};throw O$(r)},Ga=(r)=>{if(Xi(r))return{penpal:"synAck",methodNames:r.methodPaths.map(h$)};if(x$(r))return{penpal:"call",id:r.id,methodName:h$(r.methodPath),args:r.args};if(w$(r))if(r.isError)return{penpal:"reply",id:r.callId,resolution:"rejected",...r.isSerializedErrorInstance?{returnValue:r.value,returnValueIsError:!0}:{returnValue:r.value}};else return{penpal:"reply",id:r.callId,resolution:"fulfilled",returnValue:r.value};throw O$(r)},Aa=({messenger:r,methods:t,timeout:i,channel:o,log:n})=>{let e=z$(),l,u=[],g=!1,c=a$(t),{promise:m,resolve:v,reject:h}=Sa(),b=i!==void 0?setTimeout(()=>{h(new Or("CONNECTION_TIMEOUT",`Connection timed out after ${i}ms`))},i):void 0,x=()=>{for(let L of u)L()},D=()=>{if(g)return;u.push(Pa(r,t,o,n));let{remoteProxy:L,destroy:V}=qa(r,o,n);u.push(V),clearTimeout(b),g=!0,v({remoteProxy:L,destroy:x})},I=()=>{let L={namespace:Jr,type:"SYN",channel:o,participantId:e};n?.("Sending handshake SYN",L);try{r.sendMessage(L)}catch(V){h(new Or("TRANSMISSION_FAILED",V.message))}},O=(L)=>{if(n?.("Received handshake SYN",L),L.participantId===l&&l!==We)return;if(l=L.participantId,I(),!(e>l||l===We))return;let A={namespace:Jr,channel:o,type:"ACK1",methodPaths:c};n?.("Sending handshake ACK1",A);try{r.sendMessage(A)}catch(tr){h(new Or("TRANSMISSION_FAILED",tr.message));return}},J=(L)=>{n?.("Received handshake ACK1",L);let V={namespace:Jr,channel:o,type:"ACK2"};n?.("Sending handshake ACK2",V);try{r.sendMessage(V)}catch(A){h(new Or("TRANSMISSION_FAILED",A.message));return}D()},q=(L)=>{n?.("Received handshake ACK2",L),D()},E=(L)=>{if(Nt(L))O(L);if(Xi(L))J(L);if(an(L))q(L)};return r.addMessageHandler(E),u.push(()=>r.removeMessageHandler(E)),I(),m},Ba=Aa,ya=(r)=>{let t=!1,i;return(...o)=>{if(!t)t=!0,i=r(...o);return i}},Ra=ya,$$=new WeakSet,Ha=({messenger:r,methods:t={},timeout:i,channel:o,log:n})=>{if(!r)throw new Or("INVALID_ARGUMENT","messenger must be defined");if($$.has(r))throw new Or("INVALID_ARGUMENT","A messenger can only be used for a single connection");$$.add(r);let e=[r.destroy],l=Ra((c)=>{if(c){let m={namespace:Jr,channel:o,type:"DESTROY"};try{r.sendMessage(m)}catch(v){}}for(let m of e)m();n?.("Connection destroyed")}),u=(c)=>{return ja(c)&&c.channel===o};return{promise:(async()=>{try{r.initialize({log:n,validateReceivedMessage:u}),r.addMessageHandler((v)=>{if(ka(v))l(!1)});let{remoteProxy:c,destroy:m}=await Ba({messenger:r,methods:t,timeout:i,channel:o,log:n});return e.push(m),c}catch(c){throw l(!0),c}})(),destroy:()=>{l(!0)}}},D$=Ha,Ma=class{#r;#o;#n;#t;#l;#i=new Set;#e;#c=!1;constructor({remoteWindow:r,allowedOrigins:t}){if(!r)throw new Or("INVALID_ARGUMENT","remoteWindow must be defined");this.#r=r,this.#o=t?.length?t:[window.origin]}initialize=({log:r,validateReceivedMessage:t})=>{this.#n=r,this.#t=t,window.addEventListener("message",this.#b)};sendMessage=(r,t)=>{if(Nt(r)){let i=this.#u(r);this.#r.postMessage(r,{targetOrigin:i,transfer:t});return}if(Xi(r)||this.#c){let i=this.#c?Ga(r):r,o=this.#u(r);this.#r.postMessage(i,{targetOrigin:o,transfer:t});return}if(an(r)){let{port1:i,port2:o}=new MessageChannel;this.#e=i,i.addEventListener("message",this.#g),i.start();let n=[o,...t||[]],e=this.#u(r);this.#r.postMessage(r,{targetOrigin:e,transfer:n});return}if(this.#e){this.#e.postMessage(r,{transfer:t});return}throw new St("Port is undefined")};addMessageHandler=(r)=>{this.#i.add(r)};removeMessageHandler=(r)=>{this.#i.delete(r)};destroy=()=>{window.removeEventListener("message",this.#b),this.#m(),this.#i.clear()};#v=(r)=>{return this.#o.some((t)=>t instanceof RegExp?t.test(r):t===r||t==="*")};#u=(r)=>{if(Nt(r))return"*";if(!this.#l)throw new St("Concrete remote origin not set");return this.#l==="null"&&this.#o.includes("*")?"*":this.#l};#m=()=>{this.#e?.removeEventListener("message",this.#g),this.#e?.close(),this.#e=void 0};#b=({source:r,origin:t,ports:i,data:o})=>{if(r!==this.#r)return;if(Ya(o))this.#n?.("Please upgrade the child window to the latest version of Penpal."),this.#c=!0,o=Qa(o);if(!this.#t?.(o))return;if(!this.#v(t)){this.#n?.(`Received a message from origin \`${t}\` which did not match allowed origins \`[${this.#o.join(", ")}]\``);return}if(Nt(o))this.#m(),this.#l=t;if(an(o)&&!this.#c){if(this.#e=i[0],!this.#e)throw new St("No port received on ACK2");this.#e.addEventListener("message",this.#g),this.#e.start()}for(let n of this.#i)n(o)};#g=({data:r})=>{if(!this.#t?.(r))return;for(let t of this.#i)t(r)}},p$=Ma,aU=class{#r;#o;#n=new Set;#t;constructor({worker:r}){if(!r)throw new Or("INVALID_ARGUMENT","worker must be defined");this.#r=r}initialize=({validateReceivedMessage:r})=>{this.#o=r,this.#r.addEventListener("message",this.#i)};sendMessage=(r,t)=>{if(Nt(r)||Xi(r)){this.#r.postMessage(r,{transfer:t});return}if(an(r)){let{port1:i,port2:o}=new MessageChannel;this.#t=i,i.addEventListener("message",this.#i),i.start(),this.#r.postMessage(r,{transfer:[o,...t||[]]});return}if(this.#t){this.#t.postMessage(r,{transfer:t});return}throw new St("Port is undefined")};addMessageHandler=(r)=>{this.#n.add(r)};removeMessageHandler=(r)=>{this.#n.delete(r)};destroy=()=>{this.#r.removeEventListener("message",this.#i),this.#l(),this.#n.clear()};#l=()=>{this.#t?.removeEventListener("message",this.#i),this.#t?.close(),this.#t=void 0};#i=({ports:r,data:t})=>{if(!this.#o?.(t))return;if(Nt(t))this.#l();if(an(t)){if(this.#t=r[0],!this.#t)throw new St("No port received on ACK2");this.#t.addEventListener("message",this.#i),this.#t.start()}for(let i of this.#n)i(t)}};var zU=class{#r;#o;#n=new Set;constructor({port:r}){if(!r)throw new Or("INVALID_ARGUMENT","port must be defined");this.#r=r}initialize=({validateReceivedMessage:r})=>{this.#o=r,this.#r.addEventListener("message",this.#t),this.#r.start()};sendMessage=(r,t)=>{this.#r?.postMessage(r,{transfer:t})};addMessageHandler=(r)=>{this.#n.add(r)};removeMessageHandler=(r)=>{this.#n.delete(r)};destroy=()=>{this.#r.removeEventListener("message",this.#t),this.#r.close(),this.#n.clear()};#t=({data:r})=>{if(!this.#o?.(r))return;for(let t of this.#n)t(r)}};var I$=["SCRIPT","STYLE","LINK","META","NOSCRIPT"],j$=new Set(["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","h1","h2","h3","h4","h5","h6","i","iframe","img","input","ins","kbd","label","li","map","mark","meter","noscript","object","output","p","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr"]);var NU={SCALE:0.7,PAN_POSITION:{x:175,y:100},URL:"http://localhost:3000/",ASPECT_RATIO_LOCKED:!1,DEVICE:"Custom:Custom",THEME:"system",ORIENTATION:"Portrait",MIN_DIMENSIONS:{width:"280px",height:"360px"},COMMANDS:{run:"bun run dev",build:"bun run build",install:"bun install"},IMAGE_FOLDER:"public",IMAGE_DIMENSION:{width:"100px",height:"100px"},FONT_FOLDER:"fonts",FONT_CONFIG:"app/fonts.ts",TAILWIND_CONFIG:"tailwind.config.ts",CHAT_SETTINGS:{showSuggestions:!0,autoApplyCode:!0,expandCodeBlocks:!1,showMiniChat:!1,maxImages:5},EDITOR_SETTINGS:{shouldWarnDelete:!1,enableBunReplace:!0,buildFlags:"--no-lint"}};var qe=["node_modules","dist","build",".git",".next"];var VU=[...qe,"static","out",".next-prod",".onlook","public/onlook-preload-script.js"],YU=[...qe,".next-prod"],FU=[...qe,"coverage"],Za=[".jsx",".tsx"],Ta=[".js",".ts",".mjs",".cjs"],QU=[...Za,...Ta];var BU={["en"]:"English",["ja"]:"日本語",["zh"]:"中文",["ko"]:"한국어"};var P$=Xh(Xe(),1);function Q(r){return document.querySelector(`[${"data-odid"}="${r}"]`)}function Ne(r,t=!1){let i=`[${"data-odid"}="${r}"]`;if(!t)return i;return Ca(i)}function Ca(r){return CSS.escape(r)}function pt(r){return r&&r instanceof Node&&r.nodeType===Node.ELEMENT_NODE&&!I$.includes(r.tagName)&&!r.hasAttribute("data-onlook-ignore")&&r.style.display!=="none"}var da="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var k$=(r=21)=>{let t="",i=r|0;while(i--)t+=da[Math.random()*64|0];return t};function Pr(r){let t=r.getAttribute("data-odid");if(!t)t=`odid-${k$()}`,r.setAttribute("data-odid",t);return t}function Qr(r){return r.getAttribute("data-oid")}function Gr(r){return r.getAttribute("data-oiid")}function U$(r,t){if(!ar)return;ar.onDomProcessed({layerMap:Object.fromEntries(r),rootNode:t}).catch((i)=>{console.error("Failed to send DOM processed event:",i)})}function Se(r){window._onlookFrameId=r}function Vt(){let r=window._onlookFrameId;if(!r)return console.warn("Frame id not found"),ar?.getFrameId().then((t)=>{Se(t)}),"";return r}function Ve(r){window._onlookBranchId=r}function zn(){let r=window._onlookBranchId;if(!r)return console.warn("Branch id not found"),ar?.getBranchId().then((t)=>{Ve(t)}),"";return r}function sa(r=document.body){if(!Vt())return console.warn("frameView id not found, skipping dom processing"),null;let i=zr(r);if(!i)return console.warn("Error building layer tree, root element is null"),null;let o=r.getAttribute("data-odid");if(!o)return console.warn("Root dom id not found"),null;let n=i.get(o);if(!n)return console.warn("Root node not found"),null;return U$(i,n),{rootDomId:o,layerMap:Array.from(i.entries())}}var Wi=P$.default(sa,500),r6=[(r)=>{let t=r.parentElement;return t&&t.tagName.toLowerCase()==="svg"},(r)=>{return r.tagName.toLowerCase()==="next-route-announcer"},(r)=>{return r.tagName.toLowerCase()==="nextjs-portal"}];function zr(r){if(!pt(r))return null;let t=new Map,i=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:(e)=>{let l=e;if(r6.some((u)=>u(l)))return NodeFilter.FILTER_REJECT;return pt(l)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),o=J$(r);o.children=[],t.set(o.domId,o);let n=i.nextNode();while(n){let e=J$(n);e.children=[];let l=n.parentElement;if(l){let u=l.getAttribute("data-odid");if(u){e.parent=u;let g=t.get(u);if(g&&g.children)g.children.push(e.domId)}}t.set(e.domId,e),n=i.nextNode()}return t}function J$(r){let t=Pr(r),i=Qr(r),o=Gr(r),n=Array.from(r.childNodes).map((g)=>g.nodeType===Node.TEXT_NODE?g.textContent:"").join(" ").trim().slice(0,500),e=window.getComputedStyle(r),l=r.getAttribute("data-ocname");return{domId:t,oid:i||null,instanceId:o||null,textContent:n||"",tagName:r.tagName.toLowerCase(),isVisible:e.visibility!=="hidden",component:l||null,frameId:Vt(),children:null,parent:null,dynamicType:null,coreElementType:null}}function Ye(r){throw Error(`Expected \`never\`, found: ${JSON.stringify(r)}`)}var E$=(r)=>JSON.parse(JSON.stringify(r));function K$(r){let t=X$(r),i=t6(r),o=n6(r);return{defined:{width:"auto",height:"auto",...i,...o},computed:t}}function L$(r){let t=Q(r);if(!t)return{};return X$(t)}function X$(r){return E$(window.getComputedStyle(r))}function t6(r){let t={},i=W$(r.style.cssText);return Object.entries(i).forEach(([o,n])=>{t[o]=n}),t}function n6(r){let t={},i=document.styleSheets;for(let o=0;ot[c]=m)}}catch(u){console.warn("Error",u)}}return t}function W$(r){let t={};return r.split(";").forEach((i)=>{if(i=i.trim(),!i)return;let[o,...n]=i.split(":");t[o?.trim()??""]=n.join(":").trim()}),t}var q$=(r,t)=>{let i=document.elementFromPoint(r,t);if(!i)return;let o=(e)=>{if(e?.shadowRoot){let l=e.shadowRoot.elementFromPoint(r,t);if(l==e)return e;else if(l?.shadowRoot)return o(l);else return l||e}else return e};return o(i)||i},lr=(r,t)=>{let i=r.parentElement,o=i?{domId:i.getAttribute("data-odid"),frameId:Vt(),branchId:zn(),oid:i.getAttribute("data-oid"),instanceId:i.getAttribute("data-oiid"),rect:i.getBoundingClientRect()}:null,n=r.getBoundingClientRect(),e=t?K$(r):null;return{domId:r.getAttribute("data-odid"),oid:r.getAttribute("data-oid"),frameId:Vt(),branchId:zn(),instanceId:r.getAttribute("data-oiid"),rect:n,tagName:r.tagName,parent:o,styles:e}};function qi(r){try{let t=r.getAttribute("data-onlook-drag-saved-style");if(t){let i=JSON.parse(t);for(let o in i)r.style[o]=i[o]}}catch(t){console.warn("Error restoring style",t)}}function N$(r){let t=r.parentElement;if(!t)return;return{type:"index",targetDomId:t.getAttribute("data-odid"),targetOid:Gr(t)||Qr(t)||null,index:Array.from(r.parentElement?.children||[]).indexOf(r),originalIndex:Array.from(r.parentElement?.children||[]).indexOf(r)}}var S$=(r)=>{let t=Array.from(r.childNodes).filter((i)=>i.nodeType===Node.TEXT_NODE).map((i)=>i.textContent);if(t.length===0)return;return t.join("")};var Ni=(r,t)=>{let i=Q(r)||document.body;return lr(i,t)},V$=(r,t,i)=>{let o=i6(r,t)||document.body;return lr(o,i)},i6=(r,t)=>{let i=document.elementFromPoint(r,t);if(!i)return;let o=(e)=>{if(e?.shadowRoot){let l=e.shadowRoot.elementFromPoint(r,t);if(l==e)return e;else if(l?.shadowRoot)return o(l);else return l||e}else return e};return o(i)||i},Y$=(r,t,i)=>{let o=Q(r);if(!o){console.warn("Failed to updateElementInstanceId: Element not found");return}o.setAttribute("data-oiid",t),o.setAttribute("data-ocname",i)},F$=(r)=>{let t=Q(r);if(!t?.parentElement)return null;return lr(t.parentElement,!1)},Q$=(r)=>{let t=Q(r);if(!t)return 0;return t.children.length},G$=(r)=>{let t=Q(r);if(!t)return null;return lr(t.offsetParent,!1)};function A$(r,t,i){let o=Q(r.domId);if(!o)return console.warn("Failed to find parent element",r.domId),null;let n=o6(t),e=new Set(i.map((c)=>c.domId)),l=Array.from(o.children).map((c,m)=>({element:c,index:m,domId:Pr(c)})).filter(({domId:c})=>e.has(c));if(l.length===0)return console.warn("No valid children found to group"),null;let u=Math.min(...l.map((c)=>c.index));return o.insertBefore(n,o.children[u]??null),l.forEach(({element:c})=>{let m=c.cloneNode(!0);m.setAttribute("data-onlook-inserted","true"),n.appendChild(m),c.style.display="none",y$(c)}),{domEl:lr(n,!0),newMap:zr(n)}}function B$(r,t){let i=Q(r.domId);if(!i)return console.warn(`Parent element not found: ${r.domId}`),null;let o;if(t.domId)o=Q(t.domId);else return console.warn("Container domId is required for ungrouping"),null;if(!o)return console.warn("Container element not found for ungrouping"),null;return Array.from(o.children).forEach((l)=>{i.appendChild(l)}),o.remove(),{domEl:lr(i,!0),newMap:zr(i)}}function o6(r){let t=document.createElement(r.tagName);return Object.entries(r.attributes).forEach(([i,o])=>{t.setAttribute(i,o)}),t.setAttribute("data-onlook-inserted","true"),t.setAttribute("data-odid",r.domId),t.setAttribute("data-oid",r.oid),t}function y$(r){r.removeAttribute("data-odid"),r.removeAttribute("data-oid"),r.removeAttribute("data-onlook-inserted");let t=Array.from(r.children);if(t.length===0)return;t.forEach((i)=>{y$(i)})}function Si(r){let t=Q(r);if(!t)return console.warn("Element not found for domId:",r),null;return R$(t)}function R$(r){let t=Array.from(r.attributes).reduce((o,n)=>{return o[n.name]=n.value,o},{}),i=Gr(r)||Qr(r)||null;if(!i)return console.warn("Element has no oid"),null;return{oid:i,branchId:zn(),domId:Pr(r),tagName:r.tagName.toLowerCase(),children:Array.from(r.children).map((o)=>R$(o)).filter(Boolean),attributes:t,textContent:S$(r)||null,styles:{}}}function H$(r){let t=Q(r);if(!t)throw Error("Element not found for domId: "+r);let i=t.parentElement;if(!i)throw Error("Inserted element has no parent");let o=Gr(i)||Qr(i);if(!o)return console.warn("Parent element has no oid"),null;let n=Pr(i),e=Array.from(i.children).indexOf(t);if(e===-1)return{type:"append",targetDomId:n,targetOid:o};return{type:"index",targetDomId:n,targetOid:o,index:e,originalIndex:e}}function M$(r){let t=document.querySelector(`[${"data-odid"}="${r}"]`);if(!t)return console.warn("No element found",{domId:r}),{dynamicType:null,coreType:null};let i=t.getAttribute("data-onlook-dynamic-type")||null,o=t.getAttribute("data-onlook-core-element-type")||null;return{dynamicType:i,coreType:o}}function Z$(r,t,i){let o=document.querySelector(`[${"data-odid"}="${r}"]`);if(o){if(t)o.setAttribute("data-onlook-dynamic-type",t);if(i)o.setAttribute("data-onlook-core-element-type",i)}}function T$(){let t=document.body.querySelector(`[${"data-oid"}]`);if(t)return lr(t,!0);return null}var Vr=0,w=1,k=2,H=3,F=4,gr=5,Yt=6,er=7,xr=8,P=9,U=10,B=11,K=12,N=13,dr=14,hr=15,d=16,nr=17,ir=18,mr=19,wr=20,X=21,p=22,Z=23,fr=24,y=25;function cr(r){return r>=48&&r<=57}function Ir(r){return cr(r)||r>=65&&r<=70||r>=97&&r<=102}function Fi(r){return r>=65&&r<=90}function e6(r){return r>=97&&r<=122}function l6(r){return Fi(r)||e6(r)}function c6(r){return r>=128}function Yi(r){return l6(r)||c6(r)||r===95}function _n(r){return Yi(r)||cr(r)||r===45}function u6(r){return r>=0&&r<=8||r===11||r>=14&&r<=31||r===127}function On(r){return r===10||r===13||r===12}function Ar(r){return On(r)||r===32||r===9}function Dr(r,t){if(r!==92)return!1;if(On(t)||t===0)return!1;return!0}function Ft(r,t,i){if(r===45)return Yi(t)||t===45||Dr(t,i);if(Yi(r))return!0;if(r===92)return Dr(r,t);return!1}function Qi(r,t,i){if(r===43||r===45){if(cr(t))return 2;return t===46&&cr(i)?3:0}if(r===46)return cr(t)?2:0;if(cr(r))return 1;return 0}function Gi(r){if(r===65279)return 1;if(r===65534)return 1;return 0}var Fe=Array(128),g6=128,Dn=130,Qe=131,Ai=132,Ge=133;for(let r=0;rr.length)return!1;for(let n=t;n=0;t--)if(!Ar(r.charCodeAt(t)))break;return t+1}function pn(r,t){for(;t=55296&&t<=57343||t>1114111)t=65533;return String.fromCodePoint(t)}var Gt=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"];function At(r=null,t){if(r===null||r.length0?Gi(t.charCodeAt(0)):0,n=At(r.lines,i),e=At(r.columns,i),l=r.startLine,u=r.startColumn;for(let g=o;g{}){r=String(r||"");let i=r.length,o=At(this.offsetAndType,r.length+1),n=At(this.balance,r.length+1),e=0,l=-1,u=0,g=r.length;this.offsetAndType=null,this.balance=null,n.fill(0),t(r,(c,m,v)=>{let h=e++;if(o[h]=c<>Rr]}else if(t0(c))g=h,u=jt[c]}),o[e]=Vr<e)n[c]=e}this.source=r,this.firstCharOffset=l===-1?0:l,this.tokenCount=e,this.offsetAndType=o,this.balance=n,this.reset(),this.next()}lookupType(r){if(r+=this.tokenIndex,r>Rr;return Vr}lookupTypeNonSC(r){for(let t=this.tokenIndex;t>Rr;if(i!==N&&i!==y){if(r--===0)return i}}return Vr}lookupOffset(r){if(r+=this.tokenIndex,r>Rr;if(i!==N&&i!==y){if(r--===0)return t-this.tokenIndex}}return Vr}lookupValue(r,t){if(r+=this.tokenIndex,r0)return r>Rr,this.tokenEnd=t&yr;else this.tokenIndex=this.tokenCount,this.next()}next(){let r=this.tokenIndex+1;if(r>Rr,this.tokenEnd=r&yr;else this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=Vr,this.tokenStart=this.tokenEnd=this.source.length}skipSC(){while(this.tokenType===N||this.tokenType===y)this.next()}skipUntilBalanced(r,t){let i=r,o=0,n=0;r:for(;i0?this.offsetAndType[i-1]&yr:this.firstCharOffset,t(this.source.charCodeAt(n))){case 1:break r;case 2:i++;break r;default:if(t0(this.offsetAndType[i]>>Rr))i=o}}this.skip(i-this.tokenIndex)}forEachToken(r){for(let t=0,i=this.firstCharOffset;t>Rr;i=e,r(l,o,e,t)}}dump(){let r=Array(this.tokenCount);return this.forEachToken((t,i,o,n)=>{r[n]={idx:n,type:Gt[t],chunk:this.source.substring(i,o),balance:this.balance[n]}}),r}}function vt(r,t){function i(v){return v=r.length){if(cString(x+O+1).padStart(h)+" |"+I).join(` `)}let u=` `.repeat(Math.max(o-1,0)),g=" ".repeat(Math.max(n-1,0)),c=(u+g+r).split(/\r\n?|\n|\f/),m=Math.max(1,t-e)-1,v=Math.min(t+e,c.length+1),h=Math.max(4,String(v).length)+1,b=0;if(i+=(i0.length-1)*(c[t-1].substr(0,i-1).match(/\t/g)||[]).length,i>Be)b=i-n0+3,i=n0-2;for(let x=m;x<=v;x++)if(x>=0&&x0&&c[x].length>b?"…":"")+c[x].substr(b,Be-2)+(c[x].length>b+Be-1?"…":"");return[l(m,t),Array(i+h+2).join("-")+"^",l(t,v)].filter(Boolean).join(` `).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function ye(r,t,i,o,n,e=1,l=1){return Object.assign(kt("SyntaxError",r),{source:t,offset:i,line:o,column:n,sourceFragment(g){return o0({source:t,line:o,column:n,baseLine:e,baseColumn:l},isNaN(g)?0:g)},get formattedMessage(){return`Parse error: ${r} `+o0({source:t,line:o,column:n,baseLine:e,baseColumn:l},2)}})}function e0(r){let t=this.createList(),i=!1,o={recognizer:r};while(!this.eof){switch(this.tokenType){case y:this.next();continue;case N:i=!0,this.next();continue}let n=r.getNode.call(this,o);if(n===void 0)break;if(i){if(r.onWhiteSpace)r.onWhiteSpace.call(this,n,t,o);i=!1}t.push(n)}if(i&&r.onWhiteSpace)r.onWhiteSpace.call(this,null,t,o);return t}var l0=()=>{},b6=33,v6=35,Re=59,c0=123,u0=0;function h6(r){return function(){return this[r]()}}function He(r){let t=Object.create(null);for(let i of Object.keys(r)){let o=r[i],n=o.parse||o;if(n)t[i]=n}return t}function $6(r){let t={context:Object.create(null),features:Object.assign(Object.create(null),r.features),scope:Object.assign(Object.create(null),r.scope),atrule:He(r.atrule),pseudo:He(r.pseudo),node:He(r.node)};for(let[i,o]of Object.entries(r.parseContext))switch(typeof o){case"function":t.context[i]=o;break;case"string":t.context[i]=h6(o);break}return{config:t,...t,...t.node}}function g0(r){let t="",i="",o=!1,n=l0,e=!1,l=new Hi,u=Object.assign(new Mi,$6(r||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:e0,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(c){return c===c0?1:0},consumeUntilLeftCurlyBracketOrSemicolon(c){return c===c0||c===Re?1:0},consumeUntilExclamationMarkOrSemicolon(c){return c===b6||c===Re?1:0},consumeUntilSemicolonIncluded(c){return c===Re?2:0},createList(){return new or},createSingleNodeList(c){return new or().appendData(c)},getFirstListNode(c){return c&&c.first},getLastListNode(c){return c&&c.last},parseWithFallback(c,m){let v=this.tokenIndex;try{return c.call(this)}catch(h){if(e)throw h;this.skip(v-this.tokenIndex);let b=m.call(this);return e=!0,n(h,b),e=!1,b}},lookupNonWSType(c){let m;do if(m=this.lookupType(c++),m!==N&&m!==y)return m;while(m!==u0);return u0},charCodeAt(c){return c>=0&&cb.toUpperCase()),v=`${/[[\](){}]/.test(m)?`"${m}"`:m} is expected`,h=this.tokenStart;switch(c){case w:if(this.tokenType===k||this.tokenType===er)h=this.tokenEnd-1,v="Identifier is expected but function found";else v="Identifier is expected";break;case F:if(this.isDelim(v6))this.next(),h++,v="Name is expected";break;case B:if(this.tokenType===U)h=this.tokenEnd,v="Percent sign is expected";break}this.error(v,h)}this.next()},eatIdent(c){if(this.tokenType!==w||this.lookupValue(0,c)===!1)this.error(`Identifier "${c}" is expected`);this.next()},eatDelim(c){if(!this.isDelim(c))this.error(`Delim "${String.fromCharCode(c)}" is expected`);this.next()},getLocation(c,m){if(o)return l.getLocationRange(c,m,i);return null},getLocationFromList(c){if(o){let m=this.getFirstListNode(c),v=this.getLastListNode(c);return l.getLocationRange(m!==null?m.loc.start.offset-l.startOffset:this.tokenStart,v!==null?v.loc.end.offset-l.startOffset:this.tokenStart,i)}return null},error(c,m){let v=typeof m<"u"&&m",o=Boolean(m.positions),n=typeof m.onParseError==="function"?m.onParseError:l0,e=!1,u.parseAtrulePrelude="parseAtrulePrelude"in m?Boolean(m.parseAtrulePrelude):!0,u.parseRulePrelude="parseRulePrelude"in m?Boolean(m.parseRulePrelude):!0,u.parseValue="parseValue"in m?Boolean(m.parseValue):!0,u.parseCustomProperty="parseCustomProperty"in m?Boolean(m.parseCustomProperty):!1;let{context:v="default",onComment:h}=m;if(v in u.context===!1)throw Error("Unknown context `"+v+"`");if(typeof h==="function")u.forEachToken((x,D,I)=>{if(x===y){let O=u.getLocation(D,I),J=rt(t,I-2,I,"*/")?t.slice(D+2,I-2):t.slice(D+2,I);h(J,O)}});let b=u.context[v].call(u,m);if(!u.eof)u.error();return b},{SyntaxError:ye,config:u.config})}var Un=x0(),ur=Zi(),Ci=D0().ArraySet,ez=I0().MappingList;function Wr(r){if(!r)r={};this._file=ur.getArg(r,"file",null),this._sourceRoot=ur.getArg(r,"sourceRoot",null),this._skipValidation=ur.getArg(r,"skipValidation",!1),this._ignoreInvalidMapping=ur.getArg(r,"ignoreInvalidMapping",!1),this._sources=new Ci,this._names=new Ci,this._mappings=new ez,this._sourcesContents=null}Wr.prototype._version=3;Wr.fromSourceMap=function(t,i){var o=t.sourceRoot,n=new Wr(Object.assign(i||{},{file:t.file,sourceRoot:o}));return t.eachMapping(function(e){var l={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){if(l.source=e.source,o!=null)l.source=ur.relative(o,l.source);if(l.original={line:e.originalLine,column:e.originalColumn},e.name!=null)l.name=e.name}n.addMapping(l)}),t.sources.forEach(function(e){var l=e;if(o!==null)l=ur.relative(o,e);if(!n._sources.has(l))n._sources.add(l);var u=t.sourceContentFor(e);if(u!=null)n.setSourceContent(e,u)}),n};Wr.prototype.addMapping=function(t){var i=ur.getArg(t,"generated"),o=ur.getArg(t,"original",null),n=ur.getArg(t,"source",null),e=ur.getArg(t,"name",null);if(!this._skipValidation){if(this._validateMapping(i,o,n,e)===!1)return}if(n!=null){if(n=String(n),!this._sources.has(n))this._sources.add(n)}if(e!=null){if(e=String(e),!this._names.has(e))this._names.add(e)}this._mappings.add({generatedLine:i.line,generatedColumn:i.column,originalLine:o!=null&&o.line,originalColumn:o!=null&&o.column,source:n,name:e})};Wr.prototype.setSourceContent=function(t,i){var o=t;if(this._sourceRoot!=null)o=ur.relative(this._sourceRoot,o);if(i!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[ur.toSetString(o)]=i}else if(this._sourcesContents){if(delete this._sourcesContents[ur.toSetString(o)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};Wr.prototype.applySourceMap=function(t,i,o){var n=i;if(i==null){if(t.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=t.file}var e=this._sourceRoot;if(e!=null)n=ur.relative(e,n);var l=new Ci,u=new Ci;this._mappings.unsortedForEach(function(g){if(g.source===n&&g.originalLine!=null){var c=t.originalPositionFor({line:g.originalLine,column:g.originalColumn});if(c.source!=null){if(g.source=c.source,o!=null)g.source=ur.join(o,g.source);if(e!=null)g.source=ur.relative(e,g.source);if(g.originalLine=c.line,g.originalColumn=c.column,c.name!=null)g.name=c.name}}var m=g.source;if(m!=null&&!l.has(m))l.add(m);var v=g.name;if(v!=null&&!u.has(v))u.add(v)},this),this._sources=l,this._names=u,t.sources.forEach(function(g){var c=t.sourceContentFor(g);if(c!=null){if(o!=null)g=ur.join(o,g);if(e!=null)g=ur.relative(e,g);this.setSourceContent(g,c)}},this)};Wr.prototype._validateMapping=function(t,i,o,n){if(i&&typeof i.line!=="number"&&typeof i.column!=="number"){var e="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping){if(typeof console<"u"&&console.warn)console.warn(e);return!1}else throw Error(e)}if(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!i&&!o&&!n)return;else if(t&&"line"in t&&"column"in t&&i&&"line"in i&&"column"in i&&t.line>0&&t.column>=0&&i.line>0&&i.column>=0&&o)return;else{var e="Invalid mapping: "+JSON.stringify({generated:t,source:o,original:i,name:n});if(this._ignoreInvalidMapping){if(typeof console<"u"&&console.warn)console.warn(e);return!1}else throw Error(e)}};Wr.prototype._serializeMappings=function(){var t=0,i=1,o=0,n=0,e=0,l=0,u="",g,c,m,v,h=this._mappings.toArray();for(var b=0,x=h.length;b0){if(!ur.compareByGeneratedPositionsInflated(c,h[b-1]))continue;g+=","}if(g+=Un.encode(c.generatedColumn-t),t=c.generatedColumn,c.source!=null){if(v=this._sources.indexOf(c.source),g+=Un.encode(v-l),l=v,g+=Un.encode(c.originalLine-1-n),n=c.originalLine-1,g+=Un.encode(c.originalColumn-o),o=c.originalColumn,c.name!=null)m=this._names.indexOf(c.name),g+=Un.encode(m-e),e=m}u+=g}return u};Wr.prototype._generateSourcesContent=function(t,i){return t.map(function(o){if(!this._sourcesContents)return null;if(i!=null)o=ur.relative(i,o);var n=ur.toSetString(o);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};Wr.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)t.file=this._file;if(this._sourceRoot!=null)t.sourceRoot=this._sourceRoot;if(this._sourcesContents)t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot);return t};Wr.prototype.toString=function(){return JSON.stringify(this.toJSON())};var de=Wr;var j0=new Set(["Atrule","Selector","Declaration"]);function k0(r){let t=new de,i={line:1,column:0},o={line:0,column:0},n={line:1,column:0},e={generated:n},l=1,u=0,g=!1,c=r.node;r.node=function(h){if(h.loc&&h.loc.start&&j0.has(h.type)){let b=h.loc.start.line,x=h.loc.start.column-1;if(o.line!==b||o.column!==x){if(o.line=b,o.column=x,i.line=l,i.column=u,g){if(g=!1,i.line!==n.line||i.column!==n.column)t.addMapping(e)}g=!0,t.addMapping({source:h.loc.source,original:o,generated:i})}}if(c.call(this,h),g&&j0.has(h.type))n.line=l,n.column=u};let m=r.emit;r.emit=function(h,b,x){for(let D=0;Dgz,safe:()=>rl});var lz=43,cz=45,se=(r,t)=>{if(r===P)r=t;if(typeof r==="string"){let i=r.charCodeAt(0);return i>127?32768:i<<8}return r},U0=[[w,w],[w,k],[w,er],[w,xr],[w,"-"],[w,U],[w,B],[w,K],[w,hr],[w,X],[H,w],[H,k],[H,er],[H,xr],[H,"-"],[H,U],[H,B],[H,K],[H,hr],[F,w],[F,k],[F,er],[F,xr],[F,"-"],[F,U],[F,B],[F,K],[F,hr],[K,w],[K,k],[K,er],[K,xr],[K,"-"],[K,U],[K,B],[K,K],[K,hr],["#",w],["#",k],["#",er],["#",xr],["#","-"],["#",U],["#",B],["#",K],["#",hr],["-",w],["-",k],["-",er],["-",xr],["-","-"],["-",U],["-",B],["-",K],["-",hr],[U,w],[U,k],[U,er],[U,xr],[U,U],[U,B],[U,K],[U,"%"],[U,hr],["@",w],["@",k],["@",er],["@",xr],["@","-"],["@",hr],[".",U],[".",B],[".",K],["+",U],["+",B],["+",K],["/","*"]],uz=U0.concat([[w,F],[K,F],[F,F],[H,X],[H,gr],[H,d],[B,B],[B,K],[B,k],[B,"-"],[p,w],[p,k],[p,B],[p,K],[p,F],[p,"-"]]);function J0(r){let t=new Set(r.map(([i,o])=>se(i)<<16|se(o)));return function(i,o,n){let e=se(o,n),l=n.charCodeAt(0);if(l===cz&&o!==w&&o!==k&&o!==hr||l===lz?t.has(i<<16|l<<8):t.has(i<<16|e))this.emit(" ",N,!0);return e}}var gz=J0(U0),rl=J0(uz);var mz=92;function bz(r,t){if(typeof t==="function"){let i=null;r.children.forEach((o)=>{if(i!==null)t.call(this,i);this.node(o),i=o});return}r.children.forEach(this.node,this)}function vz(r){vt(r,(t,i,o)=>{this.token(t,r.slice(i,o))})}function P0(r){let t=new Map;for(let[i,o]of Object.entries(r.node))if(typeof(o.generate||o)==="function")t.set(i,o.generate||o);return function(i,o){let n="",e=0,l={node(g){if(t.has(g.type))t.get(g.type).call(u,g);else throw Error("Unknown node type: "+g.type)},tokenBefore:rl,token(g,c){if(e=this.tokenBefore(e,g,c),this.emit(c,g,!1),g===P&&c.charCodeAt(0)===mz)this.emit(` `,N,!0)},emit(g){n+=g},result(){return n}};if(o){if(typeof o.decorator==="function")l=o.decorator(l);if(o.sourceMap)l=k0(l);if(o.mode in di)l.tokenBefore=di[o.mode]}let u={node:(g)=>l.node(g),children:bz,token:(g,c)=>l.token(g,c),tokenize:vz};return l.node(i),l.result()}}function E0(r){return{fromPlainObject(t){return r(t,{enter(i){if(i.children&&i.children instanceof or===!1)i.children=new or().fromArray(i.children)}}),t},toPlainObject(t){return r(t,{leave(i){if(i.children&&i.children instanceof or)i.children=i.children.toArray()}}),t}}}var{hasOwnProperty:tl}=Object.prototype,Jn=function(){};function K0(r){return typeof r==="function"?r:Jn}function L0(r,t){return function(i,o,n){if(i.type===t)r.call(this,i,o,n)}}function hz(r,t){let i=t.structure,o=[];for(let n in i){if(tl.call(i,n)===!1)continue;let e=i[n],l={name:n,type:!1,nullable:!1};if(!Array.isArray(e))e=[e];for(let u of e)if(u===null)l.nullable=!0;else if(typeof u==="string")l.type="node";else if(Array.isArray(u))l.type="list";if(l.type)o.push(l)}if(o.length)return{context:t.walkContext,fields:o};return null}function $z(r){let t={};for(let i in r.node)if(tl.call(r.node,i)){let o=r.node[i];if(!o.structure)throw Error("Missed `structure` field in `"+i+"` node type definition");t[i]=hz(i,o)}return t}function X0(r,t){let i=r.fields.slice(),o=r.context,n=typeof o==="string";if(t)i.reverse();return function(e,l,u,g){let c;if(n)c=l[o],l[o]=e;for(let m of i){let v=e[m.name];if(!m.nullable||v){if(m.type==="list"){if(t?v.reduceRight(g,!1):v.reduce(g,!1))return!0}else if(u(v))return!0}}if(n)l[o]=c}}function W0({StyleSheet:r,Atrule:t,Rule:i,Block:o,DeclarationList:n}){return{Atrule:{StyleSheet:r,Atrule:t,Rule:i,Block:o},Rule:{StyleSheet:r,Atrule:t,Rule:i,Block:o},Declaration:{StyleSheet:r,Atrule:t,Rule:i,Block:o,DeclarationList:n}}}function q0(r){let t=$z(r),i={},o={},n=Symbol("break-walk"),e=Symbol("skip-node");for(let c in t)if(tl.call(t,c)&&t[c]!==null)i[c]=X0(t[c],!1),o[c]=X0(t[c],!0);let l=W0(i),u=W0(o),g=function(c,m){function v(O,J,q){let E=h.call(I,O,J,q);if(E===n)return!0;if(E===e)return!1;if(x.hasOwnProperty(O.type)){if(x[O.type](O,I,v,D))return!0}if(b.call(I,O,J,q)===n)return!0;return!1}let h=Jn,b=Jn,x=i,D=(O,J,q,E)=>O||v(J,q,E),I={break:n,skip:e,root:c,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof m==="function")h=m;else if(m){if(h=K0(m.enter),b=K0(m.leave),m.reverse)x=o;if(m.visit){if(l.hasOwnProperty(m.visit))x=m.reverse?u[m.visit]:l[m.visit];else if(!t.hasOwnProperty(m.visit))throw Error("Bad value `"+m.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");h=L0(h,m.visit),b=L0(b,m.visit)}}if(h===Jn&&b===Jn)throw Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");v(c)};return g.break=n,g.skip=e,g.find=function(c,m){let v=null;return g(c,function(h,b,x){if(m.call(this,h,b,x))return v=h,n}),v},g.findLast=function(c,m){let v=null;return g(c,{reverse:!0,enter(h,b,x){if(m.call(this,h,b,x))return v=h,n}}),v},g.findAll=function(c,m){let v=[];return g(c,function(h,b,x){if(m.call(this,h,b,x))v.push(h)}),v},g}function fz(r){return r}function xz(r){let{min:t,max:i,comma:o}=r;if(t===0&&i===0)return o?"#?":"*";if(t===0&&i===1)return"?";if(t===1&&i===0)return o?"#":"+";if(t===1&&i===1)return"";return(o?"#":"")+(t===i?"{"+t+"}":"{"+t+","+(i!==0?i:"")+"}")}function wz(r){switch(r.type){case"Range":return" ["+(r.min===null?"-∞":r.min)+","+(r.max===null?"∞":r.max)+"]";default:throw Error("Unknown node type `"+r.type+"`")}}function az(r,t,i,o){let n=r.combinator===" "||o?r.combinator:" "+r.combinator+" ",e=r.terms.map((l)=>si(l,t,i,o)).join(n);if(r.explicit||i)return(o||e[0]===","?"[":"[ ")+e+(o?"]":" ]");return e}function si(r,t,i,o){let n;switch(r.type){case"Group":n=az(r,t,i,o)+(r.disallowEmpty?"!":"");break;case"Multiplier":return si(r.term,t,i,o)+t(xz(r),r);case"Boolean":n="";break;case"Type":n="<"+r.name+(r.opts?t(wz(r.opts),r.opts):"")+">";break;case"Property":n="<'"+r.name+"'>";break;case"Keyword":n=r.name;break;case"AtKeyword":n="@"+r.name;break;case"Function":n=r.name+"(";break;case"String":case"Token":n=r.value;break;case"Comma":n=",";break;default:throw Error("Unknown node type `"+r.type+"`")}return t(n,r)}function Rt(r,t){let i=fz,o=!1,n=!1;if(typeof t==="function")i=t;else if(t){if(o=Boolean(t.forceBraces),n=Boolean(t.compact),typeof t.decorate==="function")i=t.decorate}return si(r,i,o,n)}var N0={offset:0,line:1,column:1};function zz(r,t){let{tokens:i,longestMatch:o}=r,n=o1)m=ro(e||t,"end")||Pn(N0,c),v=Pn(m);else m=ro(e,"start")||Pn(ro(t,"start")||N0,c.slice(0,l)),v=ro(e,"end")||Pn(m,c.substr(l,u));return{css:c,mismatchOffset:l,mismatchLength:u,start:m,end:v}}function ro(r,t){let i=r&&r.loc&&r.loc[t];if(i)return"line"in i?Pn(i):i;return null}function Pn({offset:r,line:t,column:i},o){let n={offset:r,line:t,column:i};if(o){let e=o.split(/\n|\r\n?|\f/);n.offset+=o.length,n.line+=e.length-1,n.column=e.length===1?n.column+o.length:e.pop().length+1}return n}var Ht=function(r,t){let i=kt("SyntaxReferenceError",r+(t?" `"+t+"`":""));return i.reference=t,i},S0=function(r,t,i,o){let n=kt("SyntaxMatchError",r),{css:e,mismatchOffset:l,mismatchLength:u,start:g,end:c}=zz(o,i);return n.rawMessage=r,n.syntax=t?Rt(t):"",n.css=e,n.mismatchOffset=l,n.mismatchLength=u,n.message=r+` syntax: `+n.syntax+` value: `+(e||"")+` --------`+Array(n.mismatchOffset+1).join("-")+"^",Object.assign(n,g),n.loc={source:i&&i.loc&&i.loc.source||"",start:g,end:c},n};var to=new Map,Mt=new Map;var no=_z,nl=Oz;function io(r,t){return t=t||0,r.length-t>=2&&r.charCodeAt(t)===45&&r.charCodeAt(t+1)===45}function V0(r,t){if(t=t||0,r.length-t>=3){if(r.charCodeAt(t)===45&&r.charCodeAt(t+1)!==45){let i=r.indexOf("-",t+2);if(i!==-1)return r.substring(t,i+1)}}return""}function _z(r){if(to.has(r))return to.get(r);let t=r.toLowerCase(),i=to.get(t);if(i===void 0){let o=io(t,0),n=!o?V0(t,0):"";i=Object.freeze({basename:t.substr(n.length),name:t,prefix:n,vendor:n,custom:o})}return to.set(r,i),i}function Oz(r){if(Mt.has(r))return Mt.get(r);let t=r,i=r[0];if(i==="/")i=r[1]==="/"?"//":"/";else if(i!=="_"&&i!=="*"&&i!=="$"&&i!=="#"&&i!=="+"&&i!=="&")i="";let o=io(t,i.length);if(!o){if(t=t.toLowerCase(),Mt.has(t)){let u=Mt.get(t);return Mt.set(r,u),u}}let n=!o?V0(t,i.length):"",e=t.substr(0,i.length+n.length),l=Object.freeze({basename:t.substr(e.length),name:t.substr(i.length),hack:i,vendor:n,prefix:e,custom:o});return Mt.set(r,l),l}var Zt=["initial","inherit","unset","revert","revert-layer"];var Kn=43,Hr=45,il=110,Tt=!0,pz=!1;function el(r,t){return r!==null&&r.type===P&&r.value.charCodeAt(0)===t}function En(r,t,i){while(r!==null&&(r.type===N||r.type===y))r=i(++t);return t}function ht(r,t,i,o){if(!r)return 0;let n=r.value.charCodeAt(t);if(n===Kn||n===Hr){if(i)return 0;t++}for(;t6)return 0}return o}function oo(r,t,i){if(!r)return 0;while(cl(i(t),F0)){if(++r>6)return 0;t++}return t}function ul(r,t){let i=0;if(r===null||r.type!==w||!sr(r.value,0,jz))return 0;if(r=t(++i),r===null)return 0;if(cl(r,Iz)){if(r=t(++i),r===null)return 0;if(r.type===w)return oo(Ln(r,0,!0),++i,t);if(cl(r,F0))return oo(1,++i,t);return 0}if(r.type===U){let o=Ln(r,1,!0);if(o===0)return 0;if(r=t(++i),r===null)return i;if(r.type===K||r.type===U){if(!kz(r,Y0)||!Ln(r,1,!1))return 0;return i+1}return oo(o,i,t)}if(r.type===K)return oo(Ln(r,1,!0),++i,t);return 0}var Uz=["calc(","-moz-calc(","-webkit-calc("],gl=new Map([[k,p],[X,p],[mr,wr],[Z,fr]]);function Yr(r,t){return tr.max&&typeof r.max!=="string")return!0}return!1}function Jz(r,t){let i=0,o=[],n=0;r:do{switch(r.type){case fr:case p:case wr:if(r.type!==i)break r;if(i=o.pop(),o.length===0){n++;break r}break;case k:case X:case mr:case Z:o.push(i),i=gl.get(r.type);break}n++}while(r=t(n));return n}function qr(r){return function(t,i,o){if(t===null)return 0;if(t.type===k&&G0(t.value,Uz))return Jz(t,i);return r(t,i,o)}}function T(r){return function(t){if(t===null||t.type!==r)return 0;return 1}}function Pz(r){if(r===null||r.type!==w)return 0;let t=r.value.toLowerCase();if(G0(t,Zt))return 0;if(Q0(t,"default"))return 0;return 1}function B0(r){if(r===null||r.type!==w)return 0;if(Yr(r.value,0)!==45||Yr(r.value,1)!==45)return 0;return 1}function Ez(r){if(!B0(r))return 0;if(r.value==="--")return 0;return 1}function Kz(r){if(r===null||r.type!==F)return 0;let t=r.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let i=1;iAz,semitones:()=>Mz,resolution:()=>yz,length:()=>Qz,frequency:()=>Bz,flex:()=>Rz,decibel:()=>Hz,angle:()=>Gz});var Qz=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],Gz=["deg","grad","rad","turn"],Az=["s","ms"],Bz=["hz","khz"],yz=["dpi","dpcm","dppx","x"],Rz=["fr"],Hz=["db"],Mz=["st"];function ml(r,t,i){return Object.assign(kt("SyntaxError",r),{input:t,offset:i,rawMessage:r,message:r+` `+t+` --`+Array((i||t.length)+1).join("-")+"^"})}var Zz=9,Tz=10,Cz=12,dz=13,sz=32,H0=new Uint8Array(128).map((r,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0);class bl{constructor(r){this.str=r,this.pos=0}charCodeAt(r){return r=128||H0[t]===0)break}if(this.pos===r)this.error("Expect a keyword");return this.substringToPos(r)}scanNumber(){let r=this.pos;for(;r57)break}if(this.pos===r)this.error("Expect a number");return this.substringToPos(r)}scanString(){let r=this.str.indexOf("'",this.pos+1);if(r===-1)this.pos=this.str.length,this.error("Expect an apostrophe");return this.substringToPos(r+1)}}var r1=9,t1=10,n1=12,i1=13,o1=32,tf=33,fl=35,M0=38,co=39,nf=40,e1=41,of=42,xl=43,wl=44,Z0=45,al=60,hl=62,$l=63,l1=64,Xn=91,Wn=93,uo=123,T0=124,C0=125,d0=8734,s0={" ":1,"&&":2,"||":3,"|":4};function rf(r){let t=null,i=null;if(r.eat(uo),r.skipWs(),t=r.scanNumber(r),r.skipWs(),r.charCode()===wl){if(r.pos++,r.skipWs(),r.charCode()!==C0)i=r.scanNumber(r),r.skipWs()}else i=t;return r.eat(C0),{min:Number(t),max:i?Number(i):0}}function c1(r){let t=null,i=!1;switch(r.charCode()){case of:r.pos++,t={min:0,max:0};break;case xl:r.pos++,t={min:1,max:0};break;case $l:r.pos++,t={min:0,max:1};break;case fl:if(r.pos++,i=!0,r.charCode()===uo)t=rf(r);else if(r.charCode()===$l)r.pos++,t={min:0,max:0};else t={min:1,max:0};break;case uo:t=rf(r);break;default:return null}return{type:"Multiplier",comma:i,min:t.min,max:t.max,term:null}}function $t(r,t){let i=c1(r);if(i!==null){if(i.term=t,r.charCode()===fl&&r.charCodeAt(r.pos-1)===xl)return $t(r,i);return i}return t}function vl(r){let t=r.peek();if(t==="")return null;return $t(r,{type:"Token",value:t})}function u1(r){let t;return r.eat(al),r.eat(co),t=r.scanWord(),r.eat(co),r.eat(hl),$t(r,{type:"Property",name:t})}function g1(r){let t=null,i=null,o=1;if(r.eat(Xn),r.charCode()===Z0)r.peek(),o=-1;if(o==-1&&r.charCode()===d0)r.peek();else if(t=o*Number(r.scanNumber(r)),r.isNameCharCode())t+=r.scanWord();if(r.skipWs(),r.eat(wl),r.skipWs(),r.charCode()===d0)r.peek();else{if(o=1,r.charCode()===Z0)r.peek(),o=-1;if(i=o*Number(r.scanNumber(r)),r.isNameCharCode())i+=r.scanWord()}return r.eat(Wn),{type:"Range",min:t,max:i}}function m1(r){let t,i=null;if(r.eat(al),t=r.scanWord(),t==="boolean-expr"){r.eat(Xn);let o=zl(r,Wn);return r.eat(Wn),r.eat(hl),$t(r,{type:"Boolean",term:o.terms.length===1?o.terms[0]:o})}if(r.charCode()===nf&&r.nextCharCode()===e1)r.pos+=2,t+="()";if(r.charCodeAt(r.findWsEnd(r.pos))===Xn)r.skipWs(),i=g1(r);return r.eat(hl),$t(r,{type:"Type",name:t,opts:i})}function b1(r){let t=r.scanWord();if(r.charCode()===nf)return r.pos++,{type:"Function",name:t};return $t(r,{type:"Keyword",name:t})}function v1(r,t){function i(n,e){return{type:"Group",terms:n,combinator:e,disallowEmpty:!1,explicit:!1}}let o;t=Object.keys(t).sort((n,e)=>s0[n]-s0[e]);while(t.length>0){o=t.shift();let n=0,e=0;for(;n1)r.splice(e,n-e,i(r.slice(e,n),o)),n=e+1;e=-1}}if(e!==-1&&t.length)r.splice(e,n-e,i(r.slice(e,n),o))}return o}function zl(r,t){let i=Object.create(null),o=[],n,e=null,l=r.pos;while(r.charCode()!==t&&(n=$1(r,t)))if(n.type!=="Spaces"){if(n.type==="Combinator"){if(e===null||e.type==="Combinator")r.pos=l,r.error("Unexpected combinator");i[n.value]=!0}else if(e!==null&&e.type!=="Combinator")i[" "]=!0,o.push({type:"Combinator",value:" "});o.push(n),e=n,l=r.pos}if(e!==null&&e.type==="Combinator")r.pos-=l,r.error("Unexpected combinator");return{type:"Group",terms:o,combinator:v1(o,i)||" ",disallowEmpty:!1,explicit:!1}}function h1(r,t){let i;if(r.eat(Xn),i=zl(r,t),r.eat(Wn),i.explicit=!0,r.charCode()===tf)r.pos++,i.disallowEmpty=!0;return i}function $1(r,t){let i=r.charCode();switch(i){case Wn:break;case Xn:return $t(r,h1(r,t));case al:return r.nextCharCode()===co?u1(r):m1(r);case T0:return{type:"Combinator",value:r.substringToPos(r.pos+(r.nextCharCode()===T0?2:1))};case M0:return r.pos++,r.eat(M0),{type:"Combinator",value:"&&"};case wl:return r.pos++,{type:"Comma"};case co:return $t(r,{type:"String",value:r.scanString()});case o1:case r1:case t1:case i1:case n1:return{type:"Spaces",value:r.scanSpaces()};case l1:if(i=r.nextCharCode(),r.isNameCharCode(i))return r.pos++,{type:"AtKeyword",name:r.scanWord()};return vl(r);case of:case xl:case $l:case fl:case tf:break;case uo:if(i=r.nextCharCode(),i<48||i>57)return vl(r);break;default:if(r.isNameCharCode(i))return b1(r);return vl(r)}}function qn(r){let t=new bl(r),i=zl(t);if(t.pos!==r.length)t.error("Unexpected input");if(i.terms.length===1&&i.terms[0].type==="Group")return i.terms[0];return i}var Nn=function(){};function ef(r){return typeof r==="function"?r:Nn}function _l(r,t,i){function o(l){switch(n.call(i,l),l.type){case"Group":l.terms.forEach(o);break;case"Multiplier":case"Boolean":o(l.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw Error("Unknown type: "+l.type)}e.call(i,l)}let n=Nn,e=Nn;if(typeof t==="function")n=t;else if(t)n=ef(t.enter),e=ef(t.leave);if(n===Nn&&e===Nn)throw Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");o(r,i)}var x1={decorator(r){let t=[],i=null;return{...r,node(o){let n=i;i=o,r.node.call(this,o),i=n},emit(o,n,e){t.push({type:n,value:o,node:e?null:i})},result(){return t}}}};function w1(r){let t=[];return vt(r,(i,o,n)=>t.push({type:i,value:r.slice(o,n),node:null})),t}function Ol(r,t){if(typeof r==="string")return w1(r);return t.generate(r,x1)}var G={type:"Match"},R={type:"Mismatch"},go={type:"DisallowEmpty"},a1=40,z1=41;function _r(r,t,i){if(t===G&&i===R)return r;if(r===G&&t===G&&i===G)return r;if(r.type==="If"&&r.else===R&&t===G)t=r.then,r=r.match;return{type:"If",match:r,then:t,else:i}}function cf(r){return r.length>2&&r.charCodeAt(r.length-2)===a1&&r.charCodeAt(r.length-1)===z1}function lf(r){return r.type==="Keyword"||r.type==="AtKeyword"||r.type==="Function"||r.type==="Type"&&cf(r.name)}function ft(r,t=" ",i=!1){return{type:"Group",terms:r,combinator:t,disallowEmpty:!1,explicit:i}}function Sn(r,t,i=new Set){if(!i.has(r))switch(i.add(r),r.type){case"If":r.match=Sn(r.match,t,i),r.then=Sn(r.then,t,i),r.else=Sn(r.else,t,i);break;case"Type":return t[r.name]||r}return r}function Dl(r,t,i){switch(r){case" ":{let o=G;for(let n=t.length-1;n>=0;n--){let e=t[n];o=_r(e,o,R)}return o}case"|":{let o=R,n=null;for(let e=t.length-1;e>=0;e--){let l=t[e];if(lf(l)){if(n===null&&e>0&&lf(t[e-1]))n=Object.create(null),o=_r({type:"Enum",map:n},G,o);if(n!==null){let u=(cf(l.name)?l.name.slice(0,-1):l.name).toLowerCase();if(u in n===!1){n[u]=l;continue}}}n=null,o=_r(l,G,o)}return o}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let o=R;for(let n=t.length-1;n>=0;n--){let e=t[n],l;if(t.length>1)l=Dl(r,t.filter(function(u){return u!==e}),!1);else l=G;o=_r(e,l,o)}return o}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let o=i?G:R;for(let n=t.length-1;n>=0;n--){let e=t[n],l;if(t.length>1)l=Dl(r,t.filter(function(u){return u!==e}),!0);else l=G;o=_r(e,l,o)}return o}}}function _1(r){let t=G,i=Ct(r.term);if(r.max===0){if(i=_r(i,go,R),t=_r(i,null,R),t.then=_r(G,G,t),r.comma)t.then.else=_r({type:"Comma",syntax:r},t,R)}else for(let o=r.min||1;o<=r.max;o++){if(r.comma&&t!==G)t=_r({type:"Comma",syntax:r},t,R);t=_r(i,_r(G,G,t),R)}if(r.min===0)t=_r(G,G,t);else for(let o=0;o=65&&n<=90)n=n|32;if(n!==o)return!1}return!0}function U1(r){if(r.type!==P)return!1;return r.value!=="?"}function bf(r){if(r===null)return!0;return r.type===ir||r.type===k||r.type===X||r.type===mr||r.type===Z||U1(r)}function vf(r){if(r===null)return!0;return r.type===p||r.type===wr||r.type===fr||r.type===P&&r.value==="/"}function J1(r,t,i){function o(){do J++,O=Jq)q=J}function c(){v={syntax:t.syntax,opts:t.syntax.opts||v!==null&&v.opts||null,prev:v},E={type:Il,syntax:t.syntax,token:E.token,prev:E}}function m(){if(E.type===Il)E=E.prev;else E={type:hf,syntax:v.syntax,token:E.token,prev:E};v=v.prev}let v=null,h=null,b=null,x=null,D=0,I=null,O=null,J=-1,q=0,E={type:O1,syntax:null,token:null,prev:null};o();while(I===null&&++Db.tokenIndex)b=x,x=!1}else if(b===null){I=p1;break}t=b.nextState,h=b.thenStack,v=b.syntaxStack,E=b.matchStack,J=b.tokenIndex,O=JJ){while(J":"<'"+t.name+"'>"));if(x!==!1&&O!==null&&t.type==="Type"){if(t.name==="custom-ident"&&O.type===w||t.name==="length"&&O.value==="0"){if(x===null)x=e(t,b);t=R;break}}c(),t=tr.matchRef||tr.match;break}case"Keyword":{let A=t.name;if(O!==null){let tr=O.value;if(tr.indexOf("\\")!==-1)tr=tr.replace(/\\[09].*$/,"");if(pl(tr,A)){g(),t=G;break}}t=R;break}case"AtKeyword":case"Function":if(O!==null&&pl(O.value,t.name)){g(),t=G;break}t=R;break;case"Token":if(O!==null&&O.value===t.value){g(),t=G;break}t=R;break;case"Comma":if(O!==null&&O.type===ir)if(bf(E.token))t=R;else g(),t=vf(O)?R:G;else t=bf(E.token)||vf(O)?G:R;break;case"String":let L="",V=J;for(;VP1,isProperty:()=>E1,isKeyword:()=>K1,getTrace:()=>$f});function $f(r){function t(n){if(n===null)return!1;return n.type==="Type"||n.type==="Property"||n.type==="Keyword"}function i(n){if(Array.isArray(n.match)){for(let e=0;ei.type==="Type"&&i.name===t)}function E1(r,t){return kl(this,r,(i)=>i.type==="Property"&&i.name===t)}function K1(r){return kl(this,r,(t)=>t.type==="Keyword")}function kl(r,t,i){let o=$f.call(r,t);if(o===null)return!1;return o.some(i)}function ff(r){if("node"in r)return r.node;return ff(r.match[0])}function xf(r){if("node"in r)return r.node;return xf(r.match[r.match.length-1])}function Jl(r,t,i,o,n){function e(u){if(u.syntax!==null&&u.syntax.type===o&&u.syntax.name===n){let g=ff(u),c=xf(u);r.syntax.walk(t,function(m,v,h){if(m===g){let b=new or;do{if(b.appendData(v.data),v.data===c)break;v=v.next}while(v!==null);l.push({parent:h,nodes:b})}})}if(Array.isArray(u.match))u.match.forEach(e)}let l=[];if(i.matched!==null)e(i.matched);return l}var{hasOwnProperty:Yn}=Object.prototype;function Pl(r){return typeof r==="number"&&isFinite(r)&&Math.floor(r)===r&&r>=0}function wf(r){return Boolean(r)&&Pl(r.offset)&&Pl(r.line)&&Pl(r.column)}function L1(r,t){return function(o,n){if(!o||o.constructor!==Object)return n(o,"Type of node should be an Object");for(let e in o){let l=!0;if(Yn.call(o,e)===!1)continue;if(e==="type"){if(o.type!==r)n(o,"Wrong node type `"+o.type+"`, expected `"+r+"`")}else if(e==="loc"){if(o.loc===null)continue;else if(o.loc&&o.loc.constructor===Object)if(typeof o.loc.source!=="string")e+=".source";else if(!wf(o.loc.start))e+=".start";else if(!wf(o.loc.end))e+=".end";else continue;l=!1}else if(t.hasOwnProperty(e)){l=!1;for(let u=0;!l&&u");else throw Error("Wrong value `"+n+"` in `"+t+"` structure definition")}return i.join(" | ")}function X1(r,t){let i=t.structure,o={type:String,loc:!0},n={type:'"'+r+'"'};for(let e in i){if(Yn.call(i,e)===!1)continue;let l=o[e]=Array.isArray(i[e])?i[e].slice():[i[e]];n[e]=af(l,r+"."+e)}return{docs:n,check:L1(r,o)}}function zf(r){let t={};if(r.node){for(let i in r.node)if(Yn.call(r.node,i)){let o=r.node[i];if(o.structure)t[i]=X1(i,o);else throw Error("Missed `structure` field in `"+i+"` node type definition")}}return t}function El(r,t,i){let o={};for(let n in r)if(r[n].syntax)o[n]=i?r[n].syntax:Rt(r[n].syntax,{compact:t});return o}function W1(r,t,i){let o={};for(let[n,e]of Object.entries(r))o[n]={prelude:e.prelude&&(i?e.prelude.syntax:Rt(e.prelude.syntax,{compact:t})),descriptors:e.descriptors&&El(e.descriptors,t,i)};return o}function q1(r){for(let t=0;t{return i[o]=this.createDescriptor(t.descriptors[o],"AtruleDescriptor",o,r),i},Object.create(null)):null}}addProperty_(r,t){if(!t)return;this.properties[r]=this.createDescriptor(t,"Property",r)}addType_(r,t){if(!t)return;this.types[r]=this.createDescriptor(t,"Type",r)}checkAtruleName(r){if(!this.getAtrule(r))return new Ht("Unknown at-rule","@"+r)}checkAtrulePrelude(r,t){let i=this.checkAtruleName(r);if(i)return i;let o=this.getAtrule(r);if(!o.prelude&&t)return SyntaxError("At-rule `@"+r+"` should not contain a prelude");if(o.prelude&&!t){if(!dt(this,o.prelude,"",!1).matched)return SyntaxError("At-rule `@"+r+"` should contain a prelude")}}checkAtruleDescriptorName(r,t){let i=this.checkAtruleName(r);if(i)return i;let o=this.getAtrule(r),n=no(t);if(!o.descriptors)return SyntaxError("At-rule `@"+r+"` has no known descriptors");if(!o.descriptors[n.name]&&!o.descriptors[n.basename])return new Ht("Unknown at-rule descriptor",t)}checkPropertyName(r){if(!this.getProperty(r))return new Ht("Unknown property",r)}matchAtrulePrelude(r,t){let i=this.checkAtrulePrelude(r,t);if(i)return Fr(null,i);let o=this.getAtrule(r);if(!o.prelude)return Fr(null,null);return dt(this,o.prelude,t||"",!1)}matchAtruleDescriptor(r,t,i){let o=this.checkAtruleDescriptorName(r,t);if(o)return Fr(null,o);let n=this.getAtrule(r),e=no(t);return dt(this,n.descriptors[e.name]||n.descriptors[e.basename],i,!1)}matchDeclaration(r){if(r.type!=="Declaration")return Fr(null,Error("Not a Declaration node"));return this.matchProperty(r.property,r.value)}matchProperty(r,t){if(nl(r).custom)return Fr(null,Error("Lexer matching doesn't applicable for custom properties"));let i=this.checkPropertyName(r);if(i)return Fr(null,i);return dt(this,this.getProperty(r),t,!0)}matchType(r,t){let i=this.getType(r);if(!i)return Fr(null,new Ht("Unknown type",r));return dt(this,i,t,!1)}match(r,t){if(typeof r!=="string"&&(!r||!r.type))return Fr(null,new Ht("Bad syntax"));if(typeof r==="string"||!r.match)r=this.createDescriptor(r,"Type","anonymous");return dt(this,r,t,!1)}findValueFragments(r,t,i,o){return Jl(this,t,this.matchProperty(r,t),i,o)}findDeclarationValueFragments(r,t,i){return Jl(this,r.value,this.matchDeclaration(r),t,i)}findAllFragments(r,t,i){let o=[];return this.syntax.walk(r,{visit:"Declaration",enter:(n)=>{o.push.apply(o,this.findDeclarationValueFragments(n,t,i))}}),o}getAtrule(r,t=!0){let i=no(r);return(i.vendor&&t?this.atrules[i.name]||this.atrules[i.basename]:this.atrules[i.name])||null}getAtrulePrelude(r,t=!0){let i=this.getAtrule(r,t);return i&&i.prelude||null}getAtruleDescriptor(r,t){return this.atrules.hasOwnProperty(r)&&this.atrules.declarators?this.atrules[r].declarators[t]||null:null}getProperty(r,t=!0){let i=nl(r);return(i.vendor&&t?this.properties[i.name]||this.properties[i.basename]:this.properties[i.name])||null}getType(r){return hasOwnProperty.call(this.types,r)?this.types[r]:null}validate(){function r(u,g){return g?`<${u}>`:`<'${u}'>`}function t(u,g,c,m){if(c.has(g))return c.get(g);if(c.set(g,!1),m.syntax!==null)_l(m.syntax,function(v){if(v.type!=="Type"&&v.type!=="Property")return;let h=v.type==="Type"?u.types:u.properties,b=v.type==="Type"?o:n;if(!hasOwnProperty.call(h,v.name))i.push(`${r(g,c===o)} used missed syntax definition ${r(v.name,v.type==="Type")}`),c.set(g,!0);else if(t(u,v.name,b,h[v.name]))i.push(`${r(g,c===o)} used broken syntax definition ${r(v.name,v.type==="Type")}`),c.set(g,!0)},this)}let i=[],o=new Map,n=new Map;for(let u in this.types)t(this,u,o,this.types[u]);for(let u in this.properties)t(this,u,n,this.properties[u]);let e=[...o.keys()].filter((u)=>o.get(u)),l=[...n.keys()].filter((u)=>n.get(u));if(e.length||l.length)return{errors:i,types:e,properties:l};return null}dump(r,t){return{generic:this.generic,cssWideKeywords:this.cssWideKeywords,units:this.units,types:El(this.types,!t,r),properties:El(this.properties,!t,r),atrules:W1(this.atrules,!t,r)}}toString(){return JSON.stringify(this.dump())}}function Kl(r,t){if(typeof t==="string"&&/^\s*\|/.test(t))return typeof r==="string"?r+t:t.replace(/^\s*\|\s*/,"");return t||null}function _f(r,t){let i=Object.create(null);for(let[o,n]of Object.entries(r))if(n){i[o]={};for(let e of Object.keys(n))if(t.includes(e))i[o][e]=n[e]}return i}function Qn(r,t){let i={...r};for(let[o,n]of Object.entries(t))switch(o){case"generic":i[o]=Boolean(n);break;case"cssWideKeywords":i[o]=r[o]?[...r[o],...n]:n||[];break;case"units":i[o]={...r[o]};for(let[e,l]of Object.entries(n))i[o][e]=Array.isArray(l)?l:[];break;case"atrules":i[o]={...r[o]};for(let[e,l]of Object.entries(n)){let u=i[o][e]||{},g=i[o][e]={prelude:u.prelude||null,descriptors:{...u.descriptors}};if(!l)continue;g.prelude=l.prelude?Kl(g.prelude,l.prelude):g.prelude||null;for(let[c,m]of Object.entries(l.descriptors||{}))g.descriptors[c]=m?Kl(g.descriptors[c],m):null;if(!Object.keys(g.descriptors).length)g.descriptors=null}break;case"types":case"properties":i[o]={...r[o]};for(let[e,l]of Object.entries(n))i[o][e]=Kl(i[o][e],l);break;case"scope":case"features":i[o]={...r[o]};for(let[e,l]of Object.entries(n))i[o][e]={...i[o][e],...l};break;case"parseContext":i[o]={...r[o],...n};break;case"atrule":case"pseudo":i[o]={...r[o],..._f(n,["parse"])};break;case"node":i[o]={...r[o],..._f(n,["name","structure","parse","generate","walkContext"])};break}return i}function Of(r){let t=g0(r),i=q0(r),o=P0(r),{fromPlainObject:n,toPlainObject:e}=E0(i),l={lexer:null,createLexer:(u)=>new Fn(u,l,l.lexer.structure),tokenize:vt,parse:t,generate:o,walk:i,find:i.find,findLast:i.findLast,findAll:i.findAll,fromPlainObject:n,toPlainObject:e,fork(u){let g=Qn({},r);return Of(typeof u==="function"?u(g):Qn(g,u))}};return l.lexer=new Fn({generic:r.generic,cssWideKeywords:r.cssWideKeywords,units:r.units,types:r.types,atrules:r.atrules,properties:r.properties,node:r.node},l),l}var Ll=(r)=>Of(Qn({},r));var Df={generic:!0,cssWideKeywords:["initial","inherit","unset","revert","revert-layer"],units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( )","alpha-value":"|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|","asin()":"asin( )","atan()":"atan( )","atan2()":"atan2( , )",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?",axis:"block|inline|x|y","baseline-position":"[first|last]? baseline","basic-shape":"||||||","bg-image":"none|","bg-layer":"|| [/ ]?||||||||","bg-position":"[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]","bg-size":"[|auto]{1,2}|cover|contain","blur()":"blur( )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( )","calc()":"calc( )","calc-sum":" [['+'|'-'] ]*","calc-product":" ['*' |'/' ]*","calc-value":"||||( )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"|","cf-mixing-image":"?&&","circle()":"circle( []? [at ]? )","clamp()":"clamp( #{3} )","class-selector":"'.' ","clip-source":"",color:"|currentColor||||<-non-standard-color>","color-stop":"|","color-stop-angle":"{1,2}","color-stop-length":"{1,2}","color-stop-list":"[ [, ]?]# , ","color-interpolation-method":"in [| ?|]",combinator:"'>'|'+'|'~'|['|' '|']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[? *]!","compound-selector-list":"#","complex-selector":" [? ]*","complex-selector-list":"#","conic-gradient()":"conic-gradient( [from ]? [at ]? , )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[|contents||||||]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"","contrast()":"contrast( [] )","cos()":"cos( )",counter:"|","counter()":"counter( , ? )","counter-name":"","counter-style":"|symbols( )","counter-style-name":"","counters()":"counters( , , ? )","cross-fade()":"cross-fade( , ? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( {2,3} ? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( , [first|start|last|first-except]? )|element( )","ellipse()":"ellipse( [{2}]? [at ]? )","ending-shape":"circle|ellipse","env()":"env( , ? )","exp()":"exp( )","explicit-track-list":"[? ]+ ?","family-name":"|+","feature-tag-value":" [|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":" '{' '}'","feature-value-block-list":"+","feature-value-declaration":" : + ;","feature-value-declaration-list":"","feature-value-name":"","fill-rule":"nonzero|evenodd","filter-function":"|||||||||","filter-function-list":"[|]+","final-bg-layer":"<'background-color'>|||| [/ ]?||||||||","fixed-breadth":"","fixed-repeat":"repeat( [] , [? ]+ ? )","fixed-size":"|minmax( , )|minmax( , )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|","frequency-percentage":"|","general-enclosed":"[ ? )]|[( ? )]","generic-family":"|||<-non-standard-generic-family>","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"|fill-box|stroke-box|view-box",gradient:"||||||<-legacy-gradient>","grayscale()":"grayscale( )","grid-line":"auto||[&&?]|[span&&[||]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( [/ ]? )|hsl( , , , ? )","hsla()":"hsla( [/ ]? )|hsla( , , , ? )",hue:"|","hue-rotate()":"hue-rotate( )","hue-interpolation-method":"[shorter|longer|increasing|decreasing] hue","hwb()":"hwb( [|none] [|none] [|none] [/ [|none]]? )","hypot()":"hypot( # )",image:"||||||","image()":"image( ? [? , ?]! )","image-set()":"image-set( # )","image-set-option":"[|] [||type( )]","image-src":"|","image-tags":"ltr|rtl","inflexible-breadth":"|min-content|max-content|auto","inset()":"inset( {1,4} [round <'border-radius'>]? )","invert()":"invert( )","keyframes-name":"|","keyframe-block":"# { }","keyframe-block-list":"+","keyframe-selector":"from|to|| ","lab()":"lab( [||none] [||none] [||none] [/ [|none]]? )","layer()":"layer( )","layer-name":" ['.' ]*","lch()":"lch( [||none] [||none] [|none] [/ [|none]]? )","leader()":"leader( )","leader-type":"dotted|solid|space|","length-percentage":"|","light-dark()":"light-dark( , )","line-names":"'[' * ']'","line-name-list":"[|]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"|thin|medium|thick","linear-color-hint":"","linear-color-stop":" ?","linear-gradient()":"linear-gradient( [[|to ]||]? , )","log()":"log( , ? )","mask-layer":"|| [/ ]?||||||[|no-clip]||||","mask-position":"[|left|center|right] [|top|center|bottom]?","mask-reference":"none||","mask-source":"","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( #{6} )","matrix3d()":"matrix3d( #{16} )","max()":"max( # )","media-and":" [and ]+","media-condition":"|||","media-condition-without-or":"||","media-feature":"( [||] )","media-in-parens":"( )||","media-not":"not ","media-or":" [or ]+","media-query":"|[not|only]? [and ]?","media-query-list":"#","media-type":"","mf-boolean":"","mf-name":"","mf-plain":" : ","mf-range":" ['<'|'>']? '='? | ['<'|'>']? '='? | '<' '='? '<' '='? | '>' '='? '>' '='? ","mf-value":"|||","min()":"min( # )","minmax()":"minmax( [|min-content|max-content|auto] , [||min-content|max-content|auto] )","mod()":"mod( , )","name-repeat":"repeat( [|auto-fill] , + )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen","namespace-prefix":"","ns-prefix":"[|'*']? '|'","number-percentage":"|","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"|even|odd","opacity()":"opacity( [] )","overflow-position":"unsafe|safe","outline-radius":"|","page-body":"? [; ]?| ","page-margin-box":" '{' '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[#]?","page-selector":"+| *","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [ ,]? )","paint()":"paint( , ? )","perspective()":"perspective( [|none] )","polygon()":"polygon( ? , [ ]# )","polar-color-space":"hsl|hwb|lch|oklch",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]","pow()":"pow( , )","pseudo-class-selector":"':' |':' ')'","pseudo-element-selector":"':' |","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [||]? [at ]? , )",ratio:" [/ ]?","ray()":"ray( &&?&&contain?&&[at ]? )","ray-size":"closest-side|closest-corner|farthest-side|farthest-corner|sides","rectangular-color-space":"srgb|srgb-linear|display-p3|a98-rgb|prophoto-rgb|rec2020|lab|oklab|xyz|xyz-d50|xyz-d65","relative-selector":"? ","relative-selector-list":"#","relative-size":"larger|smaller","rem()":"rem( , )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from ]? [at ]? , )","repeating-linear-gradient()":"repeating-linear-gradient( [|to ]? , )","repeating-radial-gradient()":"repeating-radial-gradient( [||]? [at ]? , )","reversed-counter-name":"reversed( )","rgb()":"rgb( {3} [/ ]? )|rgb( {3} [/ ]? )|rgb( #{3} , ? )|rgb( #{3} , ? )","rgba()":"rgba( {3} [/ ]? )|rgba( {3} [/ ]? )|rgba( #{3} , ? )|rgba( #{3} , ? )","rotate()":"rotate( [|] )","rotate3d()":"rotate3d( , , , [|] )","rotateX()":"rotateX( [|] )","rotateY()":"rotateY( [|] )","rotateZ()":"rotateZ( [|] )","round()":"round( ? , , )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( )","scale()":"scale( [|]#{1,2} )","scale3d()":"scale3d( [|]#{3} )","scaleX()":"scaleX( [|] )","scaleY()":"scaleY( [|] )","scaleZ()":"scaleZ( [|] )","scroll()":"scroll( [||]? )",scroller:"root|nearest|self","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"|closest-side|farthest-side","sign()":"sign( )","skew()":"skew( [|] , [|]? )","skewX()":"skewX( [|] )","skewY()":"skewY( [|] )","sepia()":"sepia( )",shadow:"inset?&&{2,4}&&?","shadow-t":"[{2,3}&&?]",shape:"rect( , , , )|rect( )","shape-box":"|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( )","single-animation":"<'animation-duration'>||||<'animation-delay'>||||||||||[none|]||","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|||","single-transition":"[none|]||