You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: add vue client to ui-library
* docs: add missing vue client to llms.txt
* docs: add nuxt client to ui-library
* docs: wrong env variable names
* docs: fix dependencies
* docs: update client-nuxtjs.json
* Reinstall the deps so that the pnpm-lock.yaml has less changes.
* Add blocks/vue package.
* Remove the vue blocks from ui-library.
* Copy the vue blocks into ui-library.
* Clean up unneeded files.
* Regenerate the pnpm-lock file from master.
* Fix prettier errors.
* docs: update shadcn-vue cli
* docs: reusable server client
* Small things
* docs: improvments after CR
---------
Co-authored-by: Ivan Vasilov <[email protected]>
Co-authored-by: Terry Sutton <[email protected]>
This block installs a Supabase client for connecting your Nuxt.js project to Supabase. It's designed to fully supports server-side rendering (SSR).
17
+
18
+
If you've already set up your Supabase client—either using the `npm create nuxt@latest` template or another method—you can continue using your existing setup.
19
+
20
+
### Getting started
21
+
22
+
After installing the block, you'll have the following environment variables in your `.env.local` file:
23
+
24
+
```env
25
+
NUXT_PUBLIC_SUPABASE_URL=
26
+
NUXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY=
27
+
```
28
+
29
+
- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true&tab=frameworks&framework=vuejs&using=supabasejs) under App Frameworks or in your project's [API keys](https://supabase.com/dashboard/project/_/settings/api-keys).
30
+
31
+
- If you're using a local instance of Supabase, you can find these values by running `supabase start` or `supabase status` (if you already have it running).
32
+
33
+
- Nuxt recommends [NuxtSupabase](https://supabase.nuxtjs.org/) module to integrate Nuxt application with Supabase. It’s an alternative to this approach, but both approaches are fine.
34
+
35
+
<Callouttype="warning"className="mt-4">
36
+
{''}
37
+
This Supabase client is built for SSR with the Nuxt.js. If you're building a Vue SPA, use the [Vue
38
+
SPA client](/ui/docs/vue/client) instead.{''}
39
+
</Callout>
40
+
41
+
## Further reading
42
+
43
+
-[Use Supabase with Nuxt](https://supabase.com/docs/guides/getting-started/quickstarts/nuxtjs)
44
+
-[Build a User Management App with Nuxt 3](https://supabase.com/docs/guides/getting-started/tutorials/with-nuxt-3)
description: Supabase client for Vue Single Page Applications
4
+
---
5
+
6
+
## Installation
7
+
8
+
<BlockItemname="supabase-client-vue"description="Supabase Client for Vue SPA" />
9
+
10
+
## Folder structure
11
+
12
+
<RegistryBlockitemName="supabase-client-vue" />
13
+
14
+
## Usage
15
+
16
+
This block installs a Supabase client for connecting your Vue project to Supabase. It's designed for use in client-side components.
17
+
18
+
If you've already set up a Supabase client in your project, you can just continue using that existing setup.
19
+
20
+
### Getting started
21
+
22
+
After installing the block, you'll have the following environment variables in your `.env.local` file:
23
+
24
+
```env
25
+
VITE_SUPABASE_URL=
26
+
VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY=
27
+
```
28
+
29
+
- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true&tab=frameworks&framework=vuejs&using=supabasejs) under App Frameworks or in your project's [API keys](https://supabase.com/dashboard/project/_/settings/api-keys).
30
+
31
+
- If you're using a local instance of Supabase, you can find these values by running `supabase start` or `supabase status` (if you already have it running).
32
+
33
+
You can use the client in your Vue component like following:
34
+
35
+
```vue
36
+
<script setup lang="ts">
37
+
import { onMounted, ref } from 'vue'
38
+
import { createClient } from './lib/supabase/client'
"docs": "You'll need to set the following environment variables in your project: `NUXT_PUBLIC_SUPABASE_URL` and `NUXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY`."
0 commit comments