The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Fix frameworks component
Joshen Lim9659e8e4e1f8
diff --git a/apps/temp-docs/components/ButtonCard.tsx b/apps/temp-docs/components/ButtonCard.tsxindex bc6febc0895..8ac61494589 100644--- a/apps/temp-docs/components/ButtonCard.tsx+++ b/apps/temp-docs/components/ButtonCard.tsx@@ -2,10 +2,10 @@ import React from 'react'import Link from 'next/link'export default function ButtonCard({- children,- icon,+ children = undefined,+ icon = undefined,title,- description,+ description = '',to,layout = 'vertical',}) {diff --git a/apps/temp-docs/components/CustomMDX/CustomMDX.utils.ts b/apps/temp-docs/components/CustomMDX/CustomMDX.utils.tsindex 3d4ba64ab3d..f768c93215d 100644--- a/apps/temp-docs/components/CustomMDX/CustomMDX.utils.ts+++ b/apps/temp-docs/components/CustomMDX/CustomMDX.utils.ts@@ -11,6 +11,7 @@ export const removeAnchor = (text: any) => {if (typeof text !== 'string') {return text} else {- return text.slice(0, text.indexOf('{#'))+ if (text.indexOf('{#') > 0) return text.slice(0, text.indexOf('{#'))+ else return text}}diff --git a/apps/temp-docs/components/Frameworks.tsx b/apps/temp-docs/components/Frameworks.tsxnew file mode 100644index 00000000000..69eb20ac53e--- /dev/null+++ b/apps/temp-docs/components/Frameworks.tsx@@ -0,0 +1,99 @@+import ButtonCard from './ButtonCard'++const Frameworks = () => {+ const frameworks = [+ {+ name: 'Angular',+ // logo: AngularLogo,+ href: '/guides/with-angular',+ },+ {+ name: 'Expo',+ // logo: ExpoLogo,+ href: '/guides/with-expo',+ },+ {+ name: 'Flutter',+ // logo: FlutterLogo,+ href: '/guides/with-flutter',+ },+ {+ name: 'JavaScript',+ // logo: JavascriptLogo,+ href: '/reference/javascript/installing#javascript',+ },+ {+ name: 'Next.js',+ themed: true,+ logo: {+ dark: '/img/libraries/nextjs-dark-icon.svg',+ light: '/img/libraries/nextjs-light-icon.svg',+ },+ href: '/guides/with-nextjs',+ },+ {+ name: 'React',+ // logo: ReactLogo,+ href: '/guides/with-react',+ },+ {+ name: 'RedwoodJS',+ // logo: RedwoodJsLogo,+ href: '/guides/with-redwoodjs',+ },+ {+ name: 'SolidJS',+ // logo: SolidJSLogo,+ href: '/guides/with-solidjs',+ },+ {+ name: 'Svelte',+ // logo: SvelteLogo,+ href: '/guides/with-svelte',+ },+ {+ name: 'Vue',+ // logo: VuejsLogo,+ href: '/guides/with-vue-3',+ },+ ]+ return (+ <div className="grid grid-cols-12 gap-4">+ {frameworks.map((x) => (+ <div key={x.name} className="col-span-3">+ <ButtonCard+ layout="horizontal"+ to={x.href}+ title={x.name}+ // icon={+ // x.logo && !x.themed ? (+ // <x.logo+ // width="20"+ // alt={x.name}+ // style={{ display: 'block', maxHeight: 20, minWidth: 20 }}+ // />+ // ) : (+ // <ThemedImage+ // style={{+ // display: 'block',+ // maxHeight: 20,+ // minWidth: 20,+ // margin: 0,+ // }}+ // alt={x.name}+ // width="20"+ // sources={{+ // light: useBaseUrl(x.logo.light),+ // dark: useBaseUrl(x.logo.dark),+ // }}+ // />+ // )+ // }+ />+ </div>+ ))}+ </div>+ )+}++export default Frameworksdiff --git a/apps/temp-docs/components/index.tsx b/apps/temp-docs/components/index.tsxindex 06b795d6029..21de059e999 100644--- a/apps/temp-docs/components/index.tsx+++ b/apps/temp-docs/components/index.tsx@@ -4,6 +4,7 @@ import { Tabs, Alert } from 'ui'import CodeBlock from './CodeBlock/CodeBlock'import ButtonCard from './ButtonCard'+import Frameworks from './Frameworks'import { H3, H4 } from './CustomMDX'const components = {@@ -11,6 +12,7 @@ const components = {h4: H4,Alert,ButtonCard,+ Frameworks,Tabs,TabPanel: (props: any) => <Tabs.Panel {...props}>{props.children}</Tabs.Panel>,code: (props: any) => <CodeBlock {...props} />,diff --git a/apps/temp-docs/docs/guides/auth.mdx b/apps/temp-docs/docs/guides/auth.mdxindex f292dccfa2b..d5810112520 100644--- a/apps/temp-docs/docs/guides/auth.mdx+++ b/apps/temp-docs/docs/guides/auth.mdx@@ -8,7 +8,7 @@ sidebar_label: Overviewimport Link from '@docusaurus/Link'import Tabs from '@theme/Tabs'import TabItem from '@theme/TabItem'-import providers from '@site/src/data/authProviders'+import providers from '../../data/authProviders'import ButtonCard from '@site/src/components/ButtonCard'import useBaseUrl from '@docusaurus/useBaseUrl'@@ -50,12 +50,7 @@ We provide a suite of Providers and login methods, as well as [Auth helpers](/do<div class="row is-multiline">{providers.map((x) => (<div key={x.name} class="col col--6">- <ButtonCard- class="card"- to={useBaseUrl(x.href)}- title={x.name}- style={{ height: '100%' }}- >+ <ButtonCard class="card" to={useBaseUrl(x.href)} title={x.name} style={{ height: '100%' }}><div class="button-card__inner"><divclass=""@@ -135,12 +130,7 @@ Authentication only gets you so far. When you need granular authorization rules,[Policies](https://www.postgresql.org/docs/current/sql-createpolicy.html) are PostgreSQL's rule engine. They are incredibly powerful and flexible, allowing you to write complex SQL rules which fit your unique business needs.<video width="99%" muted playsInline controls="true">- <source- src="/docs/videos/policies-zoom2.mp4"- type="video/mp4"- muted- playsInline- />+ <source src="/docs/videos/policies-zoom2.mp4" type="video/mp4" muted playsInline /></video>With policies, your database becomes the rules engine. Instead of repetitively filtering your queries, like this ...@@ -178,6 +168,7 @@ Supabase provides a special function in Postgres, `auth.uid()`, which extracts t## User ManagementSupabase provides multiple endpoints to authenticate and manage your users:+- [Sign up](/docs/reference/javascript/auth-signup)- [Sign in with password](/docs/reference/javascript/auth-signinwithpassword)- [Sign in with passwordless / one-time password (OTP)](/docs/reference/javascript/auth-signinwithotp)@@ -187,10 +178,5 @@ Supabase provides multiple endpoints to authenticate and manage your users:When users sign up, Supabase assigns them a unique ID. You can reference this ID anywhere in your database. For example, you might create a `profiles` table referencing `id` in the `auth.users` table using a `user_id` field.<video width="99%" muted playsInline controls="true">- <source- src="/docs/videos/auth-zoom2.mp4"- type="video/mp4"- muted- playsInline- />+ <source src="/docs/videos/auth-zoom2.mp4" type="video/mp4" muted playsInline /></video>diff --git a/apps/temp-docs/docs/introduction.mdx b/apps/temp-docs/docs/introduction.mdxindex a0fef3002a1..003cfe879e1 100644--- a/apps/temp-docs/docs/introduction.mdx+++ b/apps/temp-docs/docs/introduction.mdx@@ -5,41 +5,81 @@ description: 'Introduction to Supabase'# Introduction-Supabase is an open source Firebase alternative.+Supabase is an open source Firebase alternative providing all the backend features you need to build a product.+You can use it completely, or just the features you need.-It provides all the backend services you need to build a product. You can use it completely, or just the services you require:+[Start a project](https://app.supabase.com) with the hosted platform or learn how to [host Supabase](/docs/guides/hosting/overview) yourself.-<LinkCardsWrapper>- <LinkCard title="Database" description="A dedicated, scalable Postgres database" />- <LinkCard title="Auth" description="User management with Row Level Security" />- <LinkCard title="File Storage" description="Store, organize, and serve large files" />- <LinkCard title="Auto-generated APIs" description="Instantly generate APIs for your database" />-</LinkCardsWrapper>+## Learn about features-## Getting Started+<div className="grid grid-cols-12 gap-4">+ <div class="col-span-4">+ <ButtonCard+ class="card"+ to={'/guides/auth'}+ title={'Auth'}+ description={'User management with Row Level Security.'}+ style={{ height: '100%' }}+ />+ </div>+ <div class="col-span-4">+ <ButtonCard+ class="card"+ to={'/guides/api'}+ title={'Auto-generated APIs'}+ description={'Instantly generate APIs for your database.'}+ style={{ height: '100%' }}+ />+ </div>+ <div class="col-span-4">+ <ButtonCard+ class="card"+ to={'/guides/database'}+ title={'Database'}+ description={'A dedicated, scalable Postgres database.'}+ style={{ height: '100%' }}+ />+ </div>+ <div class="col-span-4">+ <ButtonCard+ class="card"+ to={'/guides/functions'}+ title={'Edge Functions'}+ description={'Server-side functions, distributed globally.'}+ style={{ height: '100%' }}+ />+ </div>+ <div class="col-span-4">+ <ButtonCard+ class="card"+ to={'/guides/realtime'}+ title={'Realtime'}+ description={'Build with Broadcast, Presence, and Postgres CDC.'}+ style={{ height: '100%' }}+ />+ </div>+ <div class="col-span-4">+ <ButtonCard+ class="card"+ to={'/guides/storage'}+ title={'File Storage'}+ description={'Store, organize, and serve large files.'}+ style={{ height: '100%' }}+ />+ </div>+ <div class="col-span-4">+ <ButtonCard+ class="card"+ to={'/guides/platform/logs'}+ title={'Observability'}+ description={'Monitor and debug your infrastucture.'}+ style={{ height: '100%' }}+ />+ </div>+</div>-Visit [app.supabase.com](https://app.supabase.com) to get started with the hosted platform or visit the self-hosting docs to learn how to host Supabase yourself.+## Start with a frameworkSupabase is just Postgres, which makes it compatible with a large number of tools and frameworks.-<LinkCardsWrapper>- <LinkCard class="lg:w-1/4" title="Angular" />- <LinkCard class="lg:w-1/4" title="Expo" />- <LinkCard class="lg:w-1/4" title="Flutter" />- <LinkCard class="lg:w-1/4" title="Javascript" />- <LinkCard class="lg:w-1/4" title="Next.js" />- <LinkCard class="lg:w-1/4" title="React" />- <LinkCard class="lg:w-1/4" title="Svelte" />- <LinkCard class="lg:w-1/4" title="Vue" />-</LinkCardsWrapper>--## How to use these docs--The documentation is divided into 3 sections.--<LinkCardsWrapper>- <LinkCard title="Overview" description="A summary of the tools and how to get started" />- <LinkCard title="Overview" description="A summary of the tools and how to get started" />- <LinkCard title="Overview" description="A summary of the tools and how to get started" />- <LinkCard title="Overview" description="A summary of the tools and how to get started" />-</LinkCardsWrapper>+<Frameworks />diff --git a/apps/temp-docs/layouts/Default.tsx b/apps/temp-docs/layouts/Default.tsxindex d15f7b876dd..70249457a05 100644--- a/apps/temp-docs/layouts/Default.tsx+++ b/apps/temp-docs/layouts/Default.tsx@@ -54,7 +54,9 @@ const Layout = ({<SideBar menuItems={menuItems} /><div className="docs-width grid grid-cols-12 gap-4 justify-between p-4 pb-8 w-full"><div- className={`${meta?.hide_table_of_contents ? 'col-span-12' : 'col-span-8'} py-4 px-8`}+ className={`${+ meta?.hide_table_of_contents ? 'col-span-12' : 'col-span-10 xl:col-span-8'+ } py-4 px-8`}><article className="prose dark:prose-dark dark:bg-scale-200 width-full mt-8">{children}