Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Updates framework quickstarts and adds redwoodjs stub

David Thyressond46c7a5797c1
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index 6584e64d2e4..29812349cbd 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -54,6 +54,7 @@ export const gettingstarted = {
items: [
{ name: 'React', url: '/guides/getting-started/quickstarts/reactjs' },
{ name: 'NextJS', url: '/guides/getting-started/quickstarts/nextjs' },
+ { name: 'RedwoodJS', url: '/guides/getting-started/quickstarts/redwoodjs' },
{ name: 'Flutter', url: '/guides/getting-started/quickstarts/flutter' },
{ name: 'SvelteKit', url: '/guides/getting-started/quickstarts/sveltekit' },
{ name: 'SolidJS', url: '/guides/getting-started/quickstarts/solidjs' },
diff --git a/apps/docs/pages/guides/getting-started.mdx b/apps/docs/pages/guides/getting-started.mdx
index bb335915b34..74e1b3b94f6 100644
--- a/apps/docs/pages/guides/getting-started.mdx
+++ b/apps/docs/pages/guides/getting-started.mdx
@@ -99,6 +99,13 @@ export const quickstarts = [
'Learn how to create a Supabase project, add some sample data to your database, and query the data from a NextJS app.',
icon: '/docs/img/icons/nextjs-icon',
},
+ {
+ title: 'RedwoodJS',
+ href: '/guides/getting-started/quickstarts/redwoodjs',
+ description:
+ 'Learn how to create a Supabase project, add some sample data to your database using Prisma migration and seeds, and query the data from a RedwoodJS app.',
+ icon: '/docs/img/icons/redwood-icon',
+ },
{
title: 'Flutter',
href: '/guides/getting-started/quickstarts/flutter',
@@ -106,6 +113,27 @@ export const quickstarts = [
'Learn how to create a Supabase project, add some sample data to your database, and query the data from a Flutter app.',
icon: '/docs/img/icons/flutter-icon',
},
+ {
+ title: 'SvelteKit',
+ href: '/guides/getting-started/quickstarts/sveltekit',
+ description:
+ 'Learn how to create a Supabase project, add some sample data to your database, and query the data from a SvelteKit app.',
+ icon: '/docs/img/icons/svelte-icon',
+ },
+ {
+ title: 'SolidJS',
+ href: '/guides/getting-started/quickstarts/solidjs',
+ description:
+ 'Learn how to create a Supabase project, add some sample data to your database, and query the data from a SolidJS app.',
+ icon: '/docs/img/icons/solidjs-icon',
+ },
+ {
+ title: 'Vue',
+ href: '/guides/getting-started/quickstarts/solidjs',
+ description:
+ 'Learn how to create a Supabase project, add some sample data to your database, and query the data from a Vue app.',
+ icon: '/docs/img/icons/vuejs-icon',
+ },
]
export const webapps = [
diff --git a/apps/docs/pages/guides/getting-started/quickstarts/redwoodjs.mdx b/apps/docs/pages/guides/getting-started/quickstarts/redwoodjs.mdx
new file mode 100644
index 00000000000..24a80dd5ac3
--- /dev/null
+++ b/apps/docs/pages/guides/getting-started/quickstarts/redwoodjs.mdx
@@ -0,0 +1,142 @@
+import Layout from '~/layouts/DefaultGuideLayout'
+import StepHikeCompact from '~/components/StepHikeCompact'
+
+export const meta = {
+ title: 'Use Supabase with RedwoodJS',
+ subtitle:
+ 'Learn how to create a Supabase project, add some sample data to your database using Prisma migration and seeds, and query the data from a RedwoodJS app.',
+ breadcrumb: 'Framework Quickstarts',
+}
+
+<StepHikeCompact>
+
+ <StepHikeCompact.Step step={1}>
+
+ <StepHikeCompact.Details title="Create a React app">
+
+ Create a RedwoodJS app with TypeScript.
+
+ </StepHikeCompact.Details>
+
+ <StepHikeCompact.Code>
+
+ ```bash Terminal
+ npm create redwood-app my-app --ts
+ ```
+
+ </StepHikeCompact.Code>
+
+ </StepHikeCompact.Step>
+
+ <StepHikeCompact.Step step={3}>
+ <StepHikeCompact.Details title="Install the Supabase client library">
+
+ The fastest way to get started is to use the `supabase-js` client library which provides a convenient interface for working with Supabase from a React app.
+
+ Navigate to the React app and install `supabase-js`.
+
+ </StepHikeCompact.Details>
+
+ <StepHikeCompact.Code>
+
+ ```bash Terminal
+ cd my-app && npm install @supabase/supabase-js
+ ```
+
+ </StepHikeCompact.Code>
+
+ </StepHikeCompact.Step>
+
+ <StepHikeCompact.Step step={2}>
+ <StepHikeCompact.Details title="Set up a Supabase project with sample data">
+
+ [Create a new project](https://app.supabase.com) in the Supabase Dashboard.
+
+ After your project is ready, create a table in your Supabase database using the [SQL Editor](https://app.supabase.com/project/_/sql) in the Dashboard. Use the following SQL statement to create a `countries` table with some sample data.
+
+ </StepHikeCompact.Details>
+
+ <StepHikeCompact.Code>
+
+ ```sql SQL_EDITOR
+ -- Create the table
+ CREATE TABLE countries (
+ id SERIAL PRIMARY KEY,
+ name VARCHAR(255) NOT NULL
+ );
+ -- Insert some sample data into the table
+ INSERT INTO countries (name) VALUES ('United States');
+ INSERT INTO countries (name) VALUES ('Canada');
+ INSERT INTO countries (name) VALUES ('Mexico');
+ ````
+
+ </StepHikeCompact.Code>
+
+ </StepHikeCompact.Step>
+
+ <StepHikeCompact.Step step={4}>
+ <StepHikeCompact.Details title="Query data from the app">
+
+ In `App.jsx`, create a Supabase client using your [Project URL and public API (anon) key](https://app.supabase.com/project/_/settings/api).
+
+ Add a `getCountries` function to fetch the data and display the query result to the page.
+
+ </StepHikeCompact.Details>
+ <StepHikeCompact.Code>
+
+
+ ```js src/App.jsx
+ import { useEffect, useState } from "react";
+ import { createClient } from "@supabase/supabase-js";
+
+ const supabase = createClient("https://<project>.supabase.co", "<your-anon-key>");
+
+ function App() {
+ const [countries, setCountries] = useState([]);
+
+ useEffect(() => {
+ getCountries();
+ }, []);
+
+ async function getCountries() {
+ const { data } = await supabase.from("countries").select();
+ setCountries(data);
+ }
+
+ return (
+ <ul>
+ {countries.map((country) => (
+ <li key={country.name}>{country.name}</li>
+ ))}
+ </ul>
+ );
+ }
+
+ export default App;
+ ```
+
+ </StepHikeCompact.Code>
+
+ </StepHikeCompact.Step>
+
+ <StepHikeCompact.Step step={5}>
+ <StepHikeCompact.Details title="Start the app">
+
+ Start the app, go to http://localhost:5173 in a browser, and open the browser console and you should see the list of countries.
+
+ </StepHikeCompact.Details>
+
+ <StepHikeCompact.Code>
+
+ ```bash Terminal
+ npm run dev
+ ```
+
+ </StepHikeCompact.Code>
+
+ </StepHikeCompact.Step>
+</StepHikeCompact>
+
+export const Page = ({ children }) => <Layout meta={meta} children={children} hideToc={true} />
+
+export default Page
diff --git a/package-lock.json b/package-lock.json
index e543f27be8b..1425ffa5ac0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -38016,6 +38016,8 @@
},
"packages/config/node_modules/@tailwindcss/forms": {
"version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.3.tgz",
+ "integrity": "sha512-y5mb86JUoiUgBjY/o6FJSFZSEttfb3Q5gllE4xoKjAAD+vBrnIhE4dViwUuow3va8mpH4s9jyUbUbrRGoRdc2Q==",
"license": "MIT",
"dependencies": {
"mini-svg-data-uri": "^1.2.3"
@@ -38124,6 +38126,8 @@
},
"packages/ui/node_modules/typescript": {
"version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.4.tgz",
+ "integrity": "sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew==",
"dev": true,
"license": "Apache-2.0",
"bin": {
@@ -38750,6 +38754,8 @@
},
"tests/node_modules/array-union": {
"version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -38813,6 +38819,8 @@
},
"tests/node_modules/globby": {
"version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
+ "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -48564,6 +48572,8 @@
"dependencies": {
"@tailwindcss/forms": {
"version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.3.tgz",
+ "integrity": "sha512-y5mb86JUoiUgBjY/o6FJSFZSEttfb3Q5gllE4xoKjAAD+vBrnIhE4dViwUuow3va8mpH4s9jyUbUbrRGoRdc2Q==",
"requires": {
"mini-svg-data-uri": "^1.2.3"
}
@@ -65155,6 +65165,8 @@
},
"array-union": {
"version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dev": true
},
"eslint": {
@@ -65204,6 +65216,8 @@
},
"globby": {
"version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
+ "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
"dev": true,
"requires": {
"array-union": "^2.1.0",
@@ -66154,6 +66168,8 @@
},
"typescript": {
"version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.4.tgz",
+ "integrity": "sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew==",
"dev": true
}
}