The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
refactor definition list in product cards
Francesco Sansalvadore223d3a3f6e84
diff --git a/apps/www/components/Panel/index.tsx b/apps/www/components/Panel/index.tsxindex 107243508f7..f88a5fb2b16 100644--- a/apps/www/components/Panel/index.tsx+++ b/apps/www/components/Panel/index.tsx@@ -71,7 +71,7 @@ const Panel = ({ref={outerRef}className={['relative z-0 rounded-xl bg-gradient-to-b from-background-surface-300 to-scale-400 p-px shadow-md',- !trackCursor && hasActiveOnHover ? 'hover:bg-none hover:!bg-scale-800' : '',+ !trackCursor && hasActiveOnHover ? 'hover:bg-none hover:!bg-scale-700' : '',outerClassName,].join(' ')}whileHover="hover"diff --git a/apps/www/components/Products/AuthVisual.tsx b/apps/www/components/Products/AuthVisual.tsxindex 95f1cfb8877..9670dce6bb5 100644--- a/apps/www/components/Products/AuthVisual.tsx+++ b/apps/www/components/Products/AuthVisual.tsx@@ -3,7 +3,7 @@ import React from 'react'const AuthVisual = () => {return (- <span+ <figureclassName="absolute inset-0 z-0"role="img"aria-label="Supabase Authentication provides Row Level Security which enables you to define custom Policies to restrict access to your database"@@ -26,7 +26,7 @@ const AuthVisual = () => {className="antialiased"quality={100}/>- </span>+ </figure>)}diff --git a/apps/www/components/Products/DatabaseVisual.tsx b/apps/www/components/Products/DatabaseVisual.tsxindex 060134917f1..d935a32f934 100644--- a/apps/www/components/Products/DatabaseVisual.tsx+++ b/apps/www/components/Products/DatabaseVisual.tsx@@ -9,24 +9,27 @@ const DatabaseVisual = () => {const handleGlow = (event: any) => {if (!ref.current || !containerRef.current) return null- const svgElement = ref.current as SVGElementconst containerRefElement = containerRef.current as HTMLDivElement- const { x: svgX, y: svgY } = svgElement.getBoundingClientRect()const {x: contX,y: contY,width: containerWidth,height: containerHeight,} = containerRefElement.getBoundingClientRect()- const x = event.clientX - svgX- const y = event.clientY - svgYconst xCont = event.clientX - contXconst yCont = event.clientY - contY- setIsActive(+ const isContainerHovered =xCont > -3 && xCont < containerWidth + 3 && yCont > -3 && yCont < containerHeight + 3- )+ setIsActive(isContainerHovered)++ if (!isContainerHovered) return++ const svgElement = ref.current as SVGElement+ const { x: svgX, y: svgY } = svgElement.getBoundingClientRect()+ const x = event.clientX - svgX+ const y = event.clientY - svgYsetGradientPos({ x, y })}@@ -40,7 +43,7 @@ const DatabaseVisual = () => {}, [])return (- <span+ <figureclassName="absolute inset-0 z-0"ref={containerRef}role="img"@@ -344,7 +347,7 @@ const DatabaseVisual = () => {</defs></svg></span>- </span>+ </figure>)}diff --git a/apps/www/components/Products/FunctionsVisual.tsx b/apps/www/components/Products/FunctionsVisual.tsxindex f0468129e2e..ead3f202bbf 100644--- a/apps/www/components/Products/FunctionsVisual.tsx+++ b/apps/www/components/Products/FunctionsVisual.tsx@@ -23,7 +23,7 @@ const FunctionsVisual = () => {},}return (- <span+ <figureclassName="absolute inset-0 z-0"role="img"aria-label="Supabase Edge Functions visual composition"@@ -131,7 +131,7 @@ const FunctionsVisual = () => {className="antialiased"quality={100}/>- </span>+ </figure>)}diff --git a/apps/www/components/Products/ProductCard.tsx b/apps/www/components/Products/ProductCard.tsxindex 0d8507e0308..241527e0da0 100644--- a/apps/www/components/Products/ProductCard.tsx+++ b/apps/www/components/Products/ProductCard.tsx@@ -35,51 +35,44 @@ const ProductCard = ({hasShimmerhasActiveOnHoverouterClassName="relative w-full h-full shadow-lg p-0"- innerClassName="relative overflow-hidden flex-1 flex flex-col items-center gap-5 lg:items-start justify-between w-full rounded-xl h-full bg-surface-100"+ innerClassName={[+ `relative overflow-hidden flex-1 flex flex-col items-center gap-5 lg:items-start justify-between+ bg-surface-100 w-full rounded-xl h-full`,+ ].join(' ')}><divclassName={[- `relative flex-1 flex flex-col items-center gap-5 lg:items-start justify-between- w-full rounded-xl h-full px-6 py-8`,- alignLeft && 'lg:px-8',+ 'relative z-10 flex flex-col lg:h-full gap-1 text-scale-1200 mx-auto items-center text-center h-full px-6 py-8',+ alignLeft && 'lg:mx-0 lg:pl-8 lg:items-start lg:text-left lg:max-w-[260px]',].join(' ')}>- <dl- className={[- 'relative z-10 flex flex-col lg:h-full gap-1 text-scale-1200 mx-auto items-center text-center',- alignLeft && 'lg:mx-0 lg:items-start lg:text-left lg:max-w-[200px]',- ].join(' ')}- >- <div className="flex items-center justify-center h-12 w-12 bg-alternative rounded-lg mb-3">- {icon && (- <svg- width="25"- height="25"- viewBox="0 0 25 25"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <path- d={icon}- stroke="var(--colors-brand9)"- strokeMiterlimit="10"- strokeLinejoin="round"- strokeLinecap="round"- strokeWidth="1.5"- />- </svg>- )}- </div>- <dt>- <h2 className="text-xl">{title}</h2>- </dt>- <dd className="flex-1 flex flex-col justify-between gap-2">- <p className="text-sm text-scale-1000">{subtitle}</p>- {highlights && <div className="hidden lg:block">{highlights}</div>}- </dd>- </dl>- {image}+ <div className="flex items-center justify-center h-12 w-12 bg-alternative rounded-lg mb-3">+ {icon && (+ <svg+ width="25"+ height="25"+ viewBox="0 0 25 25"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ d={icon}+ stroke="var(--colors-brand9)"+ strokeMiterlimit="10"+ strokeLinejoin="round"+ strokeLinecap="round"+ strokeWidth="1.5"+ />+ </svg>+ )}+ </div>+ <h2 className="text-xl">{title}</h2>+ <div className="flex-1 flex flex-col justify-between gap-2">+ <p className="text-sm text-scale-1000">{subtitle}</p>+ {highlights && <span className="hidden lg:block">{highlights}</span>}+ </div></div>+ {image}</Panel></a></Link>diff --git a/apps/www/components/Products/RealtimeVisual.tsx b/apps/www/components/Products/RealtimeVisual.tsxindex 43075251db5..e144c47c794 100644--- a/apps/www/components/Products/RealtimeVisual.tsx+++ b/apps/www/components/Products/RealtimeVisual.tsx@@ -3,7 +3,7 @@ import React from 'react'const RealtimeVisual = () => {return (- <span+ <figureclassName="absolute inset-0 z-0 overflow-hidden"style={{background: 'radial-gradient(320px 320px at 30% 100%, #85E0B740, transparent)',@@ -28,7 +28,7 @@ const RealtimeVisual = () => {objectPosition="50% 50%"objectFit="cover"/>- </span>+ </figure>)}diff --git a/apps/www/components/Products/StorageVisual.tsx b/apps/www/components/Products/StorageVisual.tsxindex b56beef3cec..491317a8438 100644--- a/apps/www/components/Products/StorageVisual.tsx+++ b/apps/www/components/Products/StorageVisual.tsx@@ -10,7 +10,7 @@ const StorageVisual = () => {]return (- <span+ <figureclassName="absolute inset-0 overflow-hidden flex nowrap"role="img"aria-label="Supabase Storage supports images, documents and videos"@@ -28,7 +28,7 @@ const StorageVisual = () => {))}</div>))}- </span>+ </figure>)}diff --git a/apps/www/components/Products/VectorVisual.tsx b/apps/www/components/Products/VectorVisual.tsxindex 7735bab9785..426b634af59 100644--- a/apps/www/components/Products/VectorVisual.tsx+++ b/apps/www/components/Products/VectorVisual.tsx@@ -1,9 +1,7 @@-import { useBreakpoint } from 'common'import Image from 'next/image'import React, { useEffect, useRef, useState } from 'react'const VectorVisual = () => {- const isTablet = useBreakpoint(1023)const containerRef = useRef(null)const ref = useRef(null)const [isActive, setIsActive] = useState(false)@@ -12,24 +10,27 @@ const VectorVisual = () => {const handleGlow = (event: any) => {if (!ref.current || !containerRef.current) return null- const svgElement = ref.current as SVGElementconst containerRefElement = containerRef.current as HTMLDivElement- const { x: elX, y: elY, width, height } = svgElement.getBoundingClientRect()const {x: contX,y: contY,width: containerWidth,height: containerHeight,} = containerRefElement.getBoundingClientRect()- const x = event.clientX - elX- const y = event.clientY - elYconst xCont = event.clientX - contXconst yCont = event.clientY - contY- setIsActive(+ const isContainerHovered =xCont > -3 && xCont < containerWidth + 3 && yCont > -3 && yCont < containerHeight + 3- )+ setIsActive(isContainerHovered)++ if (!isContainerHovered) return++ const svgElement = ref.current as SVGElement+ const { x: svgX, y: svgY } = svgElement.getBoundingClientRect()+ const x = event.clientX - svgX+ const y = event.clientY - svgYsetGradientPos({ x, y })}@@ -43,7 +44,7 @@ const VectorVisual = () => {}, [])return (- <span+ <figureclassName="absolute inset-0 z-0"ref={containerRef}role="img"@@ -62,17 +63,19 @@ const VectorVisual = () => {stroke="url(#paint0_radial_484_53266)"/><defs>- <radialGradient- id="paint0_radial_484_53266"- cx="0"- cy="0"- r="2"- gradientUnits="userSpaceOnUse"- gradientTransform={`translate(${gradientPos?.x} ${gradientPos.y}) rotate(56.4303) scale(132.019)`}- >- <stop stopColor="#3FCF8E" />- <stop offset="1" stopColor="#3FCF8E" stopOpacity="0" />- </radialGradient>+ {isActive && (+ <radialGradient+ id="paint0_radial_484_53266"+ cx="0"+ cy="0"+ r="2"+ gradientUnits="userSpaceOnUse"+ gradientTransform={`translate(${gradientPos?.x} ${gradientPos.y}) rotate(56.4303) scale(132.019)`}+ >+ <stop stopColor="#3FCF8E" />+ <stop offset="1" stopColor="#3FCF8E" stopOpacity="0" />+ </radialGradient>+ )}</defs></svg>@@ -95,7 +98,7 @@ const VectorVisual = () => {quality={100}/></span>- </span>+ </figure>)}diff --git a/apps/www/components/Products/index.tsx b/apps/www/components/Products/index.tsxindex f6604c46b81..e24ba6ecdeb 100644--- a/apps/www/components/Products/index.tsx+++ b/apps/www/components/Products/index.tsx@@ -62,122 +62,129 @@ const Products = (props: any) => {return (<SectionContainer className="!pt-0">- <dl className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:gap-4 lg:gap-6 md:grid-cols-12">- <ProductCard- alignLeft- url={props.products['database'].url}- icon={props.products['database'].icon}- title={props.products['database'].name}- subtitle={props.products['database'].description}- highlights={- <ul className="flex flex-col gap-1 text-sm">- <li>- <IconCheck className="inline h-4 w-4" /> 100% portable- </li>- <li>- <IconCheck className="inline h-4 w-4" /> Built-in Auth with RLS- </li>- <li>- <IconCheck className="inline h-4 w-4" /> Easy to extend- </li>- </ul>- }- onClick={() => sendTelemetryEvent(PRODUCT_SHORTNAMES.DATABASE)}- image={<DatabaseVisual />}- className="col-span-6 lg:col-span-12 xl:col-span-6"- />- <ProductCard- url={props.products['authentication'].url}- icon={props.products['authentication'].icon}- title={props.products['authentication'].name}- subtitle={- <>- Add user sign ups and logins,- <br className="inline-block sm:hidden lg:inline-block" /> securing your data with Row- Level Security.- </>- }- image={<AuthVisual />}- className="col-span-6 xl:col-span-3"- onClick={() => sendTelemetryEvent(PRODUCT_SHORTNAMES.AUTHENTICATION)}- />- <ProductCard- url={props.products['functions'].url}- icon={props.products['functions'].icon}- title={props.products['functions'].name}- subtitle={- <>- Easily write custom code- <br className="inline-block sm:hidden lg:inline-block" /> without deploying or scaling- servers.- </>- }- onClick={() => sendTelemetryEvent(PRODUCT_SHORTNAMES.FUNCTIONS)}- image={<FunctionsVisual />}- className="col-span-6 xl:col-span-3"- />- <ProductCard- url={props.products['storage'].url}- icon={props.products['storage'].icon}- title={props.products['storage'].name}- subtitle={- <>- Store, organize, and serve large files,- <br className="inline-block xl:hidden 2xl:inline-block" /> from videos to images.- </>- }- image={<StorageVisual />}- className="col-span-6 xl:col-span-3"- onClick={() => sendTelemetryEvent(PRODUCT_SHORTNAMES.STORAGE)}- />- <ProductCard- url={props.products['realtime'].url}- icon={props.products['realtime'].icon}- title={props.products['realtime'].name}- subtitle={- <>- Build multiplayer experiences- <br className="inline-block md:hidden 2xl:inline-block" /> with realtime data- synchronization.- </>- }- onClick={() => sendTelemetryEvent(PRODUCT_SHORTNAMES.REALTIME)}- image={<RealtimeVisual />}- className="col-span-6 xl:col-span-3 hover:!cursor-[url('/images/index/products/realtime-cursor.svg'),_auto]"- />- <ProductCard- alignLeft- url={props.products['vector'].url}- icon={props.products['vector'].icon}- title={props.products['vector'].name}- subtitle={- <>- Integrate your favorite ML-models to store,- <br className="inline-block md:hidden" /> index and search vector embeddings.- </>- }- highlights={- <ul className="flex flex-col gap-1 text-sm">- <li className="flex items-center gap-2">- <Image src="/images/logos/openai.svg" alt="OpenAI logo" width="25" height="25" />- <span>OpenAI</span>- </li>- <li className="flex items-center gap-2">- <Image- src="/images/logos/hugging-face.svg"- alt="Hugging Face logo"- width="25"- height="25"- />- <span>Hugging Face</span>- </li>- </ul>- }- onClick={() => sendTelemetryEvent(PRODUCT_SHORTNAMES.VECTOR)}- image={<VectorVisual />}- className="col-span-6 lg:col-span-12 xl:col-span-6"- />- </dl>+ <ul className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:gap-4 lg:gap-6 md:grid-cols-12">+ <li className="col-span-6 lg:col-span-12 xl:col-span-6">+ <ProductCard+ alignLeft+ url={props.products['database'].url}+ icon={props.products['database'].icon}+ title={props.products['database'].name}+ subtitle={props.products['database'].description}+ highlights={+ <ul className="flex flex-col gap-1 text-sm">+ <li>+ <IconCheck className="inline h-4 w-4" /> 100% portable+ </li>+ <li>+ <IconCheck className="inline h-4 w-4" /> Built-in Auth with RLS+ </li>+ <li>+ <IconCheck className="inline h-4 w-4" /> Easy to extend+ </li>+ </ul>+ }+ onClick={() => sendTelemetryEvent(PRODUCT_SHORTNAMES.DATABASE)}+ image={<DatabaseVisual />}+ />+ </li>+ <li className="col-span-6 xl:col-span-3">+ <ProductCard+ url={props.products['authentication'].url}+ icon={props.products['authentication'].icon}+ title={props.products['authentication'].name}+ subtitle={+ <>+ Add user sign ups and logins,+ <br className="inline-block sm:hidden lg:inline-block" /> securing your data with+ Row Level Security.+ </>+ }+ image={<AuthVisual />}+ onClick={() => sendTelemetryEvent(PRODUCT_SHORTNAMES.AUTHENTICATION)}+ />+ </li>+ <li className="col-span-6 xl:col-span-3">+ <ProductCard+ url={props.products['functions'].url}+ icon={props.products['functions'].icon}+ title={props.products['functions'].name}+ subtitle={+ <>+ Easily write custom code+ <br className="inline-block sm:hidden lg:inline-block" /> without deploying or+ scaling servers.+ </>+ }+ onClick={() => sendTelemetryEvent(PRODUCT_SHORTNAMES.FUNCTIONS)}+ image={<FunctionsVisual />}+ />+ </li>+ <li className="col-span-6 xl:col-span-3">+ <ProductCard+ url={props.products['storage'].url}+ icon={props.products['storage'].icon}+ title={props.products['storage'].name}+ subtitle={+ <>+ Store, organize, and serve large files,+ <br className="inline-block xl:hidden 2xl:inline-block" /> from videos to images.+ </>+ }+ image={<StorageVisual />}+ onClick={() => sendTelemetryEvent(PRODUCT_SHORTNAMES.STORAGE)}+ />+ </li>+ <li className="col-span-6 xl:col-span-3">+ <ProductCard+ url={props.products['realtime'].url}+ icon={props.products['realtime'].icon}+ title={props.products['realtime'].name}+ subtitle={+ <>+ Build multiplayer experiences+ <br className="inline-block md:hidden 2xl:inline-block" /> with realtime data+ synchronization.+ </>+ }+ onClick={() => sendTelemetryEvent(PRODUCT_SHORTNAMES.REALTIME)}+ image={<RealtimeVisual />}+ className="hover:!cursor-[url('/images/index/products/realtime-cursor.svg'),_auto]"+ />+ </li>+ <li className="col-span-6 lg:col-span-12 xl:col-span-6">+ <ProductCard+ alignLeft+ url={props.products['vector'].url}+ icon={props.products['vector'].icon}+ title={props.products['vector'].name}+ subtitle={+ <>+ Integrate your favorite ML-models to store,+ <br className="inline-block md:hidden" /> index and search vector embeddings.+ </>+ }+ highlights={+ <ul className="flex flex-col gap-1 text-sm">+ <li className="flex items-center gap-2">+ <Image src="/images/logos/openai.svg" alt="OpenAI logo" width="25" height="25" />+ <span>OpenAI</span>+ </li>+ <li className="flex items-center gap-2">+ <Image+ src="/images/logos/hugging-face.svg"+ alt="Hugging Face logo"+ width="25"+ height="25"+ />+ <span>Hugging Face</span>+ </li>+ </ul>+ }+ onClick={() => sendTelemetryEvent(PRODUCT_SHORTNAMES.VECTOR)}+ image={<VectorVisual />}+ />+ </li>+ </ul></SectionContainer>)}