mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
create-pull-request/patch
6
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6649b95e87 |
docs: add the explainer template to the style guide (#53751)
## Problem The style guide's template router has only the how-to guide template. Concept pages have no structure to follow, so explainers vary widely and many mix in procedures. Closes DOCS-1610 ## Solution - Add `apps/docs/style-guide/templates/explainer.md`, 88 lines. - Change the explainer row in the document-type table from _Instructions_ to _Procedures past two steps_, to match the tiny-procedure rule. - Add a heading rule to the _versus_ entry in `WORD_LIST.md`. - Add title rules to `03-page-structure.md`: name the product when the noun alone is ambiguous, and avoid placeholder words like _Fundamentals_. Add a Sidebar label section, since `sidebar_label` wasn't documented. - Add its row to the [Choose a template](https://github.com/supabase/supabase/blob/docs/explainer-template/apps/docs/style-guide/03-page-structure.md#choose-a-template) router in `03-page-structure.md`. Key choices: - **Three required parts**: the value statement with an optional cross-reference, the only text before the first heading; a first H2 that says what the concept is; and `## Related resources`. Process, Structure, and `Limits` or `Trade-offs` are optional, because most existing concept pages, such as `platform/regions` and `storage/buckets/fundamentals`, have no Process to write. - **Tiny procedures stay inline**: a one- or two-step action that illustrates the concept can sit in the section it qualifies. A longer procedure, or one with prerequisites, moves to a how-to guide. - **Cross-references by page type**: each section says where to link, such as a how-to for a task stage and a reference for a part's details. The value statement ends with `For how to <task>, see <guide>` when a how-to applies. - **Optional Mermaid diagram**: it requires `accTitle`, `accDescr` naming the nodes and connections, and a takeaway in the prose beside it, per [Diagrams](https://github.com/supabase/supabase/blob/master/apps/docs/style-guide/02-elements.md#diagrams). - **Worked example**: a cut-down `auth/architecture.mdx` that shows every slot. Its Process section is illustrative. The skills reach templates through the router, so no skill file changes. ### Learnings from the first rework These refinements come from reworking ten explainers in #53755 and #53757: - **No concept heading.** All five pages define the concept in their opening paragraph, so a `## What <concept> is` heading would repeat it. Later reversed: see Engagement rules. - **One H2 per part.** `auth/architecture` gives each layer its own section, and other pages link to them. The template now allows a parts table followed by one H2 per part. - **Linked headings keep their text** in whichever slot they fill, such as `## Public vs private buckets` as Trade-offs. - **Principles have a home**, such as "treat the schema as read-only": in Limits or Trade-offs, or as an admonition that leads with its impact. - **Related resources can repeat the how-to link** from the value statement. Every page did, and the link-once rule contradicted the example. - **When to use.** An optional `## When to use <concept>` section answers the reader question's "when do I use it?" Two pages had one and no slot fit. - **Bigger Process and Parts.** A Process can take one H2 per stage, for `realtime/architecture`. A concept with two independent sets of parts, such as index types and distance operators, gets one section for each. ### Engagement rules These rules make explainer sections easier to skim, from a read of the reworked Auth architecture page: - **Each part leads with its job**, then says when the reader works with it. History goes last or is cut. - **A Process follows one real case** with real names, such as the endpoint a sign-in calls. - **A diagram stays on the concept**, or the prose names the path that matters. - **Only the value statement before the first heading.** The concept opener slot is gone. The page opens with what the reader can decide and an optional cross-reference to a sister page, and the first H2 says what the concept is, so the definition sits under a heading a reader can scan to. - **Comparison headings are `X vs Y`.** Most existing guide headings already use it, such as `## JSON vs JSONB`. `WORD_LIST.md` now says so under _versus_, and prose keeps _versus_. - **Tables and lists come first.** Comparisons on shared attributes go in a table and parallel facts go in a list, with prose kept for the reasoning that connects them. - **One optional everyday-life analogy**, such as a music festival for Auth. It's framed as a comparison, with _like_ or _similar to_, because no analogy is exact. It names only the one or two pieces that connect it, so the reader gets a mental model rather than a second explanation, and it comes after the literal explanation, so it doesn't conflict with [Avoid idioms and colloquialisms](https://github.com/supabase/supabase/blob/master/apps/docs/style-guide/01-voice-and-tone.md#avoid-idioms-and-colloquialisms). To read the whole stack in one diff: ```bash git diff master...docs/explainer-rework-batch-2 ``` ### Preview The style guide isn't served on the docs site, so these link to the rendered files on the branch. | File | Preview | | --- | --- | | Explainer template | [`templates/explainer.md`](https://github.com/supabase/supabase/blob/docs/explainer-template/apps/docs/style-guide/templates/explainer.md) | | Template router | [`03-page-structure.md`](https://github.com/supabase/supabase/blob/docs/explainer-template/apps/docs/style-guide/03-page-structure.md#choose-a-template) | ## Review instructions 1. Open `apps/docs/style-guide/templates/explainer.md` and check that it is 90 lines or fewer. 2. In `03-page-structure.md`, check that the explainer row in **Choose a template** links to the new file. 3. Pick a concept page, such as `content/guides/platform/regions.mdx`, and check that the template fits it without padding. ## 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) |
||
|
|
038e68b777 |
docs: unify pooler guidance across the docs (#52332)
Closes DOCS-1519 ## Problem DOCS-1519 asks the docs team to do two things: unify the connection recommendations, and remove PgBouncer deprecation notices. PgBouncer isn't deprecated. It runs the dedicated pooler. **Deprecation notices:** no page in `apps/docs` says PgBouncer is deprecated. The last notice was in a 2021 blog post, and #52249 removed it. Two notices remain outside the docs: - **Studio:** the support form's IPv4 alert links to a "PGBouncer and IPv4 Deprecation" discussion. - **Blog:** a September 2023 update says PgBouncer is deprecated as of January 2024. **Recommendations:** Supabase runs two server-side poolers. The shared pooler runs on Supavisor and is on every plan. The dedicated pooler runs on PgBouncer and is on the Pro Plan and above. The docs name the two poolers in many ways, and many pages leave out the dedicated pooler. Some pages contradict the recommendations table in [Connect to your database](https://supabase.com/docs/guides/database/connecting-to-postgres#choose-a-connection-method): - **Prepared statements:** `connecting-to-postgres` says transaction mode doesn't support them. That is true for the shared pooler only. The dedicated pooler supports them on PgBouncer 1.21 and later. - **Migrations:** the restore pages, the quickstart partial, and the RedwoodJS quickstart send migrations and `pg_dump` through session mode. The table says to use the direct connection. - **Dedicated pooler:** `pooling-and-limits` says to use it on any IPv6 network. The table keeps it for high-load apps. ## Solution - **Names:** pages say _shared pooler_ and _dedicated pooler_, in lowercase. Each page names Supavisor or PgBouncer once, after the pooler name. _Session pooler_ and _Transaction pooler_ stay only where a page quotes the Connect dialog. - **Plans:** pooler and connection pages say _Pro Plan and above_ instead of _paid plans_. - **Recommendations:** every page above now matches the table. The shared pooler in session mode is the fallback for IPv4-only networks. - **Dedicated pooler coverage:** Managing connections and the IPv4 add-on page now cover the dedicated pooler. - **Word list:** `WORD_LIST.md` gets `dedicated pooler`, `shared pooler`, and `paid plan` entries. **Also fixed:** - The direct connection examples in both restore pages had the wrong username and `.supabase.com`. - The Managing connections heading changed. It keeps the `#configuring-supavisors-pool-size` anchor, because Studio links to it. **Not changed:** billing and usage pages that say _paid plans_, self-hosting pages, `apps/www`, and Studio. The Postgres and Render migration guides moved to `apps/kb` on `master` while this PR was open, so their edits are no longer in this diff. **Troubleshooting articles:** production redirects `/docs/guides/troubleshooting/` to `/kb/troubleshooting/`, which builds from the troubleshooting repo. The troubleshooting edits move there under DOCS-1521. **Size:** 25 files, 115 lines added and 97 removed. ## Preview links | Page | Live | Preview | Search for | | ---- | ---- | ------- | ---------- | | /connecting-to-postgres | [Live](https://supabase.com/docs/guides/database/connecting-to-postgres) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/database/connecting-to-postgres) | A high-load application on the Pro Plan and above | | /pooling-and-limits | [Live](https://supabase.com/docs/guides/database/connecting-to-postgres/pooling-and-limits) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/database/connecting-to-postgres/pooling-and-limits) | Use it for high-load applications | | /connection-management | [Live](https://supabase.com/docs/guides/database/connection-management) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/database/connection-management) | The pool size applies to both the shared pooler | | /ipv4-address | [Live](https://supabase.com/docs/guides/platform/ipv4-address) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/platform/ipv4-address) | When using the dedicated pooler in an IPv6-incompatible network | | /backup-restore | [Live](https://supabase.com/docs/guides/platform/migrating-within-supabase/backup-restore) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/platform/migrating-within-supabase/backup-restore) | Use the direct connection string. If your network | | /dashboard-restore | [Live](https://supabase.com/docs/guides/platform/migrating-within-supabase/dashboard-restore) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/platform/migrating-within-supabase/dashboard-restore) | Use the direct connection string. If your ISP | | /redwoodjs | [Live](https://supabase.com/docs/guides/getting-started/quickstarts/redwoodjs) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/getting-started/quickstarts/redwoodjs) | This quickstart uses two connection strings | ## Review instructions 1. Open [Connect to your database](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/database/connecting-to-postgres). The table and the **Dedicated pooler** section say _Pro Plan and above_. 2. Open [Connection pooling and limits](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/database/connecting-to-postgres/pooling-and-limits). It recommends the dedicated pooler for high-load apps only. 3. Open [Managing connections](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/database/connection-management). The pool size section covers both the shared pooler and the dedicated pooler. 4. Open [Backup and restore](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/platform/migrating-within-supabase/backup-restore). Step 3 says to use the direct connection string. ## Checklist Check all before review: - [ ] 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) |
||
|
|
3f4ff4fd4d |
docs: use social sign-in and phone sign-in consistently (#52102)
## Problem The docs used several names for the same sign-in methods: "social auth", "social authentication", and "social login" for social providers, and "Phone Auth" and "Phone Login" for phone. Other methods use *sign-in*, such as passwordless email sign-in and anonymous sign-in. The Auth overview also listed the sign-in methods without linking to their pages, and the custom OAuth/OIDC provider note had two different versions. Resolves [DOCS-1459](https://linear.app/supabase/issue/DOCS-1459). ## Decision This PR first standardized on *social login*, which the [word list](https://github.com/supabase/supabase/blob/master/apps/docs/style-guide/WORD_LIST.md) named as an exception to *sign-in*. @czenko approved dropping the exception, so the feature is now *social sign-in*, and every sign-in method follows the same pattern. One name per feature keeps the docs consistent for readers and AI agents, and new pages don't need a special case. ## Solution - **Social sign-in:** "social auth", "social authentication", and "social login" are "social sign-in" in docs page titles, headings, body text, link text, navigation labels, the getting started listing, and the C# SDK reference specs. - **Phone sign-in:** the Auth overview's providers list and both phone navigation labels match the phone pages' titles. - **Word list:** drops *social login* as an exception, and names *social sign-in*, *phone sign-in*, and *anonymous sign-in* as feature names. - **Auth overview:** each sign-in method links to its page. - **Custom provider note:** a new partial, `_partials/custom_oauth_providers_note.mdx`, is included by the providers list and Social sign-in. - **Expo quickstart:** both image alt texts describe their screenshots. Intentionally unchanged: - **URLs, code names, and file names:** `/docs/guides/auth/social-login/...`, `SocialLoginItems`, MDX file names, and image files such as `social-login.png`. - **Dated and quoted content:** blog posts, an event page, a customer story, and a quoted user tweet. - **JS SDK reference text:** "Social Login (OAuth) providers" in `signInWithOAuth` comes from the `supabase-js` repository. ## Related PRs The rename spans three PRs, so the feature has one name on every surface: - **This PR:** the docs. - [supabase/supabase#52109](https://github.com/supabase/supabase/pull/52109): the marketing site, the Dashboard command menu, the UI library docs, the knowledge base, and the Docker configuration comments. The UI library's blocks keep the name `social-auth`, because the name is part of their install commands, so renaming them is a decision for the UI library's owners. - [supabase/supabase#52111](https://github.com/supabase/supabase/pull/52111): the URLs, including the Expo quickstart's, move to `social-sign-in` with redirects. Merge this PR and #52109 first, then rebase #52111, because it edits some of the same lines. ## Preview links - [Auth overview](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/auth) - [Social sign-in](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/auth/social-login) - [Build a Social Sign-in App with Expo React Native](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/auth/quickstarts/with-expo-react-native-social-auth) - [Choosing the Right SSO Sign-in Flow](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/platform/sso/choosing-login-flow) - [Understanding SSO Sign-in Flows](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/platform/sso/login-flows) - [SSO Testing and Best Practices](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/platform/sso/testing-best-practices) - [Restore a Platform Project to Self-Hosted](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/self-hosting/restore-from-platform) - [Configure Social Sign-in (OAuth) Providers](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/self-hosting/self-hosted-oauth) |
||
|
|
a5688423d0 |
docs(cli): restructure and tighten the CLI getting started guide (#50736)
Closes DOCS-1320 Was the bottom of a two-PR stack. The commit from #50680 moved here, so that PR is closed and this one carries both changes. ## Problem The CLI getting started guide had accumulated structural and prose problems, none of which change what the page claims: - **Nine flat H2 headings**, with Beta channel and Updating the Supabase CLI sitting between installing and running. A first-time reader crossed about 150 lines of beta and upgrade tabs before reaching `supabase init`. - **The introduction opened with a two-step procedure under no heading**, listing `init` and `start` before the CLI is installed. Its first sentence named the tool and where it runs rather than what the reader gets. - **Running a local Supabase project ran concept, fact, procedure, and process together** as one stretch of prose, so the two commands the reader has to run sat in paragraphs between the Docker background and the first-run note. - **Task headings mixed gerunds with imperatives:** Installing, Running, Stopping, and Updating next to Access and Manage. - **No navigation.** A long guide that mixes information types opened straight into commands, with no outline of its major groups. The sidebar contents is not a substitute: it isn't part of the document, and the generated markdown an agent reads has no sidebar at all. - **Four more sequences were prose.** Installing via npm, installing a Linux package, the pre-upgrade backup, and opting out of telemetry each had to be followed in order with nothing marking the order. - **Smaller things:** the Studio screenshot's alt text named the topic its heading already states, two links used "note above" and "here" as their text, and an admonition restated where `sb_publishable_...` comes from. ## Solution Twelve commits, one change type each, plus a master merge and its fixup. - **Style.** The install-method callout drops from four blocks to two paragraphs and uses the documented `title` prop. Active voice on the Postgres, analytics, and telemetry instructions. Descriptive link text. Alt text that describes the Studio screenshot rather than naming it. Cut the admonition restating `sb_publishable_...`. - **Structure.** Beta channel and Updating the Supabase CLI move out of the getting started path. - **Grouping.** Local setup goes under Set up a local project, updating and beta builds under Change your CLI version. The intro's `init` and `start` list gets a Quickstart heading. - **Value statement.** The opening sentence now says what the reader gets. - **Procedure format.** Running a local Supabase project leads with the container runtime prerequisite, then four numbered actions, then the first-run download as an outcome. Starting the container runtime is its own step, since the old prose only assumed it with "with a container runtime running". - **Imperative headings.** Install, Run, Access, Stop, Update, Use the beta channel. - **Four more procedures.** npm install, Linux packages, the pre-upgrade backup, and telemetry opt-out. The three pre-upgrade commands were one unexplained block inside an admonition, so each step now says what its command does. Re-enabling telemetry moves to a sentence, since it's the reverse action rather than a step. - **Intro navigation** listing the major groups, each line saying what the reader gets from it. - **Connect to a hosted project** (from #50680). A new section between Stop local services and Change your CLI version, saying the stack runs only on the reader's machine and nothing reaches a hosted project until they sign in and link one, then pointing at the page that owns the procedure. No commands. The `init` step gains a sentence saying it creates local files only, and the value statement and intro navigation cover the added goal. - **Style guide and word list fixes** from an audit of the page against `CONTRIBUTING.md` and `WORD_LIST.md`. `directory` over `folder` in command-line contexts, `might` over `may`, present tense over `will`, a noun after `this`, no `above` as a pointer, concrete verbs over `manage`, no time-relative `latest`, no parentheses for supplementary information, and an impact-first `caution` on the pre-upgrade callout. The container runtime list becomes a table of tool and platforms, and the group heading becomes Change your CLI version. ## Preview links | Site | Live | Preview | Search for | | ---- | ---- | ------- | ---------- | | Docs | [/docs/guides/local-development/cli/getting-started](https://supabase.com/docs/guides/local-development/cli/getting-started) | [/docs/guides/local-development/cli/getting-started](https://docs-git-docs-cli-getting-started-edits-supabase.vercel.app/docs/guides/local-development/cli/getting-started) | Change your CLI version, Connect to a hosted project | ## Manual testing 1. Open the docs preview link above. 2. Read the introduction. It opens with a value statement, then links the four major groups. Under Quickstart, the install-method callout explains how the install method changes the command you run. 3. Read the On this page list. It nests: Quickstart, Set up a local project with four sections under it, Change your CLI version with two sections under it, Telemetry, Learn more. 4. Check Run a local Supabase project renders four numbered steps, with code blocks inside steps 3 and 4. Check the npm tab of Install the Supabase CLI renders three, and How to opt out renders two. 5. Load the page at `#installing-the-supabase-cli`, `#beta-channel`, and `#updating-the-supabase-cli`. All three land on their sections despite the renamed headings. 6. Load the legacy path `/docs/guides/cli/getting-started#updating-the-supabase-cli`. It redirects to the current path and keeps the fragment. 7. Check the introduction's group list includes Connect to a hosted project, and that the section appears in the On this page list between Stop local services and Change your CLI version. 8. Check that section is two sentences and a pointer, with no commands. 9. In Run a local Supabase project, select the "Connect to a hosted project" link in step 3. The page scrolls to that section. 10. Follow both outbound links from the new section and confirm they resolve, including the `#configure-github-actions` fragment. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Reorganized the local development guide with a clearer quickstart, setup steps, service access instructions, and CLI version guidance. * Expanded installation examples to include bun and clarified package-runner commands. * Clarified upgrade, backup, container cleanup, and telemetry instructions. * Added a reference to the Microsoft Writing Style Guide. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0405b31b26 |
docs: re-publish Multigres Private Alpha docs — merge on October 2, 2026 (#50664)
## I have read the CONTRIBUTING.md file. YES ## What kind of change does this PR introduce? Re-add. Reapplies the Multigres Private Alpha docs section removed in #50662, ready to merge once Sugu gives the go-ahead. Do not merge until then. Linear: MUL-1621 (follow-up to MUL-452). ## What is the current behavior? Multigres docs section is down (per #50662): no overview/compatibility pages, no sidebar entry, no features-table row, no "What you get" cards. ## What is the new behavior? Exact reapply of #49020 (with Multigres marked Private Alpha): overview guide at `/docs/guides/database/multigres`, compatibility stub, Database sidebar entry, features-table row, "What you get" cards, and the `ContentListings` optional-`href` support they rely on. Base branch is the revert PR (#50662) so the diff here is legible now; retarget to `master` once #50662 merges. ## Additional context - `pnpm --filter docs exec vitest run lib/content-listings.test.ts` — 22 passed - Blocked on Sugu's go-ahead — `do-not-merge` label applied --------- Co-authored-by: Nik Richers <nik@validmind.ai> |
||
|
|
8fa75be01b |
docs: add a standalone style guide (#50742)
Part 1 of 3. Stack: #50742 → #50744 → #50743. ## Problem We have several problems: - Style guidance lives in lots of places and need consolidation - Our CONTRIBUTING guide has turned into one massive style document that needs to be broken up ## Solution Add `apps/docs/style-guide/` as plain markdown. | File | Covers | | --- | --- | | `README.md` | What the guide covers, who it's for, how to contribute, and the references it defers to | | `WORD_LIST.md` | Terminology, spelling, capitalization, and the `agent` / `LLM` / `AI` distinction. Moved from `apps/docs/` with history intact | | `01-voice-and-tone.md` | Audience, brevity, sentence construction | | `02-elements.md` | Which component renders each piece, and linking conventions | | `03-page-structure.md` | Document types, information types, grouping, chunking, timeless documentation | ### New content This guide is mostly rearrangement and glue, but it includes some new content: - Links and cross-reference formatting - WORD_LIST entries for LLM and AI agent - Timeless documentation guidance - Accessibility guidance - Sharper guidance on brevity and chunking ## Manual testing 1. Open `apps/docs/style-guide/` on this branch and confirm `README.md` renders below the file list. 2. Follow every link in `README.md` and read the document through. 3. You can test by locally pointing an agent at the style-guide and seeing that it makes great choices when revising a document. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added a documentation style guide covering voice and tone, page structure, and guidance for writing procedures, code, tables, diagrams, media, and links. * Added a word list with preferred spelling, capitalization, and usage, including guidance on inclusive and concise language. * Added recommendations for reviewing documentation drafts and runnable examples. * Replaced the existing word list page’s content with a link to its new location in the style guide. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Nik Richers <nik@validmind.ai> |