The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
feat: add npm and yarn tabs
Isaiah Hamiltonbabec26f7ecd
diff --git a/web/docs/guides/with-angular.mdx b/web/docs/guides/with-angular.mdxindex 85813443df4..c8fd74e257d 100644--- a/web/docs/guides/with-angular.mdx+++ b/web/docs/guides/with-angular.mdx@@ -167,10 +167,28 @@ cd supabase-angularThen let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install @supabase/supabase-js```+</TabItem>+<TabItem value="YARN">++```bash+yarn add @supabase/supabase-js+```++</TabItem>+</Tabs>+And finally we want to save the environment variables in the `environment.ts` file.All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).These variables will be exposed on the browser, and that's completely fine since we have [Row Level Security](/docs/guides/auth#row-level-security) enabled on our Database.@@ -457,10 +475,28 @@ export class AppComponent implements OnInit {Once that's done, run this in a terminal window:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm run start```+</TabItem>+<TabItem value="YARN">++```bash+yarn start+```++</TabItem>+</Tabs>+And then open the browser to [localhost:4200](http://localhost:4200) and you should see the completed app.diff --git a/web/docs/guides/with-expo.mdx b/web/docs/guides/with-expo.mdxindex c21df8f75e0..97131643fd0 100644--- a/web/docs/guides/with-expo.mdx+++ b/web/docs/guides/with-expo.mdx@@ -153,14 +153,28 @@ cd supabaseReactNativeThen let's install the additional dependencies: [supabase-js](https://github.com/supabase/supabase-js)+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">++```bash+npm install @supabase/supabase-js react-native-elements react-native-safe-area-context @react-native-async-storage/async-storage react-native-url-polyfill+```++</TabItem>+<TabItem value="YARN">+```bash-yarn add @supabase/supabase-js-yarn add react-native-elements-yarn add react-native-safe-area-context-yarn add @react-native-async-storage/async-storage-yarn add react-native-url-polyfill+yarn add @supabase/supabase-js react-native-elements react-native-safe-area-context @react-native-async-storage/async-storage react-native-url-polyfill```+</TabItem>+</Tabs>+Now let's create a helper file to initialize the Supabase client.We need the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).These variables will be exposed on the browser, and that's completely fine since we have@@ -439,10 +453,28 @@ export default function App() {Once that's done, run this in a terminal window:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">++```bash+npm run start+```++</TabItem>+<TabItem value="YARN">+```bashyarn start```+</TabItem>+</Tabs>+And then open the browser to [localhost:3000](http://localhost:3000) and you should see the completed app.## Bonus: Profile photosdiff --git a/web/docs/guides/with-ionic-angular.mdx b/web/docs/guides/with-ionic-angular.mdxindex 0db3b062917..dde8870916f 100644--- a/web/docs/guides/with-ionic-angular.mdx+++ b/web/docs/guides/with-ionic-angular.mdx@@ -160,18 +160,56 @@ Let's start building the Angular app from scratch.We can use the [Ionic CLI](https://ionicframework.com/docs/cli) to initializean app called `supabase-ionic-angular`:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install -g @ionic/cliionic start supabase-ionic-angular blank --type angularcd supabase-ionic-angular```+</TabItem>+<TabItem value="YARN">++```bash+yarn add -g @ionic/cli+ionic start supabase-ionic-angular blank --type angular+cd supabase-ionic-angular+```++</TabItem>+</Tabs>+Then let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install @supabase/supabase-js```+</TabItem>+<TabItem value="YARN">++```bash+yarn add @supabase/supabase-js+```++</TabItem>+</Tabs>+And finally we want to save the environment variables in the `environment.ts` file.All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).These variables will be exposed on the browser, and that's completely fine since we have [Row Level Security](/docs/guides/auth#row-level-security) enabled on our Database.@@ -535,10 +573,28 @@ Let's create an avatar for the user so that they can upload a profile photo.First install two packages in order to interact with the user's camera.+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install @ionic/pwa-elements @capacitor/camera```+</TabItem>+<TabItem value="YARN">++```bash+yarn add @ionic/pwa-elements @capacitor/camera+```++</TabItem>+</Tabs>+[CapacitorJS](https://capacitorjs.com) is a cross platform native runtime from Ionic that enables web apps to be deployed through the app store and provides access to native deavice API.Ionic PWA elements is a companion package that will polyfill certain browser APIs that provide no user interface with custom Ionic UI.diff --git a/web/docs/guides/with-ionic-react.mdx b/web/docs/guides/with-ionic-react.mdxindex 15d8d0950f9..a04a9f92648 100644--- a/web/docs/guides/with-ionic-react.mdx+++ b/web/docs/guides/with-ionic-react.mdx@@ -160,18 +160,56 @@ Let's start building the React app from scratch.We can use the [Ionic CLI](https://ionicframework.com/docs/cli) to initializean app called `supabase-ionic-react`:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install -g @ionic/cliionic start supabase-ionic-react blank --type reactcd supabase-ionic-react```+</TabItem>+<TabItem value="YARN">++```bash+yarn add -g @ionic/cli+ionic start supabase-ionic-react blank --type react+cd supabase-ionic-react+```++</TabItem>+</Tabs>+Then let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install @supabase/supabase-js```+</TabItem>+<TabItem value="YARN">++```bash+yarn add @supabase/supabase-js+```++</TabItem>+</Tabs>+And finally we want to save the environment variables in a `.env`.All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).diff --git a/web/docs/guides/with-ionic-vue.mdx b/web/docs/guides/with-ionic-vue.mdxindex 05a60fb475c..b2d1ef7c7ad 100644--- a/web/docs/guides/with-ionic-vue.mdx+++ b/web/docs/guides/with-ionic-vue.mdx@@ -160,18 +160,56 @@ Let's start building the Vue app from scratch.We can use the [Ionic CLI](https://ionicframework.com/docs/cli) to initializean app called `supabase-ionic-vue`:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install -g @ionic/cliionic start supabase-ionic-vue blank --type vuecd supabase-ionic-vue```+</TabItem>+<TabItem value="YARN">++```bash+yarn add -g @ionic/cli+ionic start supabase-ionic-vue blank --type vue+cd supabase-ionic-vue+```++</TabItem>+</Tabs>+Then let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install @supabase/supabase-js```+</TabItem>+<TabItem value="YARN">++```bash+yarn add @supabase/supabase-js+```++</TabItem>+</Tabs>+And finally we want to save the environment variables in a `.env`.All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).@@ -549,10 +587,28 @@ Every Supabase project is configured with [Storage](/docs/guides/storage) for maFirst install two packages in order to interact with the user's camera.+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install @ionic/pwa-elements @capacitor/camera```+</TabItem>+<TabItem value="YARN">++```bash+yarn add @ionic/pwa-elements @capacitor/camera+```++</TabItem>+</Tabs>+[CapacitorJS](https://capacitorjs.com) is a cross platform native runtime from Ionic that enables web apps to be deployed through the app store and provides access to native deavice API.Ionic PWA elements is a companion package that will polyfill certain browser APIs that provide no user interface with custom Ionic UI.diff --git a/web/docs/guides/with-nextjs.mdx b/web/docs/guides/with-nextjs.mdxindex 55455c1a7e4..f12a79fd8eb 100644--- a/web/docs/guides/with-nextjs.mdx+++ b/web/docs/guides/with-nextjs.mdx@@ -177,10 +177,28 @@ cd supabase-nextjsThen let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install @supabase/supabase-js```+</TabItem>+<TabItem value="YARN">++```bash+yarn add @supabase/supabase-js+```++</TabItem>+</Tabs>+And finally we want to save the environment variables in a `.env.local`.All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).@@ -416,10 +434,28 @@ export default function Home() {Once that's done, run this in a terminal window:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm run dev```+</TabItem>+<TabItem value="YARN">++```bash+yarn dev+```++</TabItem>+</Tabs>+And then open the browser to [localhost:3000](http://localhost:3000) and you should see the completed app.diff --git a/web/docs/guides/with-react.mdx b/web/docs/guides/with-react.mdxindex d59a74686e8..cf82aa974cb 100644--- a/web/docs/guides/with-react.mdx+++ b/web/docs/guides/with-react.mdx@@ -167,17 +167,54 @@ Let's start building the React app from scratch.We can use [Create React App](https://create-react-app.dev/docs/getting-started/) to initializean app called `supabase-react`:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpx create-react-app supabase-react --use-npmcd supabase-react```+</TabItem>+<TabItem value="YARN">++```bash+npx create-react-app supabase-react+cd supabase-react+```++</TabItem>+</Tabs>+Then let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install @supabase/supabase-js```+</TabItem>+<TabItem value="YARN">++```bash+yarn add @supabase/supabase-js+```++</TabItem>+</Tabs>+And finally we want to save the environment variables in a `.env`.All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).@@ -407,10 +444,28 @@ export default function App() {Once that's done, run this in a terminal window:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm start```+</TabItem>+<TabItem value="YARN">++```bash+yarn start+```++</TabItem>+</Tabs>+And then open the browser to [localhost:3000](http://localhost:3000) and you should see the completed app.@@ -421,7 +476,7 @@ Every Supabase project is configured with [Storage](/docs/guides/storage) for ma### Add @reach/visually-hidden-The upload widget uses one additional npm library. You can install it like so: `npm install @reach/visually-hidden`.+The upload widget uses one additional npm library. You can install it like so: `npm install @reach/visually-hidden` or `yarn add @reach/visually-hidden`.### Create an upload widgetdiff --git a/web/docs/guides/with-solidjs.mdx b/web/docs/guides/with-solidjs.mdxindex bd54f96c916..cc5b32aeb98 100644--- a/web/docs/guides/with-solidjs.mdx+++ b/web/docs/guides/with-solidjs.mdx@@ -173,10 +173,28 @@ cd supabase-solidThen let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install @supabase/supabase-js```+</TabItem>+<TabItem value="YARN">++```bash+yarn add @supabase/supabase-js+```++</TabItem>+</Tabs>+And finally we want to save the environment variables in a `.env`.All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).@@ -407,10 +425,28 @@ export default () => {Once that's done, run this in a terminal window:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm start```+</TabItem>+<TabItem value="YARN">++```bash+yarn start+```++</TabItem>+</Tabs>+And then open the browser to [localhost:3000](http://localhost:3000) and you should see the completed app.diff --git a/web/docs/guides/with-svelte.mdx b/web/docs/guides/with-svelte.mdxindex 5eea641007b..db36791555d 100644--- a/web/docs/guides/with-svelte.mdx+++ b/web/docs/guides/with-svelte.mdx@@ -159,10 +159,28 @@ cd supabase-svelteThen let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install @supabase/supabase-js```+</TabItem>+<TabItem value="YARN">++```bash+yarn add @supabase/supabase-js+```++</TabItem>+</Tabs>+And finally we want to save the environment variables in a `.env`.All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).@@ -174,16 +192,52 @@ SVELTE_APP_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEYOur app is almost functional, to make svelte work with supabase and .env files we first need to change the `rollup.config.js` file a bit.Supabase imports `json` files, to convert .json files to ES6 modules we need the `@rollup/plugin-json` install it by running:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">++```bash+npm install --save-dev @rollup/plugin-json+```++</TabItem>+<TabItem value="YARN">+```bash- npm install --save-dev @rollup/plugin-json+yarn add --save-dev @rollup/plugin-json```+</TabItem>+</Tabs>+Furthermore, to use the .env with svelte we need another rollup plugin. Install:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">++```bash+npm install --save-dev dotenv @rollup/plugin-replace+```++</TabItem>+<TabItem value="YARN">+```bash- npm install --save-dev dotenv @rollup/plugin-replace+yarn add --save-dev dotenv @rollup/plugin-replace```+</TabItem>+</Tabs>+and add these plugins to the `rollup.config.js` file.```js title="rollup.config.js"@@ -421,10 +475,28 @@ Now that we have all the components in place, let's update `App.svelte`:Once that's done, run this in a terminal window:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm run dev```+</TabItem>+<TabItem value="YARN">++```bash+yarn dev+```++</TabItem>+</Tabs>+And then open the browser to [localhost:5000](http://localhost:5000) and you should see the completed app.> ⚠️ WARNING: Svelte uses by default `port 5000`, Supabase uses `port 3000`. To change the redirection port for supabase go to: `Authentication > Settings` and change the `Site Url` to `localhost:5000`diff --git a/web/docs/guides/with-sveltekit.mdx b/web/docs/guides/with-sveltekit.mdxindex 54e29557966..677d5526e1b 100644--- a/web/docs/guides/with-sveltekit.mdx+++ b/web/docs/guides/with-sveltekit.mdx@@ -153,17 +153,54 @@ Let's start building the Svelte app from scratch.We can use the [SvelteKit Skeleton Project](https://kit.svelte.dev/docs) to initializean app called `supabase-sveltekit`:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm init svelte@next supabase-sveltekitcd supabase-sveltekit```+</TabItem>+<TabItem value="YARN">++```bash+yarn init svelte@next supabase-sveltekit+cd supabase-sveltekit+```++</TabItem>+</Tabs>+Then let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install @supabase/supabase-js```+</TabItem>+<TabItem value="YARN">++```bash+yarn add @supabase/supabase-js+```++</TabItem>+</Tabs>+And finally we want to save the environment variables in a `.env`.All we need are the `SUPABASE_URL` and the `SUPABASE_KEY` key that you copied [earlier](#get-the-api-keys).@@ -384,10 +421,28 @@ Now that we have all the components in place, let's update `src/routes/index.sveOnce that's done, run this in a terminal window:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm run dev```+</TabItem>+<TabItem value="YARN">++```bash+yarn dev+```++</TabItem>+</Tabs>+And then open the browser to [localhost:3000](http://localhost:3000) and you should see the completed app.> ⚠️ WARNING: Svelte uses by default `port 5000`, Supabase uses `port 3000`. To change the redirection port for supabase go to: `Authentication > Settings` and change the `Site Url` to `localhost:5000`diff --git a/web/docs/guides/with-vue-3.mdx b/web/docs/guides/with-vue-3.mdxindex ca13fb64eee..ff3d51ca259 100644--- a/web/docs/guides/with-vue-3.mdx+++ b/web/docs/guides/with-vue-3.mdx@@ -152,6 +152,14 @@ Let's start building the Vue 3 app from scratch.We can quickly use [Vite with Vue 3 Template](https://vitejs.dev/guide/#scaffolding-your-first-vite-project) to initializean app called `supabase-vue-3`:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bash# npm 6.xnpm init @vitejs/app supabase-vue-3 --template vue@@ -162,12 +170,42 @@ npm init @vitejs/app supabase-vue-3 -- --template vuecd supabase-vue-3```+</TabItem>+<TabItem value="YARN">++```bash+yarn init @vitejs/app supabase-vue-3 --template vue++cd supabase-vue-3+```++</TabItem>+</Tabs>+Then let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm install @supabase/supabase-js```+</TabItem>+<TabItem value="YARN">++```bash+yarn add @supabase/supabase-js+```++</TabItem>+</Tabs>+And finally we want to save the environment variables in a `.env`.All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).@@ -449,10 +487,28 @@ export default {Once that's done, run this in a terminal window:+<Tabs+defaultValue="NPM"+values={[+ {label: 'npm', value: 'NPM'},+ {label: 'Yarn', value: 'YARN'},+]}>+<TabItem value="NPM">+```bashnpm run dev```+</TabItem>+<TabItem value="YARN">++```bash+yarn dev+```++</TabItem>+</Tabs>+And then open the browser to [localhost:3000](http://localhost:3000) and you should see the completed app.