## Problem
Agents have no single index of the docs markdown exports, unlike the
KB's `sitemap.md`. www's `/llms.txt` and `/llms-full.txt` also read docs
files from disk, which forces www's build to wait on the docs build.
## Solution
**docs**
- Add `build:markdown-sitemap`, which writes
`public/markdown/sitemap.md`. It scans `public/markdown/**/*.md` and
lists each file as `[title](url.md)`. Guide URLs are
`/docs/guides/<page>.md` and the rest are `/docs/markdown/<page>.md`,
built with the existing `internal-links` helpers.
- Add `build:markdown-full`, which writes `public/markdown/full.md`. It
concatenates the same files.
- Both scripts share one file-list helper
(`internals/markdown-files.ts`), so they always cover the same files and
exclude `sitemap.md` and `full.md`.
- Both tasks depend on `build:markdown` and are wired into `build` in
turbo.
- Search v2 ingestion and the `docs.tar.gz` archive now ignore both
files.
**www**
- `/llms.txt` and `/llms-full.txt` now fetch `sitemap.md` and `full.md`
from `NEXT_PUBLIC_DOCS_URL`, replacing only their docs parts. Pricing,
product overviews, agent resources, the KB link and the customer stories
link are unchanged. If docs is unreachable, the docs section is left out
instead of returning a 404.
- Remove the on-disk docs reads, the `outputFileTracingIncludes`
entries, and the `docs#build:guides-markdown` dependency and docs input
globs from www's turbo config. These routes were the only link between
www and the docs build. `turbo-build.test.ts` is updated to match.
- Add a `/docs.md` → `/docs/markdown/sitemap.md` redirect, next to the
existing `/kb.md` one.
Routes without a markdown export are not patched, they are simply absent
from the sitemap.
## Review instructions
From the Docs preview link:
1. Open /docs/markdown/sitemap.md it should show a file with all links
to the docs pages available in markdown
1. Open /docs/markdown/full.md it should show a file with all the
content from all the pages
Sadly, only after deployed...
1. www project should return the content of both files when:
a. supabase.com/llms.txt is queried should return docs sitemap.md
content
b. supabase.com/llms-full.txt is queried should return docs full.md
content
1. supabase.com/docs.md should return sitemap.md file
## Checklist
Check all before review:
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
## Problem
`apps/www/lib/redirects.js` was a single file with static and dynamic
rules mixed together, and the redirects had no automated checks. `/docs`
redirects already moved to `apps/docs/lib/redirects/`, so www was the
odd one out.
## Solution
I applied the docs layout to www without changing how redirects are
served:
- `apps/www/lib/redirects/static-redirects.json`: 220 one-to-one
entries, including fixed redirects to external `https://` URLs.
- `apps/www/lib/redirects/dynamic-redirects.js`: 14 entries with params,
splats, regex, escapes, or `has`.
- `apps/www/lib/redirects/index.js`: combines both (static first) for
`next.config.mjs` and `scripts/generateMdContent.mjs`.
- `apps/www/lib/redirects/redirects.test.ts`: checks for loops, chains,
duplicate sources, invalid sources and destinations (anchors, missing
`/` or `https://`), dynamic entries in the static file, and internal
destinations that do not exist.
- README for the folder, plus updates to `apps/www/README.md`,
`DEVELOPERS.md`, `CODEOWNERS`, and the `www-tests` path filter and
sparse checkout.
Bulk redirects are not part of this PR: www has 234 redirects, well
under the route limit, so they stay in `next.config.mjs`.
### Missing-destination check
Internal destinations are checked against the same sources the site
serves from:
- `app/` and `pages/` routes, and `public/` files.
- Blog, customer, event, and alternative slugs, derived the way
`lib/posts.tsx` derives them. Events with `disable_page_build` do not
count.
- Feature and `/go` page slugs.
- `.md` destinations must be a page that `generateMdContent.mjs`
publishes. An existing HTML page is not enough.
- `/docs/guides` destinations, against the docs content and guide
routes.
Other zones and build-generated files are not checked. A destination
with params is probed with one sample value, so value-specific loops or
chains are not caught. The README lists these limits.
### Behavior notes
- The rule set matches `master`, with one exception:
`/blog/2021/07/30/1-the-supabase-hackathon` now points at the canonical
slug `/blog/1-the-supabase-hackathon`. The old destination
`/blog/the-supabase-hackathon` also resolves today, because the blog
route matches posts by filename suffix. The check requires canonical
slugs.
- First-match results on `supabase.com` are identical on 241 probe
paths.
- Static entries now precede dynamic ones. On the `supabase.design`
host, 25 static sources that used to sit after its catch-all rule now
come before it. Those paths now take two hops to reach the design system
instead of one.
- Comments on static entries were dropped, because JSON has no comments.
## To test
1. Open the www preview and visit `/about`. It redirects to `/company`.
2. Visit `/buildersday`. It redirects to `/builderday`.
3. Visit `/sign-in`. It redirects to the dashboard sign-in page.
4. Visit `/blog/2021/07/30/1-the-supabase-hackathon`. It lands on the
hackathon post.
## Linear
- fixes GROWTH-1571
<!-- claude-slack-attribution -->
_Requested by **Nicole Kramer** · [Slack
thread](https://supabase.slack.com/archives/C0161K73J1J/p1795012270095809)_
**Before:** The SLA page (`/sla`) opened by incorporating "the
Subscription Agreement between Supabase, Inc. and Customer" for
"Enterprise Customers", and it was listed under Customer Legal Resources
on the Legal Hub and indexable by search engines.
**After:** The SLA page incorporates the Enterprise SaaS Subscription
Agreement (linked at https://supabase.com/enterprise-terms, or such
other agreement entered into between Supabase and Customer) and applies
to "Customers subscribed to an Enterprise Plan". The page is no longer
listed on the Legal Hub and is `noindex, nofollow`, so it is reachable
only by direct URL, like `/enterprise-terms`.
Updates the SLA preamble wording as provided by Legal and hides `/sla`
from the Legal Hub and search engines.
## Solution
- `apps/www/data/legal/sla/v1.mdx`: replaced the opening paragraph with
Legal's wording. The text is unchanged except that the quoted term uses
straight quotes (`the "Agreement"`) to match the rest of the file. The
URL is a bare URL, which remark-gfm autolinks, the same way
`enterprise-terms` MDX does. The SLA is a single `v1.mdx` with no
version selector or effective date, so it is edited in place and no
versioning is introduced.
- `apps/www/pages/legal/index.tsx`: removed the SLA entry from the
Customer Legal Resources links, the same way `/enterprise-terms` is
absent from the hub.
- `apps/www/pages/sla.tsx`: added `noindex: true` and `nofollow: true`
to the `NextSeo` meta, plus a short comment matching the one in
`supplemental-terms.tsx`.
- `apps/www/next.config.mjs`: added an `X-Robots-Tag: noindex, nofollow`
header rule for `/sla`, next to the existing `/enterprise-terms` rule.
Other pages that link to `/sla` (the Support Policy and a few docs
guides) are intentionally unchanged, since direct links keep working.
`generate-sitemap.mjs` has no exclusion for `/enterprise-terms`, so none
was added for `/sla` either.
## Review instructions
1. Open `/legal` on the preview and confirm Service Level Agreement is
no longer listed under Customer Legal Resources.
2. Open `/sla` on the preview and confirm the first paragraph matches
the new wording and that "https://supabase.com/enterprise-terms" is a
working link.
3. Check the `/sla` response has `X-Robots-Tag: noindex, nofollow` and
the page has a `noindex, nofollow` robots meta tag.
## Checklist
Check all before review:
- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
---
_Generated by [Claude
Code](https://claude.ai/code/session_01VBvtQVPkbcDz2ojrwur2SF)_
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.
YES
## Problem
www sends no `Content-Security-Policy`, `X-Frame-Options`,
`X-Content-Type-Options`, or `Referrer-Policy` headers on its pages.
Only HSTS is set.
The first version of this PR added these headers on `/(.*)`. That turned
out to be unsafe, because www is the zone router: `lib/rewrites.js`
proxies Studio (`/dashboard`), docs, the UI library, the design system,
the knowledge base, and other apps, and the header rules in
`next.config.mjs` also apply to those proxied responses. A CSP there
would add a second enforced policy on top of each app's own headers, and
`X-Frame-Options: DENY` would break the UI library previews, which
iframe `/library/example/*`.
## Solution
The headers are built in `apps/www/lib/security-headers.js` and spread
into `headers()` in `next.config.mjs`.
**Scope**
- The rules apply only to paths that www serves itself. The proxied path
prefixes come from `lib/rewrites.js`, so a new zone rewrite is excluded
automatically.
- On those paths: `X-Frame-Options: SAMEORIGIN`,
`X-Content-Type-Options: nosniff`, `Referrer-Policy:
strict-origin-when-cross-origin`, and an enforced CSP.
**CSP (script-focused)**
- `script-src` allows `'self'`, `'unsafe-inline'`, and an explicit list
of the third-party script hosts that www pages load: GTM through Stape,
PostHog, Usercentrics, tweet embeds, HubSpot, hCaptcha, Default.com, Buy
with AWS, and a path-scoped jsDelivr entry for unicornstudio. Each entry
has a comment that names its user.
- `'unsafe-inline'` stays, because the Next.js inline scripts need a
nonce otherwise, and a nonce needs dynamic rendering.
- `object-src 'none'`, `base-uri 'self'`, `form-action 'self'`,
`frame-ancestors 'self'`.
- Removed from the earlier version: `unpkg.com` (only used inside a blog
code block, and anyone can publish scripts there), `*.vercel.app` (any
Vercel app), `frontend-assets.supabase.com` (www serves its assets from
the same origin), and the duplicate `script-src-elem`.
**`'unsafe-eval'`**
- Off by default.
- Allowed only on the pages that evaluate MDX on the client with
`next-mdx-remote-client`: `/changelog`, `/customers/[slug]`,
`/events/[slug]`, `/alternatives/[slug]`, and
`/partners/catalog/[slug]`. Removing it there would break those pages.
- Allowed in development, because Next.js needs it there.
**Preview and staging**
- Detection matches Studio's CSP: `NEXT_PUBLIC_VERCEL_ENV === 'preview'`
or `NEXT_PUBLIC_ENVIRONMENT` of `local` or `staging`. It no longer
depends on `NEXT_PUBLIC_IS_PLATFORM`.
- On preview and staging, the Vercel toolbar and the staging PostHog
host are added.
- The PostHog origin also comes from `NEXT_PUBLIC_POSTHOG_HOST`, the
same value the client uses.
**Tests**
`lib/security-headers.test.ts` covers the policy for each environment,
the proxied prefixes from the real rewrites, and the header sources. The
sources are compiled with the same path-to-regexp build and options that
Next.js uses.
## Review instructions
1. Open the preview and accept cookie consent so GTM and PostHog load.
2. Open DevTools → Console and filter on `Content-Security-Policy`.
3. Visit these pages and confirm there are no violations:
- home
- a blog post with a tweet embed (`/blog/launch-week-5-community-day`)
- `/changelog`
- a `/customers/...` page
- `/state-of-startups`
- `/contact/sales`
- `/aws-marketplace`
- a `/go` page with a HubSpot form
4. Run `curl -sI <preview>/` and check the four headers. Run `curl -sI
<preview>/changelog` and check that the CSP includes `'unsafe-eval'`.
5. Run `curl -sI <preview>/dashboard` and `curl -sI <preview>/library`
and check that they have no www CSP or `X-Frame-Options`.
6. Confirm `/dashboard` and `/library` still load.
## Checklist
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Removes the dead Cloudflare R2 asset upload and asset CDN code from
Studio, docs and www. Every app now behaves as it did with
`FORCE_ASSET_CDN=-1`: Vercel serves assets from the default path.
Also fixes `.github/workflows/zizmor.yml` to download zizmor with `gh
release download`: `curl -sSLO` saved GitHub error pages as the archive,
which broke the attestation check.
> [!WARNING]
> Remove `FORCE_ASSET_CDN` from Vercel only after this deploys.
**Worth a close look**
- `apps/studio/vite.config.ts`: `SKIP_ASSET_UPLOAD` is kept because it
still gates Sentry source map upload.
- `apps/studio/turbo.jsonc`: `AWS_ACCESS_KEY_ID` /
`AWS_SECRET_ACCESS_KEY` are kept because the Bedrock credential chain
(`lib/ai/bedrock.ts`) can fall back to them.
## To test
- [ ] On the Vercel previews for studio, docs and www, open a page with
DevTools: JS, CSS and fonts load from the app's own origin
(`/dashboard/assets/…` or `/dashboard/_vercel/immutable/…` for Studio,
`/docs/_next/static/…` for docs, `/_next/static/…` for www), with no
404s or CSP errors in the console.
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
I added an AI catalog pointer to the homepage, following agentready.org
practice AR-FIND-04: a `<link rel="ai-catalog">` tag in the head and a
matching entry in the existing `Link` header on `/`. I also bumped the
MCP server card from 0.15.0 to 0.16.1, the latest
`@supabase/mcp-server-supabase` release.
**Note:** Both point at `/.well-known/ai-catalog.json`, the path the
spec names, which is our rewrite alias for `ard.json`.
## To test
Tested on the PR preview:
- [x] `curl -sI <preview>/`, expect a `link` header carrying both
`rel="api-catalog"` and `rel="ai-catalog"`
- [x] `curl -s <preview>/`, expect `<link rel="ai-catalog"
href="/.well-known/ai-catalog.json"/>` before `</head>`
- [x] `curl -s <preview>/.well-known/mcp/server-card.json`, expect
`"version": "0.16.1"`
## Linear
- fixes GROWTH-1469
## Problem
The Supabase CLI's config, project-config and `supabase.lock` JSON
schemas declare `$id`s under
`https://supabase.com/schemas/<name>/v<N>.json`, and editors such as
Even Better TOML fetch them from the `$schema` URL. Nothing is served at
that path yet, so those URLs 404.
## Solution
- Adds `apps/www/public/schemas` with v1 of the three schemas. They're
generated in supabase/cli, and from now on its stable releases open a PR
here when one changes (supabase/cli#7397)
- `/schemas/:path*` responses send `access-control-allow-origin: *` and
`cache-control: public, max-age=3600`, so browser-based editors and
validators can fetch them and a new release shows up within the hour.
Covered in `next.config.test.ts`
- `/apps/www/public/schemas/ @supabase/cli` in CODEOWNERS, so the CLI
team reviews those release PRs
- The folder is in `.prettierignore`. The CLI publishes these files byte
for byte, so reformatting them here would show up as a change on every
release
## Review instructions
1. Open `/schemas/config/v1.json` on the www preview
2. Check it returns the schema as JSON, with
`access-control-allow-origin: *` and the cache header (`curl -sI
<preview>/schemas/config/v1.json`)
Closes CLI-2865
## Problem
Several:
- using above recommended # of redirects in the apps/www configuration
-- currently around ~1275, so 275 above the recommended limit -- which
leads to degraded performance for _every_ request going through the
first zone (including the dashboard, I'd think).
```
www:build: www:build:next: Warning: total number of custom routes
exceeds 1000, this can reduce performance. Route counts:
```
- We want to add more redirects over time. The current approach doesn't
allow us to do so without cost.
- No ability to test docs redirects in previews, which makes reviewing
and merging in changes riskier than it should be. The fact that we _can_
test the changes in this PR is a huge improvement.
## Solution
Diff approach, but related to #51193
Moves docs redirects into the docs app directly, splitting them between
[next.config.mjs](https://vercel.com/docs/routing/redirects/configuration-redirects)
(dynamic) and [Vercel's bulk
redirects](https://vercel.com/docs/routing/redirects/bulk-redirects)
(static).
```txt
apps/
├── docs/
│ ├── lib/
│ │ └── redirects/
│ │ ├── README.md # process and rules for adding redirects
│ │ ├── static-redirects.json # source: one-to-one /docs entries (hand-edited)
│ │ ├── dynamic-redirects.js # conditional /docs entries + dev/preview rules
│ │ └── generated/
│ │ └── static-redirects-md-variants.json # .md guides variants generated in pre-build
```
B/c this -- in itself -- also puts us above the 1000 redirects,
separates out redirects based on their _type_:
- Dynamic redirects, live in a .js folder -> referenced in
next.config.mjs. These are not support
- Static redirects live in a json folder (required for Vercel bulk
redirects) -> then referenced in the vercel.json config
Also adds `.md` variant logic to both -- we can actually see a _lot_ of
these paths are hit within analytics. Quick sample over the past 24
hours:
```
path, code, # of hits
/docs/guides/monitoring-and-debugging.md 308 1768
/docs/guides/api/api-keys.md 308 722
/docs/guides/auth/server-side/nextjs.md 307 381
/docs/guides/auth/social-login/auth-google.md 308 231
/docs/guides/getting-started/mcp.md 308 218
/kb/troubleshooting/formatting-support-requests-for-faster-resolution.md 308 159
/docs/guides/troubleshooting/formatting-support-requests-for-faster-resolution-616717.md 308 156
/docs/guides/local-development/overview.md 308 139
/docs/guides/telemetry/logs.md 308 129
/kb/sitemap.md 308 117
/docs/guides/auth/social-login/auth-apple.md 308 103
/kb/troubleshooting/rotating-anon-service-and-jwt-secrets-1Jq6yd.md 308 97
```
The exact method for generating these .md variants could use a sanity
check:
- Dynamic - follows the existing logic from the apps/www
- Static - adds a prebuild script to automatically create .md variants
for `/docs/guides` links. I _think_ this will work even though the
output is gitignored by default... but remains to be seen.
## Preview links
- [Dynamic path, no
.md](https://docs-git-kody-devrel-723-redirects-rework-supabase.vercel.app/docs/guides/reports/reports)
- [Dynamic path,
.md](https://docs-git-kody-devrel-723-redirects-rework-supabase.vercel.app/docs/guides/reports/reports.md)
- [Static path, no
.md](https://docs-git-kody-devrel-723-redirects-rework-supabase.vercel.app/docs/guides/api/joins-and-nesting)
- [Static path,
.md](https://docs-git-kody-devrel-723-redirects-rework-supabase.vercel.app/docs/guides/api/joins-and-nesting.md)
## Builds
<img width="1128" height="289" alt="image"
src="https://github.com/user-attachments/assets/3cbbb111-e7b8-4922-ba8c-23cbc0bb3ddc"
/>
## Go-live
- [ ] Sign off on restructure from Growth Eng + Docs team.
- [ ] Reviewer double-check with agent that a) this contains largely the
same set as the current set in www and b) that these resolve to 200s.
For a, there are a few small differences due to cleanup + re-ordering
redirects that didn't previously work.
- [ ] In the docs project, purchase a batch of 25,000 bulk redirects in
Vercel (builds fail if you don't have the quota with `Bulk redirects
limit exceeded. Attempting to add 1,013 redirects to a deployment, but
only 1,000 available. Visit
https://vercel.com/supabase/docs/settings/advanced#bulk-redirects to
increase bulk redirects capacity.`)
- [ ] Move the disabled redirects back into the main folder, and confirm
builds work.
- [x] Update `write-the-docs` skill to mention redirects
---------
Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
## Problem
The marketing site (`apps/www`) is still on Next.js 15. Resolves
FE-4673.
## Solution
Upgrades `apps/www` to Next.js 16.3.6 (`next` now uses the workspace
catalog; `@next/mdx` and `@next/bundle-analyzer` are bumped to match).
Fixes for breaking changes: `middleware.ts` renamed to `proxy.ts`,
removed the `eslint` key from `next.config.mjs`, moved Sentry options
under `webpack`, and added `images.localPatterns` and
`images.qualities`. `dev` and `build:next` now run with `--webpack`,
because the MDX remark plugins have non-serializable options and
`esmExternals: 'loose'` is ignored by Turbopack.
## Review instructions
1. Run `pnpm --filter=www typecheck` and `pnpm --filter=www test`.
2. Run `pnpm dev:www` and open `/pricing` and `/blog/vector-buckets`;
both should render, including images.
3. Check the Vercel preview build. Locally, `next build` needed
`NODE_OPTIONS=--max-old-space-size=8192`, so confirm memory is
sufficient. `proxy.ts` now runs on the Node.js runtime instead of edge.
## Checklist
Check all before review:
- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
## Problem
The website initializes Sentry only on the server and edge runtimes,
leaving browser crashes unreported. Its crash-reporting setup also needs
the same consent and third-party filtering policy that docs and Studio
otherwise maintain separately.
## Fix
Add www browser initialization and tagged crash capture for both Next.js
routers, with accessible fallback focus. Move the shared
consent/platform and third-party filtering into common/sentry, reuse it
from all three apps, and remove the duplicated docs/www helpers and
tests. Preserve each app's initialization and Studio's additional noise
filtering, sampling, and sanitization.
Include the source-map upload token in www's build cache inputs, and
trigger the shared/www and Studio test workflows when the shared policy
changes.
## How to test
- Run `pnpm --filter www test ../../packages/common/sentry.test.ts
lib/sentry-capture.test.tsx`: all 22 shared-policy and real-SDK capture
tests passed locally.
- Run `pnpm --filter studio exec vitest run
lib/sentry-client-options.test.ts`: all 42 Studio options and
policy-parity tests passed locally.
- The www capture tests exercise the actual initializer and both router
handlers with an in-memory transport, verify crash tags and fallback
focus, and enforce consent. Removing initialization, capture calls,
boundary tags, or consent gating was verified to fail these tests.
- On a www preview with its DSN configured, accept telemetry consent and
trigger temporary render errors in both routers. Verify they reach the
www Sentry project with the boundary tag and readable stack traces.
Formatting passes. Full local app typechecks encounter existing
dependency/generated-file drift, with no diagnostics in changed files.
Three unchanged TanStack mock call-count tests fail locally and
reproduce against the pre-refactor implementation. Live Sentry ingestion
and source-map uploads remain deployment checks.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Accessibility**
- Error pages now automatically move focus to a clearly labeled error
message, helping screen-reader and keyboard users understand when a page
fails.
- **Reliability**
- Browser error reporting now captures application crashes more
consistently across supported page types and navigation transitions.
- Reporting respects consent and platform availability while filtering
unrelated third-party failures.
- **Testing**
- Expanded automated coverage for error capture, reporting rules,
consent handling, and accessible error-page behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Nonexistent paths return a real 404 everywhere, but always with an HTML
body, even when the client asked for markdown via `Accept:
text/markdown` or a `.md` suffix. Middleware can't fix this: it gates on
a static slug allowlist and can't know a path will 404. I added two
`fallback` rewrites (`.md` suffix; Accept header containing
`text/markdown` or `text/*`) that run only after every route has failed
to match and route the request to a small `md-404` handler returning a
short markdown 404 pointing at /docs, /sitemap.xml, and /llms.txt. Real
pages are structurally unaffected.
**Note:** `lib/rewrites.js` is untouched (the plain rewrites array
became the `afterFiles` phase), so #49587 merges independently. I
updated next.config.test.ts's rewrites assertion for the phased shape;
it now also pins the two fallback rules.
## To test
I verified on the Vercel preview:
- [x] `curl -s -D - -H "Accept: text/markdown"
<preview>/definitely-not-a-page` (404, `Content-Type: text/markdown`,
body with the three pointers)
- [x] Same URL with a browser Accept header (existing HTML 404,
unchanged)
- [x] `curl -s -D - <preview>/definitely-not-a-page.md` (markdown 404)
- [x] `curl -s -D - -H "Accept: text/markdown" <preview>/auth` (200
markdown, unchanged) and `<preview>/support` (200 HTML, unchanged)
- [x] `/homepage.md` still 308s to `/index.md` (redirects phase wins);
`Accept: text/*` gets the markdown 404, matching real-page negotiation
Known boundary: `/changelog/<unknown>` keeps the HTML 404 body
(pages-router `fallback: 'blocking'` routes take priority over fallback
rewrites per Next docs); the status is still 404, verified on the
preview.
## Linear
- fixes GROWTH-1142
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added Markdown-formatted 404 responses for unmatched documentation and
`.md` page requests.
- Included helpful documentation links in not-found responses.
- Requests that explicitly accept Markdown now receive a consistent
Markdown response.
- Added appropriate response headers for security, caching, and content
variation.
- **Bug Fixes**
- Improved routing for unmatched Markdown paths, ensuring they are
handled by the appropriate not-found response instead of returning an
unexpected format.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
In this PR:
- The `llms.ts` script is removed from the pipeline. It was just
iterating over the sections of the SDK JSON files to generate _dummy_
text files for LLMS to consume. But with a lot of inconsistencies and
mistakes.
- There's a new script that builds markdown files from the SDK
definition files.
- The Management API now has a definition file too, it was missing
before.
- On the www project now there are redirects for the reference text
files to the new markdown files in the docs project.
- NPM scripts have received better names so that prebuild ones are
smaller and all are easier to differentiate.
## Problem
We added support for `*.md` guides in our docs, but our redirects don't
apply to them. This means that when we directly link to a guide using
the `.md` extension and that guide gets renamed or deleted, the links
begin to 404.
This happened already once in our agent-skills where we linked to
`https://supabase.com/docs/guides/database/data-api.md` which was
deleted and moved yesterday to
`https://supabase.com/docs/guides/api/securing-your-api.md`. Note that
there was a redirect on the regular path `/docs/guides/database/data-api
-> /docs/guides/api/securing-your-api`, but this didn't apply to the
`.md` version.
## Fix
This PR adds rules to redirect all the `/docs/guides/**/*.md` files to
their respective pages. Rather than manually duplicating all our
existing (and future) redirects by hand for `.md`, this dynamically
generates the `.md` redirect rules based on the path. Specifically it
assumes that all redirect rules under `/docs/guides` support the `.md`
extension, so it generates a redirect for all of these rules
automatically.
## How to test
Use curl to confirm that `.md` redirects are applied:
```shell
curl -I https://zone-www-dot-com-git-fix-doc-markdown-redirects-supabase.vercel.app/docs/guides/database/data-api.md
HTTP/2 308
cache-control: public, max-age=0, must-revalidate
content-type: text/plain
date: Wed, 29 Apr 2026 17:35:58 GMT
location: /docs/guides/api/securing-your-api.md
...
```
You can also verify that this didn't previously work:
```shell
curl -I https://supabase.com/docs/guides/database/data-api.md
HTTP/2 404
age: 0
cache-control: public, max-age=0, must-revalidate
content-type: text/plain;charset=UTF-8
date: Wed, 29 Apr 2026 17:38:00 GMT
...
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Enhanced documentation route redirects to support markdown file
extensions for guides, ensuring proper navigation for both standard and
markdown-variant paths.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- change changelog.md formatting
- make changelog entries slugs more descriptive (eg
/changelog/123-new-change)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Updated changelog entry URLs to use slug-based identifiers instead of
numeric IDs for improved readability and SEO-friendliness, with
automatic redirects for existing links.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary
Adds `/<page>.md` routes for 10 marketing/product pages (homepage, auth,
database, edge-functions, realtime, storage, vector, pricing,
modules/cron, modules/queues) so AI agents can fetch clean markdown
instead of parsing JS-rendered HTML. Also advertises the markdown
alternate via `<link rel="alternate" type="text/markdown">` on marketing
and docs pages so agents can discover it.
Pricing is generated dynamically via `generatePricingContent()` (single
source of truth with `/llms.txt` and `/llms-full.txt`); the other nine
slugs are bundled at build time from `content/md/*.md` into a
`MD_CONTENT` map.
Supersedes #44891 (rebased fresh off current master to avoid a 9-commit
replay over rename/rename conflicts created by #44897).
## Changes
- New `/api-v2/md/[...slug]` route handler returns the bundled markdown
(or dynamic pricing) with `Content-Type: text/markdown`,
`X-Content-Type-Options: nosniff`, and appropriate cache headers
- Middleware rewrites `/<slug>.md` and `Accept: text/markdown` to the
API route for the `MD_PAGES` allowlist; trailing-slash variants
(`/auth/`) are normalized so they resolve the same as `/auth`
- Build-time codegen `scripts/generateMdContent.mjs` scans `content/md/`
and emits `app/api-v2/md/content.generated.ts` exporting both
`MD_CONTENT` (Map) and `MD_PAGES` (Set, incl. dynamic `pricing`). Fails
the build on slug collision between `content/md/` and `DYNAMIC_SLUGS`.
Adding a new marketing `.md` is just dropping a file in `content/md/`
(also update `PRODUCT_OVERVIEW_LINKS` in `/llms.txt` since that list is
editorial).
- 8 permanent redirects `/llms/<product>.txt` → `/<product>.md` so
legacy URLs in caches and downstream `llms.txt` copies keep working
- `/llms.txt` product overview now references `.md` URLs (incl.
`modules/cron`, `modules/queues`); `/llms-full.txt` iterates
`MD_CONTENT.values()` (homepage first, then alphabetical) and appends
dynamic pricing
- `/llms/[slug]` route slimmed to proxy SDK reference files (`js.txt`,
`dart.txt`, etc.) since redirects handle product slugs and pricing;
pricing branch retained as fallback in case redirects are bypassed
- `apps/www/pages/_app.tsx` injects the alternate link conditionally
based on `MD_PAGES`; `/pricing` (app router) sets it via page metadata
- `apps/docs/app/page.tsx` (the `/docs` root) sets the text/markdown
alternate to `/llms-full.txt`; per-guide pages override with their
specific `.md` URL via `genGuideMeta` in `GuidesMdx.utils.tsx`. Other
docs pages (reference, troubleshooting) inherit nothing.
- `apps/www/.vercelignore`: replaces the prior `*.md`/`README.md` rules
with `*.md` + `!content/md/**/*.md` so Edge Function READMEs and future
scratch `.md` files aren't silently shipped to the build artifact
- Drops `apps/www/data/llms/*.txt` and the related
`outputFileTracingIncludes`
- Test coverage for the new middleware branches: `.md` suffix rewrite
(allowlisted vs. fall-through), `Accept: text/markdown` content
negotiation, trailing-slash normalization
## Testing (Vercel preview)
Local dev server smoke tests passing on `:3771` after each iteration.
Re-verified on the preview URL after the latest hardening commit:
- [x] `curl -I https://<preview>/llms/auth.txt` — expect `308 Permanent
Redirect` to `/auth.md`
- [x] `curl https://<preview>/auth.md | head -3` — expect `# Supabase
Auth`
- [x] `curl https://<preview>/pricing.md | head -3` — expect `# Supabase
Pricing` with current tier values
- [x] `curl https://<preview>/modules/cron.md | head -3` — expect `#
Supabase Cron`
- [x] `curl -H 'Accept: text/markdown' https://<preview>/ | head -3` —
expect `# Supabase` (homepage.md)
- [x] `curl https://<preview>/llms.txt` — Product Overview section lists
`.md` URLs and includes Cron + Queues
- [x] `curl https://<preview>/llms-full.txt | grep -E '^# Supabase
(Cron\|Queues\|Pricing)'` — Cron and Pricing each match once; Queues
matches twice (marketing module + existing docs guide)
- [x] View source on `/`, `/pricing`, `/database` — expect `<link
rel="alternate" type="text/markdown" href="/<slug>.md">`
- [x] View source on `/docs` — expect `<link rel="alternate"
type="text/markdown" href="/llms-full.txt">`
- [x] View source on a docs guide page (e.g., `/docs/guides/auth`) —
expect per-guide `.md` alternate; reference/troubleshooting pages should
NOT emit a markdown alternate
- [x] `curl -I https://<preview>/auth.md` — expect
`X-Content-Type-Options: nosniff`
- [x] `curl -I -L -H 'Accept: text/markdown' https://<preview>/auth/` —
should resolve to markdown content (trailing-slash normalization, with
Vercel's auto-redirect)
## Linear
- fixes GROWTH-760
## Follow-up (separate PR)
GROWTH-760 also asks about extending `.md` to blog/customers/events.
Different mechanism (path-prefix middleware, MDX read at request time
via `gray-matter`) so it deserves its own review. Will open a follow-up
PR after this lands.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Serve prebuilt and dynamic Markdown docs via new markdown endpoints
and routing; pages now advertise markdown alternates (including
pricing).
* Added Cron and Queues module documentation pages.
* **Documentation**
* Minor formatting tweaks to Realtime and Storage docs.
* **Chores**
* Added build-time Markdown content generation and adjusted
ignore/deploy rules for generated files.
* Added redirects from legacy text-based product URLs to new markdown
pages.
* **Tests**
* Expanded tests for markdown routing and content-negotiation behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.
YES
## What kind of change does this PR introduce?
Updated terms on the the site
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Added a new Enterprise SaaS Subscription Agreement page presenting
comprehensive legal terms. The agreement covers subscription
definitions, access and usage policies, customer responsibilities,
support obligations, confidentiality requirements, data security
standards, intellectual property rights, warranties, indemnification
clauses, liability limitations, termination conditions, and dispute
resolution provisions. The page includes the last modified date for
reference.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Adds a `/.well-known/api-catalog` to advertise our management API.
Motivation is for agents, but this is generally part of [RFC
9727](https://www.rfc-editor.org/rfc/rfc9727).
## Testing
Make an HTTP request to `/.well-known/api-catalog` and confirm it
returns the JSON content with content type `application/linkset+json`:
```shell
curl -i https://zone-www-dot-com-git-feat-agent-catalog-supabase.vercel.app/.well-known/api-catalog
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added a public API catalog (linkset) exposing API metadata, OpenAPI
endpoint, documentation and status links.
* Added HTTP headers to advertise the API catalog from the site root and
to serve the catalog with the correct content type.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
The docs build had a fragile implicit dependency on www's filesystem
(`../../../apps/www/public/llms`), flagged by the docs team in #44670.
Rather than formalising that dependency with a shared package, this PR
eliminates it entirely by making www the sole owner of llms content
assembly.
**How it works now:**
`/llms/[slug]` handles all `/llms/*.txt` requests via a 3-step cascade:
1. Dynamic content — `pricing.txt` generated at request time from
`shared-data` imports
2. Local file — product overviews read from `data/llms/`
3. Docs proxy — reference docs (guides, js, dart, etc.) fetched from the
docs app
No hardcoded slug lists, so adding new content just works.
**What changed:**
- `apps/docs/scripts/llms.ts` trimmed to only generate per-source
reference files — www now owns `llms.txt`, `llms-full.txt`, and product
overviews
- Removed `generateLlmsPricing.mjs` build script — pricing generated
dynamically from `shared-data`
- Removed llms rewrites from `rewrites.js` — routes handle everything
with consistent `Cache-Control: public, s-maxage=3600,
stale-while-revalidate=86400`
- Product overview `.txt` files moved from `public/llms/` → `data/llms/`
so all requests go through routes for consistent caching
**Docs team concerns from GROWTH-773:**
| Concern | Resolution |
|---------|-----------|
| Docs build depends on www files at a fragile relative path | Path
removed — docs no longer reads from www |
| www restructuring breaks docs with no obvious connection | Eliminated
— no cross-app filesystem dependency |
| No build order enforcement between www and docs | Not needed — docs
doesn't depend on www's build output |
## To test
- `curl <preview>/llms.txt` — markdown index with doc + product overview
links
- `curl <preview>/llms-full.txt` — combined product overviews + docs
content
- `curl <preview>/llms/pricing.txt` — dynamically generated pricing
tables
- `curl <preview>/llms/auth.txt` — product overview from local file
- `curl <preview>/llms/guides.txt` — proxied from docs app
- `curl <preview>/llms/nonexistent.txt` — 404
- Verify `Cache-Control` header on all responses
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.
YES/NO
## What kind of change does this PR introduce?
Bug fix, feature, docs update, ...
## What is the current behavior?
Please link any relevant issues here.
## What is the new behavior?
Feel free to include screenshots if it includes visual changes.
## Additional context
Add any other context or screenshots.
## Context
Update next.config in `www` to
- set `x-robots-tag` to `all` for `/docs` and `/blog`
- set `x-robots-tag` to `noindex` for `/dashboard`
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Enabled search engine indexing for documentation and blog pages
(X‑Robots-Tag: all).
* Marked dashboard pages to be excluded from search engine indexing
(X‑Robots-Tag: noindex).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This PR removes the `payload` `cms` app that was added for the marketing
blog posts. We never started using it, it just adds additional work in
keeping the dependencies updated.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Removed the CMS application and associated infrastructure, including
configuration files, build scripts, and environment management.
* Simplified project build configuration and removed CMS-related
dependencies from deployment workflows.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This PR removes all CMS code from the `www` app. This includes fetching
of blog posts, API routes for proxying blog posts and types.
All functionality should remain the same (and the number of blog posts
should be the same).
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Removed CMS integration, APIs, preview/draft/revalidate endpoints,
related env vars and dependency; switched to static markdown-only blog
pipeline.
* **Refactor**
* Simplified image and author resolution, tightened component props to
static post shapes, and migrated imports to path aliases.
* **Documentation**
* Deleted CMS integration docs and rich-text conversion helpers.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
It's possible for individual PRs to pass typechecking, while the merge
result fails it. To prevent errors from getting into production, we can
fail the prod build if typecheck fails. Typecheck is still ignored on
preview builds for efficiency, since those are blocked on the GitHub
typecheck Action.
* show cms blog posts in www
* remove contentlayer from www
* outputFileTracingExcludes
* update remotePatterns
* fetch cms posts server-side with revalidation
* add cms env vars to turbo.json
* add www env vars to turbo.json
* include cms posts in www sitemap
* add migration to remove image from cms post
* update cms meta image mapping in www
* Set up Sentry for www
* Add Sentry captureEExceptions to API routes in www
* Prettier
* Fix TS
* Address feedback
* Clean
* Remove SENTRY_AUTH_TOKEN from turbo.json
* Bump nextjs in the ui-library.
* Bump the nextjs in design-system.
* Bump nextjs to v15 in www.
* Bump the next version in the pnpm catalog.
* Switch all apps to using the catalog version of next.
* Fix ui-lib and design-system to build with next 15.
* Fix some prettier errors.
* Bump the next-eslint package.
* Fix a lint issue about a component starting with underscore.
* Use the catalog version of next in cms app.
* Disable turbo for dev command in www. Remove obsolete experimental flags.
* Return some of the experimental flags.
* Consolidate different versions of postcss. Remove @mertasan/tailwindcss-variables from ui package.
* Bump vitest in pg-meta to remove a vulnerable version of vite.
* Bump dompurify.
* Bump all octokit deps to solve 2 vulns.
* Fix warnings about destructuring json imports.
* Remove a console.log in docs.
* Fix the changelog page to use an ESM import.
* Stabilize the generate-sitemap script output.
* Try another fix for the changelog.
* Added hsts header via vercel.json
* Migrate headers to next.config.js
* only apply hsts headers when running on vercel
* remove is platform check from docs
* Moved hsts header to root path
* Removed debugging header
* revert environment check on www header
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com>
* initial test.
* Add base path to the rewrites.
* Remove base path from the source rewrite.
* Another try.
* Another try.
* another try.
* Try another magic.
* Add try/catch to the flag processing code.
* Revert some of the unneeded changes.
* Fix the api route for flags.
* Remove vercel/toolbar for local dev.
* Try using a static file for toolbar config.
* Add a well known flags file in the www app.
* Add headers to interpret vercel/flags as json.
* Another try.
* Fix the json formatting.
* Add headers for the vercel/flags route in the www app.
* Change to force studio to deploy.
* add contentlayer2 to www
* remove authorURL from blog post meta
* latest blog posts in Developers dropdown menu
* parse blog slug in contentlayer
* change next config plugins order
* contentlayer build in www package.json
* contentlayer2
* contentlayer2 build on typecheck in www
* remove comment
* Update package-lock.json
* revert npm package version
* Update package-lock.json
---------
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
* move to shared types
* Rename the package to api-types.
* Fix a forgotten dependency.
* Add more forgotten deps.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* feat: add new Icons package
* Create README.md
* add more icons
* add "Home" icon and "Postgres" icon
* reduce helpers
* remove old files
* make dev deps
* Delete package-lock.json
* Update README.md
* add to packages for other apps
* remove from db.design
* Update README.md
* Move the build-icons package in the packages folder.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>