## 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
## Context
Lots of links that initially go to 301's within docs / kb. Updates these
to their resolved target.
Ask your Claude Code to review the new destinations programmatically.
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
## 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>
## Summary
- Fix docs setup step 2: secrets go in `.env.local` (not `.env`), and
staff should run `pnpm run dev:secrets:pull` from `apps/docs`
- Add a one-line pointer from the root `DEVELOPERS.md` to
`apps/docs/DEVELOPERS.md`
## Test plan
- [ ] Skim the two touched lines and confirm they match how
`dev:secrets:pull` / dotenv actually work
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Clarified environment setup instructions for running the website and
documentation sites individually.
* Added docs-specific guidance for retrieving secrets and configuring
the local environment file.
* Updated community setup instructions with the required local
configuration setting.
<!-- 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 (in fact, this PR makes a tiny change!)
## What kind of change does this PR introduce?
Docs and config file changes to fix up some outdated docs and improve
the onboarding experience a little bit:
- [x] Fixes up the `pnpm` versioning guidance in `DEVELOPERS.md` (as
well as some small formatting cleanups)
- [x] Introduces a lightweight `mise.toml` file for
[mise](https://mise.en.dev/) users. We use mise in other codebases in
the @supabase org — if you have mise installed and you open your
terminal into this codebase, mise will read the `mise.toml` file and
automatically set up the Node/pnpm versions set in the
`.nvmrc`/`package.json` files.
- [x] Cleans up a TOC in `CONTRIBUTING.md` that looked ill-formatted —
the numbered list appears on one line, which I don't believe is intended
(see
[here](https://github.com/supabase/supabase/blob/561e43b36c02cb5576e7ea3d3a11f9349ace0bcc/CONTRIBUTING.md)).
I opted to remove the TOC wholesale as opposed to fixing the formatting
since the GitHub UI has a native TOC viewer.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Updated contributor and developer guides to improve navigation and
clarify setup instructions.
* Removed an extra table of contents from the contributing guide.
* Refined dependency/version guidance and formatting in the development
guide.
* **Chores**
* Updated local tooling settings to better support version-file based
workflows.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary
- fix the Markdown link to the Vecs Python source example in
`DEVELOPERS.md`
## Why
The current link is missing a closing parenthesis, which breaks the link
target in the federated docs section. This restores the intended
reference for contributors working with external docs sources.
## Testing
- docs-only change
AI-assisted: yes
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Fixed a formatting issue in developer documentation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Jonathan Amponsah <amponsahjonathan442@gmail.com>
* docs: update link to Vecs Python source code in developers guide
* docs: update README to remove outdated GDScript links. These repos have been deleted
* docs: update links in CONTRIBUTING.md for consistency and accuracy
* docs: update Twilio verification service link
* docs: update Mixpeek Python Client link in video search guide, remove link to missing code example
* docs: update GIN index link to point to PostgreSQL 16 documentation ('current' symantic no longer exists)
* docs: update Cloudflare Turnstile links to avoid 302 redirect
* docs: update LlamaIndex SupabaseVectorStore link to the correct documentation
* docs: update link to related issue for error message translation in auth-ui guide (to avoid 302 redirect)
* docs: update link from Next.js middleware to Next.js Proxy in auth-helpers guide to follow Next.js's new naming convention
* Update DEVELOPERS.md
* Update CONTRIBUTING.md
Direct to correct URL
* Update hybrid-search.mdx
Fix URL
* docs: renam Next.js middleware to proxy
* Update DEVELOPERS.md
Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
---------
Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
Update DEVELOPERS.md
The package.json specifies "engines.node": ">=22", but DEVELOPERS.md still says v20.x. This updates the doc to prevent pnpm install errors for new devs.
* Fix some missing and duplicate dependencies.
* Fix the types for jest in ai-commands package.
* Replace all npm commands with pnpm. Add pnpm files and workspace links.
* Fix rimraf to work with pnpm.
* Refactor the github actions to work with pnpm.
* Delete package-lock.json.
* Fix the tailwind configs to not include node_modules.
* Fix random files.
* Add preinstall scripts to all packages.
* Fix the Dockerfile to work with pnpm.
* Update the DEVELOPERS documentation.
* updated DEVELOPERS.md documentation versions
* updated DEVELOPERS.md documentation versions
* npm 10 -> 9 and or higher
* version has to be 20 LTS, not higher