Commit Graph
9 Commits
Author SHA1 Message Date
9b1af5be91 docs(kb): define what belongs in /kb versus /docs (#53875)
## Problem

`apps/kb/README.md` explains how the knowledge base is built, but it
does not say which content belongs in `/kb` and which belongs in
`/docs`. Contributors can add product reference that `/docs` already
owns, or miss the decision rule for guides, FAQs, community guides, and
troubleshooting.

## Solution

**Scope rule for knowledge base content.** This adds a "What belongs in
/kb versus /docs" section to `apps/kb/README.md`.

## Review instructions

1. Open `apps/kb/README.md` and read "What belongs in /kb versus /docs".
2. Confirm `/kb` is applied decisions and `/docs` is product truth.
3. Confirm the table covers `guides`, `faqs`, `community-guides`, and
`troubleshooting`.
4. Confirm the tip points authors at `/docs`, `/kb`, and `/blog` before
they add a page.

## Checklist

- [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.~~

---------

Co-authored-by: Nik Richers <nik@validmind.ai>
Co-authored-by: Quintin Willison <q@qwuk.net>
2026-11-23 18:43:15 +00:00
Kody JacksonandClaude Sonnet 5.5 86bd9294fa chore(kb) - update readme + agents.md (#53328)
Updates README for human contributors + Agents.md to mention community
content.

Will likely expand further over time.

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 12:38:06 -06:00
Jeremias Menichelli 158df40e67 chore: Improve KB README (#53458)
## Problem

KB README file still holds basic template content form Astro starter.

## Solution

Update README with information on the project.

<!--
## 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

1. Checkout the README
2. Make sure it makes no reference to Astro starter project, and
describes the basic on kb structure.

_Preview README here:
https://github.com/supabase/supabase/blob/da9f9080e7b7ba4bcda45f743c0d78f4d65b6a6c/apps/kb/README.md_

## 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)
2026-11-16 14:42:31 +00:00
supabase-vercel-tedd[bot] 756d782304 docs(kb): explain why troubleshooting articles don't accept pull requests (#53455)
## Problem

The kb README says troubleshooting content is fetched from a private
repository, but it doesn't say why, or what a contributor can do instead
of opening a pull request against those articles.

## Solution

Adds a "Contributing to troubleshooting articles" subsection under
"Federated troubleshooting content" in `apps/kb/README.md`. It explains:

- troubleshooting articles can't be changed with a pull request to this
repository
- the source is private because unpublished guides are often drafted
from support cases and can contain customer data before review
- how to suggest a fix: comment on the article's GitHub Discussion (the
"Go to the GitHub discussion" link on each article) or open an issue
that links the article
- pull requests for other `/kb` content, such as `src/content/guides/`,
are welcome

No code changes.

## Review instructions

1. Open `apps/kb/README.md` in the PR's "Files changed" view.
2. Check that the new "Contributing to troubleshooting articles"
subsection explains the restriction, the reason (customer data in
unpublished guides), and the two ways to suggest a fix.
3. Check that the "open an issue" link points to
`https://github.com/supabase/supabase/issues/new/choose`.

Checked with: `prettier --check apps/kb/README.md` and `pnpm turbo run
typecheck lint --filter='[origin/master]'`. Both pass, and lint reports
only existing warnings.

## Checklist

- [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).
(Not applicable: README only.)


[DOCS-1673](https://linear.app/supabase/issue/DOCS-1673/clarify-troubleshooting-article-contribution-restrictions-in-the-kb)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-16 13:58:27 +00:00
Ivan VasilovandClaude Sonnet 5.5 2ac3b77594 chore: replace pnpm hooks and chains with turbo task dependencies in the remaining apps (#53169)
## Problem

`ui-library`, `design-system`, `learn`, `kb`, `www` and `studio` still
order their build, dev and typecheck steps with pnpm `pre`/`post` hooks,
`&&` chains and `run-p`. Turbo can't see those steps, so it can't cache
or parallelize them. Follow-up to #52556, which migrated `apps/docs`.
Part of
[FE-4977](https://linear.app/supabase/issue/FE-4977/migrate-remaining-apps-pnpm-scripts-to-turbo-tasks).

## Solution

The ordering now lives in each app's `turbo.jsonc` as `dependsOn`, the
hooks and chains are gone, and scripts with same-package prerequisites
are wrapped with `maybe-turbo`. `node
.agents/skills/turbo-scripts/scripts/audit.mjs apps/<name>` reports no
findings for any of the six apps.

- **`ui-library`, `design-system`, `learn`:** content, registry and
markdown steps are turbo tasks with declared outputs. `dev:content` uses
the `with` key. `build:next` and `dev:next` are folded into `build` and
`dev`. `ui-library`'s markdown task now depends on `build:registry`,
which the old chain hid. `pnpm --filter library build:registry` still
regenerates the committed registry output.
- **`kb`:** `fetch:federated-content` is uncached, and the tasks that
read its output use `jit` inputs.
- **`www`:**
- `build` depends on `docs#build:guides-markdown`, so federated content
is fetched once instead of twice.
  - `build:next` is folded into `build`.
  - `typecheck` runs `next typegen` itself.
- `turbo-build.test.ts` is updated for the new task graph. It reads
`PATH` through a copy of the env, because `turbo/no-undeclared-env-vars`
flags it once the `passThroughEnv: ["*"]` wildcard is gone.
- `passThroughEnv: ["*"]` is gone, and the env vars the content scripts
read are declared.
- **`studio`:** `typecheck` runs `next typegen` inline, and `lint`
depends on a new `lint:type-checks` task. The `predev` turbopack cache
clean moved into `scripts/dispatch.js`. It's a local side effect, and
making it a turbo task would route `dev` through turbo's strict env
filtering, which drops `NODE_ENV`, `MODE` and `STUDIO_FRAMEWORK`.

## Review instructions

- For each app, check that a second `pnpm build` hits the cache. `www`'s
fetch and content tasks re-run by design, since they're uncached.
- Not verified: the `www` and `studio` dev servers started from the repo
root, a Studio production build, the e2e flow, and runs with real
production credentials.
- `kb`'s build reads a remote database that turbo can't hash. It stays
cached, keyed on `SUPABASE_URL`. Say if you'd rather make it uncached.
- Builds rewrite two tracked files,
`apps/docs/public/markdown/manifest.json` and
`apps/www/public/customers-rss.xml`, so a fresh checkout can miss the
cache once.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 16:40:21 +01:00
Jeremias Menichelli 30833db87e chore: Refactor sync troubleshooting scripts after data reconciliation (#52713)
## Problem

We solved manually some `troubleshooting_entries` table missing data and
mismatches.

- **Rows without slugs.** Some `troubleshooting_entries` rows had no
slug, so no guide could match them and the guides looked "new".
- **Duplicate discussions.** A guide that didn't match its row got a
fresh GitHub discussion, leaving the original behind (sometimes with
extras).
- **Slug mismatch.** The fetch stripped the hash suffix from file names
while the table keeps it, so those guides never matched their rows.
- **Overlapping runs.** The workflow had no concurrency control, so two
runs could both create a discussion for the same guide, and `upsert`
silently overwrote the first run's row.
- **Missing checksums.** Rows without a checksum counted as "changed"
and were re-pushed to GitHub on every run.
- **Weak dry run.** `--dry-run` only printed slugs, so it was hard to
see what a run would actually do.
- **Fragile lookup and duplicated code.** Rows were fetched with every
slug in the URL (`.in('slug', …)`), and both scripts carried their own
copy of the guide reader and checksum.

## Solution

After those steps we applied successfully to the database, we revamp our
existing sync scripts to allow dry runs to make sure the changes we
apply are going to generate the correct impact.

A new improvement to prevent bulk discussion errors on GitHub API.

<!--
## 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
_Sadly, we need to merge, and pray..._

## 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)
2026-11-04 10:24:19 +01:00
Ali Waseem 99fd573d1a feat(kb): add unit test CI, search API tests, and Playwright smoke tests (#52151)
kb's unit tests weren't run in CI and there were no functional tests.
Adds a CI job for kb unit tests, unit tests for the search API, and a
bare-bones Playwright suite (`e2e/kb`) that runs against the kb Vercel
preview on PRs and against production daily.

Fixes DOCS-1506
2026-10-22 09:14:16 -06:00
Jeremias Menichelli 05396e3378 [DOCS-1422] feat: create GitHub workflow or script to fetch troubleshooting (#51365)
## Problem

Currently troubleshooting guides merged in a private repository trigger
an action to open a PR against our Docs project.

From now on, we want the `kb` to host the troubleshooting guides and
take care of all the Github discussion process while improving some of
its parts.

## Solution

With this PR now:
- All files and scripts related to handling the actions and processes
for handling troubleshooting entries and GitHub Discussion creation on
Docs are deleted.
- A new workflow to sync troubleshooting guides with Supabase's
`troubleshooting_entries` table was created with some improvements.
- Now troubleshooting entries are fetched at pre-build in `kb` project
directory.
- When troubleshooting guides are created a new script detects this,
creates the GitHub discussion for it, extracts the URL, and pushes the
row to a db table at `push`.
- When troubleshooting guides are updated, a checksum holding its title
and body is compared, and the GitHub discussion content gets updated.
 
_Note: all troubleshooting content hasn't been migrated for **kb**, so
content not ready is filtered and not placed in the directory. This
allow us to progressively migrate all pages without breaking the build._

<!--
## 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

For the database workflow, sadly, we will have to wait and monitor, but
the fetching mechanism can be tested.

1. Go to the preview link for `kb`
2. Go to Topics > Troubleshooting
3. A new guide should be visible "Partial migrations and schema
inconsistencies from embedded transactions", click on its link
4. A page showing the guide's content should render

<img width="1022" height="810" alt="Screenshot 2026-10-07 at 13 19 17"
src="https://github.com/user-attachments/assets/cbd25a60-8721-4329-907f-f92de894c217"
/>



## 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)
2026-10-13 14:30:58 -03:00
Jeremias Menichelli 143f141e0f feat: initial kb scaffolding (#49601) 2026-08-31 14:55:04 +00:00