## Problem
We're building the site for Supabase Builder Day: 14 cities, one day, 10
December. It's its own Next.js app on Vercel (on the Supabase team) and
right now it only lives at `builderday.vercel.app`.
We want it at **supabase.com/builderday** so the links on the Luma pages
and in our emails point at a Supabase address, and so builders can sign
in with the Supabase account they already have instead of making a new
one.
## Solution
- `zoneRewrites('/builderday', ...)` in `apps/www/lib/rewrites.js`, the
same way `/library` and `/design-system` are served, so RSC prefetches
go through too.
- The app runs with `basePath: '/builderday'`, so its `/_next` assets
and `/api` routes stay under the prefix and don't collide with www's.
- `/builder-day` redirects to `/builderday`.
- A test next to the InstantDB one in `next.config.test.ts`.
**Depends on:** supabase/Builderday#5, which adds the base path on our
side. Until that's merged, `/builderday` returns 404.
## Review instructions
1. `cd apps/www && pnpm vitest run next.config.test.ts`
2. Once supabase/Builderday#5 is live, open `/builderday` on the www
preview: the Builder Day page loads, with no 404s for `/_next` or `/api`
in the network tab.
3. `/builder-day` redirects to `/builderday`.
4. `/dashboard`, `/docs` and `/library` still work.
## Checklist
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
## Problem
- link prefetch on `supabase.com/docs` returns 404
- a prefetch of `/docs/guides/auth/architecture` returns 404 through www
and 200 on the docs deployment
- the www rewrite forwards the request as
`<page>.segments/_tree.segment.rsc` and keeps the prefetch header, so
docs adds the suffix again
- likely happened after next 16 migrations
## Solution
- adds www rewrites that forward a docs prefetch as the page path, so
docs adds the `.segments` suffix one time
- fixes client navigation to the docs home, because docs serves its root
as `index.rsc` and www asked for `docs.rsc`
- adds a test that fails when a docs prefetch path reaches the generic
`/docs/:path*` rule first
| build | click before the prefetch ends | click after the prefetch ends
|
| --- | --- | --- |
| before (`supabase.com`) | 106 to 146 ms | 102 to 137 ms, the prefetch
returns 404 so the click sends a request |
| after (preview with this fix) | 124 to 169 ms | **14 to 46 ms**, the
click sends no request |
| check | before | after |
| --- | --- | --- |
| segment prefetch of a guide page | 404 | 200 |
| segment prefetch of the docs home | 404 | 200 |
| client navigation to the docs home (`RSC: 1`) | 404 | 200 |
| probe checks that pass | 4 of 8 | 8 of 8 |
each run used a fresh browser profile and started on
`/docs/guides/auth/passwords`. each click went to the same 4 sidebar
links, which start out of view. the time stops when the new `h1` shows.
the after numbers come from a test preview of www with this fix, which
forwards to the same docs deployment
<!--
## Preview links
If relevant, include links to changed pages for easy review access.
Copy the preview base URL from the Vercel bot comment on this PR. Use
the following table as an example template.
| Site | Live | Preview | Search for |
| -------------- |
-------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------
| ----------------------------- |
| WWW | [/blog/your-post](https://supabase.com/blog/your-post) |
[/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post)
| unique phrase from the change |
| Docs |
[/docs/guides/your-page](https://supabase.com/docs/guides/your-page) |
[/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page)
| unique phrase from the change |
| Studio | [/dashboard](https://supabase.com/dashboard) |
[/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard)
| unique phrase from the change |
| Design system | [/design-system](https://supabase.com/design-system) |
[/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system)
| unique phrase from the change |
| UI library | [/library](https://supabase.com/library) |
[/library](https://ui-library-git-branch-name-supabase.vercel.app/library)
| unique phrase from the change |
| Knowledge base |
[/kb/guides/your-page](https://supabase.com/kb/guides/your-page) |
[/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page)
| unique phrase from the change |
-->
<!-- ## Additional context
Optionally add any other context or screenshots.
-->
## Review instructions
the `/docs` rewrites run only in production builds, so steps 4 to 7 use
`supabase.com`
1. run `pnpm --filter www exec vitest run next.config.test.ts` and make
sure that all tests pass
2. run `git checkout origin/master -- apps/www/lib/rewrites.js`, run the
test again and make sure that the new test fails
3. run `git checkout HEAD -- apps/www/lib/rewrites.js` to restore the
fix
4. before the deploy, run the command below and make sure that it prints
`404`
```sh
curl -s -o /dev/null -w '%{http_code}\n' -H 'RSC: 1' -H
'Next-Router-Prefetch: 1' -H 'Next-Router-Segment-Prefetch: /_tree'
https://supabase.com/docs/guides/auth/architecture
```
5. after the deploy, run the same command and make sure that it prints
`200`
6. after the deploy, run `curl -s -o /dev/null -w '%{http_code}\n' -H
'RSC: 1' https://supabase.com/docs` and make sure that it prints `200`
7. open [/docs/guides/auth](https://supabase.com/docs/guides/auth),
click a sidebar link and make sure that the page opens without a full
reload
## Checklist
Check all before review:
- [x] 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)
Proxies `supabase.com/migrate/instantdb` to the InstantDB migration
app's Vercel deployment, so the tool lives on a Supabase-owned URL
instead of `instantdb-to-supabase.vercel.app`.
**Added:**
- Rewrites for `/migrate/instantdb` and `/migrate/instantdb/:path*` in
`apps/www/lib/rewrites.js`
- A `next.config.test.ts` assertion covering both rules
Unlike `/evals`, the destination keeps the `/migrate/instantdb` prefix.
The migration app is a Next.js app that'll run with `basePath:
'/migrate/instantdb'`, so it only answers under that prefix (its
`/_next` assets and `/api` routes included, which would otherwise
collide with www's).
**Depends on:** the migration app shipping with `basePath:
'/migrate/instantdb'`. Until then this route 404s. The app's
`/migrate/instantdb` path currently returns 404 because it serves from
the root.
## To test
- `cd apps/www && pnpm vitest run next.config.test.ts` passes
- Once the app is deployed with the basePath, on the www preview:
`/migrate/instantdb` loads the migration app, with no 404s for `/_next`
assets or `/api` calls in the network tab
- Existing rewrites (`/dashboard`, `/evals`, `/kb`) still work
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
I added the agent-discovery surfaces the www app was missing: a resource
catalog at `/.well-known/ard.json` plus completed structured data on the
homepage. I scoped this from the agent-readiness gaps that are
truthfully closable on the www side; the catalog lists only resources
that already exist and serve 200 (MCP OAuth metadata, Management API
OpenAPI spec, llms.txt, agent-skills index).
**Changed:**
- **Agents can discover our machine-readable resources from one
document**: new static catalog at `/.well-known/ard.json` (Agentic
Resource Discovery format); the legacy `/.well-known/ai-catalog.json`
path serves the same file via rewrite, keeping a single source artifact.
- **Organization JSON-LD carries verifiable company details**: adds
`legalName`, a support `contactPoint`, and the registered address
already public on our Terms of Service.
- **Homepage declares the product as an application entity**: emits
`SoftwareApplication` JSON-LD via the existing
`softwareApplicationSchema` builder, same pattern as the vector module
page.
## To test
Tested on Vercel preview:
- [ ] `curl <preview-url>/.well-known/ard.json`: expect 200 with a JSON
catalog of 5 entries
- [ ] `curl <preview-url>/.well-known/ai-catalog.json`: expect the same
document with status 200 (rewrite, not a redirect)
- [ ] View homepage page source: expect three `application/ld+json`
scripts: Organization now includes `address` and `contactPoint`, and a
`SoftwareApplication` block is present
## Linear
- fixes GROWTH-1164
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added an Agent Resource Description catalog listing Supabase’s MCP,
API, documentation, and agent skill resources.
- Added support for the legacy AI Catalog URL through a canonical
redirect.
- Enhanced website structured data with software application details,
legal information, support contact details, and business address.
- **Tests**
- Added validation ensuring discoverable `.well-known` resources are
cataloged and resolve correctly.
- **Chores**
- Updated marketing site test coverage for `.well-known` resource
changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Agent-readiness scanners and agent fetchers look for an OpenAPI spec at
conventional same-origin paths, but the Management API spec is only
served on api.supabase.com and linked from the /.well-known/api-catalog
linkset, which scanners do not read. I added a rewrite so
supabase.com/openapi.json proxies the spec from its source of truth at
api.supabase.com/api/v1-json, using the same fall-through proxy
mechanism as /humans.txt and /evals.
**Note:** no cache or CORS headers on purpose: no consumer needs them
today, and the upstream response's set-cookie header defeats edge
caching regardless. I rejected a checked-in copy of the spec in favor of
proxying live (staleness). The /.well-known/api-catalog linkset already
points at the spec (PR #44880) and is untouched here; this PR only adds
the conventional same-origin path.
**Merge order:** merge only after supabase/platform#37571 deploys. The
spec currently ships `servers: []`, so OpenAPI consumers resolve
relative paths against the fetch origin; without the platform fix this
proxy would point spec-compliant clients at supabase.com/v1/*.
## To test
Tested on Vercel preview:
- [x] `curl -s https://<preview-url>/openapi.json | head -c 40` returns
`{"openapi":"3.0.0"`
- [x] `curl -sI https://<preview-url>/openapi.json` returns 200 with
`content-type: application/json`
- [x] `curl -sI https://<preview-url>/humans.txt` returns 200 (control:
rewrite fall-through chain intact)
## Linear
- fixes GROWTH-1138
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added access to the OpenAPI specification at `/openapi.json`.
* Requests are automatically routed to the API specification endpoint.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Aleksi Immonen <aleksi@supabase.io>
Our UI Library registry is expanding to include blocks that go beyond UI
and in some cases focus purely on back-end. This PR is a precursor to
adding more back-end related blocks. This PR includes the `ui-library ->
library` rename plus redirects and small UI copy updates. Since this is
a rename we'll need to update Vercel configuration.
## Vercel rollout
Keep the Library project Root Directory as `apps/ui-library`
1. In the **Library** Vercel project, set:
`NEXT_PUBLIC_BASE_PATH=/library`
Apply it to Preview and Production, then redeploy the Library project.
2. In the **www** Vercel project, add:
`NEXT_PUBLIC_LIBRARY_URL=<current value of NEXT_PUBLIC_UI_LIBRARY_URL>`
Apply it to Preview and Production. Keep `NEXT_PUBLIC_UI_LIBRARY_URL`
during the migration, then redeploy the www project.
3. Deploy in this order:
1. Library project
2. www project
4. Validate:
- `/library`
- `/library/docs/nextjs/password-based-auth`
- `/ui` redirects to `/library`
- `/ui/docs/nextjs/password-based-auth` redirects to
`/library/docs/nextjs/password-based-auth`
- `/ui/docs/ai-editors-rules/*` still uses its existing Docs redirects
No Vercel dashboard redirect rules are needed. Environment-variable
changes require a new deployment.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Supabase UI Library has been renamed to **Supabase Library** across
navigation, pages, documentation, and resource links.
* The Library is now available at `/library`, with updated descriptions
covering components, blocks, and developer tools.
* **Bug Fixes**
* Added permanent redirects from legacy `/ui` URLs to corresponding
`/library` paths.
* Updated links throughout the site and documentation to prevent broken
navigation and references.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Changes
Proxies `supabase.com/evals` to the
[evals](https://github.com/supabase/evals) frontend, following a similar
rewrite pattern as `/ui` and `/design-system`. The evals app already
serves under an `/evals` base path per supabase/evals#125.
The destination is hardcoded rather than an env var because the evals
app lives in a separate repo, and there’s not much benefit to a fully
local dev flow here, so the target URL is kept the same in every
environment.
## Before merge
- Disable deployment protection on the evals Vercel project, otherwise
`supabase.com/evals` will show a Vercel login page
- Wait until closer to Evals announcement target (July 30th)
Closes AI-826
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added routing for the `/evals` section and its subpages.
* Evals pages now load from the designated hosted destination while
preserving URL paths.
<!-- 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>
Preview sites are being crawled because the rewrite causes the docs production
content (which naturally has `index, follow`) to be served under the www
preview domain. We shouldn’t be rewriting in any environment except production.
* feat: llms.txt
* feat: split llms.txt into multiple files
We have too many docs, so the concatenated text file uses an unreasonable amount of tokens. Chunk it up a little so it's more usable.