mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
## Problem A full docs E2E run with the anchor check from #52174 found 58 broken anchor links on 53 guide pages. Most point to renamed or removed headings. Fixing them sets a baseline of zero for the IA restructure. Closes DOCS-1516 ## Solution - Retarget each link to the section that covers it today, verified on production. - Add a custom id where links already use a hand-written slug, such as `#phx_join`. - Drop the anchor where no section fits. ## Preview links Rows with an anchor link straight to a new custom id, which is broken on live and works on the preview. For the rest, search the page for the phrase to find the changed link. | Live | Preview | Search for | Change | | --- | --- | --- | --- | | [with-react](https://supabase.com/docs/guides/getting-started/tutorials/with-react) | [with-react](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/getting-started/tutorials/with-react) | Row Level Security | `auth#row-level-security` → `database/postgres/row-level-security` (20 links, 15 files) | | [nextjs](https://supabase.com/docs/guides/auth/quickstarts/nextjs) | [nextjs](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/quickstarts/nextjs) | Supabase Auth docs | `auth#authentication` → `auth` | | [astrojs](https://supabase.com/docs/guides/auth/quickstarts/astrojs) | [astrojs](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/quickstarts/astrojs) | Supabase Auth docs | `auth#authentication` → `auth` | | [custom-domains](https://supabase.com/docs/guides/platform/custom-domains) | [custom-domains](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/custom-domains) | Owner or Admin permissions | `access-control#manage-team-members` → `#manage-organization-members` | | [network-restrictions](https://supabase.com/docs/guides/platform/network-restrictions) | [network-restrictions](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/network-restrictions) | Owner or Admin permissions | `access-control#manage-team-members` → `#manage-organization-members` | | [postgres-connection-logging](https://supabase.com/docs/guides/platform/postgres-connection-logging) | [postgres-connection-logging](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/postgres-connection-logging) | Owner or Admin permissions | `access-control#manage-team-members` → `#manage-organization-members` | | [ssl-enforcement](https://supabase.com/docs/guides/platform/ssl-enforcement) | [ssl-enforcement](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/ssl-enforcement) | Owner or Admin permissions | `access-control#manage-team-members` → `#manage-organization-members` | | [with-expo-react-native-social-sign-in](https://supabase.com/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in) | [with-expo-react-native-social-sign-in](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in) | copied earlier | `#get-the-api-keys` → `#get-api-details` | | [with-expo-react-native-social-sign-in](https://supabase.com/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in) | [with-expo-react-native-social-sign-in](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in) | Apple Developer Console | `auth-apple#configuration-web` → `#configuration-web-oauth` | | [with-expo-react-native-social-sign-in](https://supabase.com/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in) | [with-expo-react-native-social-sign-in](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in) | Google Sign In | Dropped `#react-native`, a non-default tab | | [with-flutter](https://supabase.com/docs/guides/getting-started/tutorials/with-flutter) | [with-flutter](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/getting-started/tutorials/with-flutter) | copied earlier | `#get-the-api-keys` → `#get-api-details` | | [going-to-prod](https://supabase.com/docs/guides/ai/going-to-prod#hnsw-understanding-efconstruction--efsearch--and-m) | [going-to-prod](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/ai/going-to-prod#hnsw-understanding-efconstruction--efsearch--and-m) | HNSW, understanding | Custom id matching the links from `ai/choosing-compute-addon` | | [rag-with-permissions](https://supabase.com/docs/guides/ai/rag-with-permissions) | [rag-with-permissions](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/ai/rag-with-permissions) | query plan analyzer | `platform/performance#optimizing-poor-performing-queries` → `database/query-optimization#analyze-the-query-plan` | | [ivf-indexes](https://supabase.com/docs/guides/ai/vector-indexes/ivf-indexes) | [ivf-indexes](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/ai/vector-indexes/ivf-indexes) | Distance operators | `#distance-operators` → `ai/vector-indexes#distance-operators` | | [custom-claims-and-role-based-access-control-rbac](https://supabase.com/docs/guides/api/custom-claims-and-role-based-access-control-rbac) | [custom-claims-and-role-based-access-control-rbac](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/api/custom-claims-and-role-based-access-control-rbac) | local development | `auth-hooks#local-development` → `#developing` | | [native-mobile-deep-linking](https://supabase.com/docs/guides/auth/native-mobile-deep-linking) | [native-mobile-deep-linking](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/native-mobile-deep-linking) | password reset | `passwords#resetting-a-users-password-forgot-password` → `#resetting-a-password` | | [mcp-authentication](https://supabase.com/docs/guides/auth/oauth-server/mcp-authentication) | [mcp-authentication](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/oauth-server/mcp-authentication) | authorization UI | `getting-started#build-your-authorization-endpoint` → `#build-your-authorization-ui` | | [passwords](https://supabase.com/docs/guides/auth/passwords) | [passwords](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/passwords) | implicit flow | `sessions#implicit-flow`, `sessions#pkce-flow` → `sessions/implicit-flow`, `sessions/pkce-flow` | | [redirect-urls](https://supabase.com/docs/guides/auth/redirect-urls) | [redirect-urls](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/redirect-urls) | third-party providers | Dropped the `auth-signinwithoauth` example anchor | | [users](https://supabase.com/docs/guides/auth/users) | [users](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/users) | User Identity | `auth-identity-linking#the-user-identity` → `identities#the-user-identity-object` | | [upgrading](https://supabase.com/docs/guides/platform/upgrading#upgrading-to-pg_graphql-160) | [upgrading](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/upgrading#upgrading-to-pg_graphql-160) | Upgrading to pg_graphql | Custom id matching the link from `database/extensions/pg_graphql` | | [import-data](https://supabase.com/docs/guides/database/import-data) | [import-data](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/database/import-data) | disk management | `database-size#disk-management` → `#disk-size` | | [multigres](https://supabase.com/docs/guides/database/multigres) | [multigres](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/database/multigres) | Private Alpha | Dropped the link. `getting-started/features` redirects to `/features` | | [data-deletion](https://supabase.com/docs/guides/database/postgres/data-deletion) | [data-deletion](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/database/postgres/data-deletion) | Check for blocked queries | `#monitoring-locks` → `#check-for-blocked-queries` | | [postgres-log-config](https://supabase.com/docs/guides/database/postgres/postgres-log-config) | [postgres-log-config](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/database/postgres/postgres-log-config) | Supavisor | `connecting-to-postgres#poolers` → `pooling-and-limits#shared-pooler` and `#dedicated-pooler` | | [partner-catalog](https://supabase.com/docs/guides/integrations/partner-catalog) | [partner-catalog](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/integrations/partner-catalog) | Project GraphQL API | `api#graphql-api-overview` → `graphql` | | [vercel-marketplace](https://supabase.com/docs/guides/integrations/vercel-marketplace) | [vercel-marketplace](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/integrations/vercel-marketplace) | How your Vercel team maps | `#permissions` → `#how-your-vercel-team-maps-to-supabase` | | [managing-config](https://supabase.com/docs/guides/local-development/managing-config) | [managing-config](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/local-development/managing-config) | Managing secrets for branches | `branching#managing-secrets-for-branches` → `branching/configuration#managing-secrets-for-branches` | | [reports](https://supabase.com/docs/guides/observability/reports) | [reports](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/observability/reports) | Query Performance Advisory | `performance#examine-query-performance` → `#examining-query-performance` | | [backups](https://supabase.com/docs/guides/platform/backups) | [backups](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/backups) | legacy logical backup | `backup-restore#backup-database-using-the-cli` → `#back-up-database-using-the-cli` | | [backups](https://supabase.com/docs/guides/platform/backups#pitr-restoration-process) | [backups](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/backups#pitr-restoration-process) | Restoration process | Custom id matching the link from `read-replicas/getting-started` | | [branching](https://supabase.com/docs/guides/platform/manage-your-usage/branching) | [branching](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/manage-your-usage/branching) | persistent branches | `branching#persistent-branches` → `#how-branching-works` | | [point-in-time-recovery](https://supabase.com/docs/guides/platform/manage-your-usage/point-in-time-recovery) | [point-in-time-recovery](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/manage-your-usage/point-in-time-recovery) | backup frequency | `backups#frequency-of-backups` → `backups` | | [read-replicas](https://supabase.com/docs/guides/platform/read-replicas) | [read-replicas](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/read-replicas) | IPv4 add-on | `ipv4-address#read-replicas` → `#read-replicas-and-ipv4-add-on` | | [protocol](https://supabase.com/docs/guides/realtime/protocol#access-token) | [protocol](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/realtime/protocol#access-token) | access_token | Custom id matching the link from `realtime/authorization` | | [postgres-changes](https://supabase.com/docs/guides/realtime/postgres-changes#negating-a-filter-not) | [postgres-changes](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/realtime/postgres-changes#negating-a-filter-not) | Negating a filter | Custom id matching the existing in-page link | | [protocol](https://supabase.com/docs/guides/realtime/protocol#phx_join) | [protocol](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/realtime/protocol#phx_join) | phx_join | Custom id matching the existing in-page link | | [reports](https://supabase.com/docs/guides/realtime/reports) | [reports](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/realtime/reports) | Broadcast via REST API | `broadcast#broadcast-via-rest-api` → `#broadcast-using-the-rest-api` | <details> <summary>The 15 files with Row Level Security links</summary> - `_partials/quickstart_intro.mdx`, used by the framework tutorials - `auth/phone-login` - `auth/quickstarts/with-expo-react-native-social-sign-in` - `database/postgres/column-level-security` - `getting-started/tutorials/`: `with-flutter`, `with-ionic-angular`, `with-ionic-react`, `with-ionic-vue`, `with-kotlin`, `with-nuxt-3`, `with-redwoodjs`, `with-solidjs`, `with-svelte`, `with-swift`, `with-vue-3` </details> ## Review instructions 1. Open a few live and preview links side by side, and click the changed link on each to confirm the preview lands on the right section. 2. From a checkout of `docs/e2e-anchor-links`, run the anchor check against the preview with the changed pages, as described in `e2e/docs/README.md`: `DOCS_E2E_PAGE_PATHS=<changed /docs/... paths> PLAYWRIGHT_BASE_URL=https://docs-git-docs-fix-broken-anchors-supabase.vercel.app pnpm exec playwright test --grep-invert @a11y` 3. Confirm the anchor check reports no failures. ## 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)
148 lines
4.1 KiB
Plaintext
148 lines
4.1 KiB
Plaintext
---
|
|
title: 'Build a User Management App with Ionic Vue'
|
|
description: 'Learn how to use Supabase in your Ionic Vue App.'
|
|
---
|
|
|
|
<$Partial path="quickstart_intro.mdx" />
|
|
|
|

|
|
|
|
<Admonition type="note">
|
|
|
|
If you get stuck while working through this guide, refer to the [full example on GitHub](https://github.com/supabase/supabase/tree/master/examples/user-management/ionic-vue-user-management).
|
|
|
|
</Admonition>
|
|
|
|
<$Partial path="project_setup.mdx" variables={{ "framework": "vuejs", "tab": "frameworks" }} />
|
|
|
|
## Building the app
|
|
|
|
Start by building the Vue app from scratch.
|
|
|
|
### Initialize an Ionic Vue app
|
|
|
|
Use the [Ionic CLI](https://ionicframework.com/docs/cli) to initialize an app called `supabase-ionic-vue`:
|
|
|
|
```bash
|
|
npm install -g @ionic/cli
|
|
ionic start supabase-ionic-vue blank --type vue
|
|
cd supabase-ionic-vue
|
|
```
|
|
|
|
Install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)
|
|
|
|
```bash
|
|
npm install @supabase/supabase-js
|
|
```
|
|
|
|
Save the environment variables in a `.env` file, including the API URL and key that you copied [earlier](#get-api-details).
|
|
|
|
<$CodeTabs>
|
|
|
|
```bash name=.env
|
|
VUE_APP_SUPABASE_URL=YOUR_SUPABASE_URL
|
|
VUE_APP_SUPABASE_KEY=YOUR_SUPABASE_KEY
|
|
```
|
|
|
|
</$CodeTabs>
|
|
|
|
With the API credentials in place, create a helper file to initialize the Supabase client. These variables will be exposed on the browser, and that's fine since Supabase enables [Row Level Security](/docs/guides/database/postgres/row-level-security) on Databases by default.
|
|
|
|
<$CodeSample
|
|
path="/user-management/ionic-vue-user-management/src/supabase.ts"
|
|
lines={[[1, -1]]}
|
|
meta="name=src/supabase.ts"
|
|
/>
|
|
|
|
### Set up a sign-in route
|
|
|
|
Create a Vue component to manage sign-ins and sign-ups that uses Magic Links, so users can sign in with their email without using passwords.
|
|
|
|
<$CodeSample
|
|
path="/user-management/ionic-vue-user-management/src/views/Login.vue"
|
|
lines={[[1, -1]]}
|
|
meta="name=src/views/Login.vue"
|
|
/>
|
|
|
|
### Account page
|
|
|
|
After a user has signed in, let them edit their profile details and manage their account with a new component called `Account.vue`.
|
|
|
|
<$CodeSample
|
|
path="/user-management/ionic-vue-user-management/src/views/Account.vue"
|
|
lines={[[1, 9], [11, 67], [69, -1]]}
|
|
meta="name=src/views/Account.vue"
|
|
/>
|
|
|
|
### Launch!
|
|
|
|
With all the components in place, update `App.vue` and the app routes:
|
|
|
|
<$Partial path="auth_methods.mdx" />
|
|
|
|
<$CodeSample
|
|
path="/user-management/ionic-vue-user-management/src/router/index.ts"
|
|
lines={[[1, -1]]}
|
|
meta="name=src/router/index.ts"
|
|
/>
|
|
|
|
<$CodeSample
|
|
path="/user-management/ionic-vue-user-management/src/App.vue"
|
|
lines={[[1, -1]]}
|
|
meta="name=src/App.vue"
|
|
/>
|
|
|
|
Once that's done, run this in a terminal window:
|
|
|
|
```bash
|
|
ionic serve
|
|
```
|
|
|
|
And then open the browser to [localhost:8100](http://localhost:8100) and you should see the completed app.
|
|
|
|

|
|
|
|
## Bonus: Profile photos
|
|
|
|
Every Supabase project is configured with [Storage](/docs/guides/storage) for managing large files like photos and videos.
|
|
|
|
### Create an upload widget
|
|
|
|
First install two packages to interact with the user's camera.
|
|
|
|
```bash
|
|
npm install @ionic/pwa-elements @capacitor/camera
|
|
```
|
|
|
|
[Capacitor](https://capacitorjs.com) is a cross-platform native runtime from Ionic that enables you to deploy web apps to app stores and provides access to native device API.
|
|
|
|
Ionic PWA elements is a companion package that polyfills certain browser APIs that provide no user interface with custom Ionic UI.
|
|
|
|
With those packages installed, update `main.ts` to include an additional bootstrapping call for the Ionic PWA Elements.
|
|
|
|
<$CodeSample
|
|
path="/user-management/ionic-vue-user-management/src/main.ts"
|
|
lines={[[1, -1]]}
|
|
meta="name=src/main.ts"
|
|
/>
|
|
|
|
Then create an `AvatarComponent`.
|
|
|
|
<$CodeSample
|
|
path="/user-management/ionic-vue-user-management/src/components/Avatar.vue"
|
|
lines={[[1, -1]]}
|
|
meta="name=src/components/Avatar.vue"
|
|
/>
|
|
|
|
### Add the new widget
|
|
|
|
And then add the widget to the Account page:
|
|
|
|
<$CodeSample
|
|
path="/user-management/ionic-vue-user-management/src/views/Account.vue"
|
|
lines={[[1, -1]]}
|
|
meta="name=src/views/Account.vue"
|
|
/>
|
|
|
|
At this stage you have a fully functional application!
|