CLAUDE.md
.claude/CLAUDE.mdCLAUDE.md
Quality
97/100
Scores the file, not the repository.Length
564 words
7 headings · 1 code blocksRepository
107k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# Supabase Monorepo23pnpm 11 + Turborepo monorepo. Requires Node >= 22.13.45## Structure67| Directory | Purpose |8| ------------------------ | --------------------------------------------------------------------------- |9| `apps/studio` | Supabase Studio/Dashboard — has its own `apps/studio/CLAUDE.md` (see below) |10| `apps/docs` | Documentation site — Next.js app router, MDX (port 3001) |11| `apps/www` | Marketing website — Next.js, app + pages (port 3000) |12| `apps/design-system` | Component demos — source of truth for Studio UI patterns (port 3003) |13| `apps/ui-library` | shadcn-style registry site for Supabase UI blocks (port 3004) |14| `apps/lite-studio` | Lightweight Studio — different stack: React Router 7 + Vite + Tailwind v4 |15| `packages/ui` | Shared UI components (shadcn/ui based) — `import { Button } from 'ui'` |16| `packages/ui-patterns` | Composite components — subpath imports, e.g. `ui-patterns/AssistantChat` |17| `packages/common` | Shared utils, telemetry constants, feature flags |18| `packages/api-types` | Generated platform Management API types |19| `packages/pg-meta` | SQL builders for Postgres introspection (`SafeSqlFragment`) |20| `packages/shared-data` | Static data: pricing, plans, regions, error codes |21| `e2e/studio`, `e2e/docs` | Playwright E2E tests |22| `supabase/` | Local Supabase project: edge functions, migrations, config.toml |2324## Common Commands2526```bash27pnpm dev:studio # run Studio dev server → http://localhost:808228pnpm dev:docs # run docs dev server29pnpm dev:www # run www dev server30pnpm test:studio # Studio unit tests (vitest)31pnpm e2e # Studio E2E tests (playwright)32pnpm build --filter=studio # build Studio33pnpm lint --filter=studio # lint Studio34pnpm typecheck # typecheck all packages35pnpm format # Prettier write (check: pnpm test:prettier)36pnpm generate:types # local DB types → supabase/functions/common/database-types.ts37pnpm api:codegen # platform Management API types → packages/api-types38```3940## CI4142Every PR must pass typecheck + lint (one workflow), Prettier, and a typos check. Other checks are path-filtered: Studio unit tests/build and the lint ratchet (ESLint warning count must not increase) run on `apps/studio/**` changes; app-specific test suites run on their own paths.4344Never hand-edit generated files: `packages/api-types/types/**`, `**/routeTree.gen.ts`, `**/__generated__/**`, `apps/docs/features/docs/generated/**`, `apps/www/.generated/**`, `supabase/functions/common/database-types.ts`.4546## Conventions4748**UI** — import from `'ui'`; primitives are shadcn/ui-based and exported unsuffixed (`Input`, `Select`, `Form`, …). Use `Button` — the in-house component and the standard everywhere (a raw shadcn `Button_Shadcn_` also exists but is rarely the right choice). Check `packages/ui/index.tsx` before creating new primitives. Higher-level patterns live in `packages/ui-patterns`.4950**Styling** — Tailwind only, semantic tokens (`bg-muted`, `text-foreground-light`), no hardcoded colors.5152**Exports** — named exports only; default exports are allowed only where a framework requires them (`pages/**`, `app/**`, config files — the eslint preset has the exact carve-out list). Lint-enforced across all apps via `eslint-config-supabase` (severity `warn` everywhere; hard-enforced in Studio by the lint ratchet).5354**Language** — Use U.S. English everywhere.5556## Skills5758The skills in `.claude/skills/` are the source of truth for conventions — load the relevant ones before working, don't guess:5960- `copywriting` — any user-facing text, anywhere in the monorepo61- `docs-content` — anything under `apps/docs`62- `telemetry-standards` — PostHog events, `packages/common/telemetry-constants.ts`63- `dev-toolbar-review` — `packages/dev-tools`, `packages/common/posthog-client.ts`, `packages/common/feature-flags.tsx`64- `safe-sql-execution` — any code that builds or executes SQL against user databases65- `react-hook-form` — writing or modifying any form code, anywhere in the monorepo66- `vitest` / `vercel-composition-patterns` — generic unit-testing and React composition references6768## Studio6970Before working on anything in `apps/studio`, read `apps/studio/CLAUDE.md` if it isn't already in context — it maps Studio tasks to required skills and covers the TanStack Start migration rules.71
Also in supabase/supabase
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| supabase/supabase.claude/skills/vercel-composition-patterns/AGENTS.md · 107k | AGENTS.md | styleapiuido-not | 45/100 | 3 days ago | |
| supabase/supabase.github/copilot-instructions.md · 107k | Copilot instructions | lint-formatstylegitagent-behaviour | 56/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-composition-patterns.instructions.md · 107k | Copilot instructions | stylegitapiui+1 | 61/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-copy.instructions.md · 107k | Copilot instructions | uiagent-behaviourdocs | 25/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-e2e-tests.instructions.md · 107k | Copilot instructions | teststyletesting-strategygit+2 | 60/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-error-handling.instructions.md · 107k | Copilot instructions | gitdo-not | 57/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-shadcn-components.instructions.md · 107k | Copilot instructions | gituido-not | 55/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-shortcuts.instructions.md · 107k | Copilot instructions | stylegitdo-not | 61/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-telemetry.instructions.md · 107k | Copilot instructions | stylegitdo-notdocs | 65/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-testing.instructions.md · 107k | Copilot instructions | testtypestesting-strategygit+1 | 55/100 | 3 days ago | |
| supabase/supabaseapps/studio/CLAUDE.md · 107k | CLAUDE.md | testlint-formatstyletesting-strategy+1 | 81/100 | 3 days ago |
Diff against .claude/skills/vercel-composition-patterns/AGENTS.md Diff against .github/copilot-instructions.md Diff against .github/instructions/studio-composition-patterns.instructions.md Diff against .github/instructions/studio-copy.instructions.md Diff against .github/instructions/studio-e2e-tests.instructions.md Diff against .github/instructions/studio-error-handling.instructions.md Diff against .github/instructions/studio-shadcn-components.instructions.md Diff against .github/instructions/studio-shortcuts.instructions.md Diff against .github/instructions/studio-telemetry.instructions.md Diff against .github/instructions/studio-testing.instructions.md Diff against apps/studio/CLAUDE.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| dotCMS/corecore-web/CLAUDE.md · 950 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| microsoft/playwrightCLAUDE.md · 94k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 3 days ago | |
| filamentphp/filamentCLAUDE.md · 32k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| dotCMS/coreCLAUDE.md · 950 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | 3 days ago | |
| lollipopkit/flutter_server_boxCLAUDE.md · 8.3k | CLAUDE.md | buildteststylearch+2 | 98/100 | 3 days ago |
