The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
updated solutions to use json file in `/data`
mildtomato25bfb6efb7ae
diff --git a/www/components/features.tsx b/www/components/features.tsxindex 504f3fc74cd..0d9a0810651 100644--- a/www/components/features.tsx+++ b/www/components/features.tsx@@ -1,13 +1,47 @@import Badge from './badge'+import Solutions from './../data/Solutions.json'const Features = () => {+ const IconSections = Object.values(Solutions).map((solution) => {+ const { name, description, description_short, icon, label, url } = solution++ return (+ <div>+ <div className="flex items-center">+ <div className="flex items-center justify-center h-12 w-12 rounded-md bg-gray-900 text-white">+ {/* <!-- Heroicon name: globe-alt --> */}+ <svg+ className="h-6 w-6"+ xmlns="http://www.w3.org/2000/svg"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ aria-hidden="true"+ >+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d={icon} />+ </svg>+ </div>+ <dt className="ml-4 text-lg leading-6 font-medium text-gray-900">+ {name} {label && <Badge>{label}</Badge>}+ </dt>+ </div>+ <div className="mt-5">+ <dd className="mt-2 text-base text-gray-500">{description}</dd>+ </div>+ <div className="mt-5">+ <dd className="mt-2 text-base text-gray-600 underline">Learn more link</dd>+ </div>+ </div>+ )+ })+return (// <!-- This example requires Tailwind CSS v2.0+ --><div className="bg-gray-50 overflow-hidden py-12"><div className="relative max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:px-0"><div className="lg:col-span-1"><small>A better way to build products</small>- <h2 className="text-3xl font-bold text-gray-900 sm:text-4xl">+ <h2 className="text-3xl text-gray-900 sm:text-4xl">Build Faster and Focus on Your Core Products</h2></div>@@ -45,142 +79,20 @@ const Features = () => {</svg><div className="relative lg:grid lg:grid-cols-12 lg:gap-x-8">- <div className="relative lg:grid lg:grid-cols-2 lg:gap-x-8 lg:col-span-7">- <dl className="mt-10 space-y-10 sm:space-y-0 sm:grid sm:grid-cols-2 sm:gap-x-8 sm:gap-y-10 lg:mt-0 lg:col-span-2">- <div>- <div className="flex items-center">- <div className="flex items-center justify-center h-12 w-12 rounded-md bg-brand-600 text-white">- {/* <!-- Heroicon name: globe-alt --> */}- <svg- className="h-6 w-6"- xmlns="http://www.w3.org/2000/svg"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- aria-hidden="true"- >- <path- strokeLinecap="round"- strokeLinejoin="round"- strokeWidth="2"- d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"- />- </svg>- </div>- <dt className="ml-4 text-lg leading-6 font-medium text-gray-900">Database</dt>- </div>- <div className="mt-5">- <dd className="mt-2 text-base text-gray-500">- Built on top of Postgres, an extremely scalable relational database, so you can- start building with the best tool in hand.- </dd>- </div>- </div>-- <div>- <div className="flex items-center">- <div className="flex items-center justify-center h-12 w-12 rounded-md bg-brand-600 text-white">- {/* <!-- Heroicon name: scale --> */}- <svg- className="h-6 w-6"- xmlns="http://www.w3.org/2000/svg"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- aria-hidden="true"- >- <path- strokeLinecap="round"- strokeLinejoin="round"- strokeWidth="2"- d="M3 6l3 1m0 0l-3 9a5.002 5.002 0 006.001 0M6 7l3 9M6 7l6-2m6 2l3-1m-3 1l-3 9a5.002 5.002 0 006.001 0M18 7l3 9m-3-9l-6-2m0-2v2m0 16V5m0 16H9m3 0h3"- />- </svg>- </div>- <dt className="ml-3 text-lg leading-6 font-medium text-gray-900">Authentication</dt>- </div>- <div className="mt-5">- <dd className="mt-2 text-base text-gray-500">- Manage your users easily, leverage on PostgreSQL’s Row Level Security, and even- write policies which fit your unique needs.- </dd>- </div>- </div>-- <div>- <div className="flex items-center">- <div className="flex items-center justify-center h-12 w-12 rounded-md bg-brand-600 text-white">- {/* <!-- Heroicon name: lightning-bolt --> */}- <svg- className="h-6 w-6"- xmlns="http://www.w3.org/2000/svg"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- aria-hidden="true"- >- <path- strokeLinecap="round"- strokeLinejoin="round"- strokeWidth="2"- d="M13 10V3L4 14h7v7l9-11h-7z"- />- </svg>- </div>- <dt className="ml-3 text-lg leading-6 font-medium text-gray-900 flex">- Storage <Badge>Coming soon Q1 2021</Badge>- </dt>- </div>- <div className="mt-5">- <dd className="mt-2 text-base text-gray-500">- Store, organize, and serve any amount of assets from anywhere. Any media,- including videos of any size and format.- </dd>- </div>- </div>-+ <div className="relative lg:grid lg:grid-cols-2 lg:gap-x-8 lg:col-span-7">+ <dl className="mt-10 space-y-10 sm:space-y-0 sm:grid sm:grid-cols-2 sm:gap-x-8 sm:gap-y-10 lg:mt-0 lg:col-span-2">+ {IconSections}+ </dl>+ </div>+ <div className="lg:col-span-5"><div>- <div className="flex items-center">- <div className="flex items-center justify-center h-12 w-12 rounded-md bg-brand-600 text-white">- {/* <!-- Heroicon name: mail --> */}- <svg- className="h-6 w-6"- xmlns="http://www.w3.org/2000/svg"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- aria-hidden="true"- >- <path- strokeLinecap="round"- strokeLinejoin="round"- strokeWidth="2"- d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"- />- </svg>- </div>- <dt className="ml-3 text-lg leading-6 font-medium text-gray-900 flex">- Functions <Badge>Coming soon Q1 2021</Badge>- </dt>- </div>- <div className="mt-5">- <dd className="mt-2 text-base text-gray-500">- Trigger backend code automatically with database events, without ever worrying- about scaling a server.- </dd>- </div>+ <h2 className="text-3xl font-extrabold tracking-tight text-gray-900 sm:text-4xl">+ image here+ </h2></div>- </dl>- </div>- <div className="lg:col-span-5">- <div>- <h2 className="text-3xl font-extrabold tracking-tight text-gray-900 sm:text-4xl">- image here- </h2></div></div></div>- </div></div>)}diff --git a/www/components/nav.tsx b/www/components/nav.tsxindex 5a4471bbb63..c8ce77d3ac7 100644--- a/www/components/nav.tsx+++ b/www/components/nav.tsx@@ -43,16 +43,16 @@ const Nav = () => {</div></div><div className="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">- <button className="bg-white p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brand-500">+ {/* <button className="bg-white p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brand-500"><span className="sr-only">View notifications</span><svg className="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" /></svg>- </button>+ </button> */}- <div className="ml-3 relative">+ {/* <div className="ml-3 relative"><div><button className="bg-white rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brand-500" id="user-menu" aria-haspopup="true"><span className="sr-only">Open user menu</span>@@ -65,12 +65,12 @@ const Nav = () => {<a href="#" className="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem">Settings</a><a href="#" className="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem">Sign out</a></div>- </div>+ </div> */}</div></div></div>- <div className="hidden sm:hidden">+ <div className="lg:hidden"><div className="pt-2 pb-4 space-y-1"><a href="#" className="block pl-3 pr-4 py-2 border-l-4 border-brand-500 text-base font-medium text-brand-700 bg-brand-50">Dashboard</a><a href="#" className="block pl-3 pr-4 py-2 border-l-4 border-transparent text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300">Team</a>diff --git a/www/components/nav/FlyOut.js b/www/components/nav/FlyOut.jsindex 7189fad9b6a..1161868b858 100644--- a/www/components/nav/FlyOut.js+++ b/www/components/nav/FlyOut.js@@ -1,6 +1,8 @@import { useState, useEffect } from 'react'import Transition from '../../lib/Transition'+import Solutions from './../../data/Solutions.json'+const FlyOut = () => {const [show, setShow] = useState(false)@@ -10,14 +12,50 @@ const FlyOut = () => {useEffect(() => {// window is accessible here.- window.addEventListener('scroll', function(e){+ window.addEventListener('scroll', function (e) {// close Fly Out window if user scrolls past 96px from topif (window.pageYOffset > 96) {setShow(false)}- });- }, []);+ })+ }, [])+ const iconSections = Object.values(Solutions).map((solution) => {+ const { name, description, description_short, icon, label, url } = solution+ return (+ <a+ href="#"+ className="-m-3 p-3 flex flex-col justify-between rounded-lg hover:bg-gray-50 transition ease-in-out duration-150"+ >+ <div className="flex md:h-full lg:flex-col">+ <div className="flex-shrink-0">+ <div className="inline-flex items-center justify-center h-10 w-10 rounded-md bg-gray-900 text-white sm:h-12 sm:w-12">+ {/* <!-- Heroicon name: chart-bar --> */}+ <svg+ className="h-6 w-6"+ xmlns="http://www.w3.org/2000/svg"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ aria-hidden="true"+ >+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d={icon} />+ </svg>+ </div>+ </div>+ <div className="ml-4 md:flex-1 md:flex md:flex-col md:justify-between lg:ml-0 lg:mt-4">+ <div>+ <p className="text-base font-medium text-gray-900">{name}</p>+ <p className="mt-1 text-sm text-gray-500">{description}</p>+ </div>+ <p className="mt-2 text-sm font-medium text-brand-600 lg:mt-4">+ Learn more <span aria-hidden="true">→</span>+ </p>+ </div>+ </div>+ </a>+ )+ })return (<React.Fragment>@@ -72,161 +110,7 @@ const FlyOut = () => {className="grid gap-y-10 px-4 py-8 bg-white sm:grid-cols-2 sm:gap-x-8 sm:py-12 sm:px-6 lg:px-8 xl:pr-12"aria-labelledby="solutionsHeading">- <a- href="#"- className="-m-3 p-3 flex flex-col justify-between rounded-lg hover:bg-gray-50 transition ease-in-out duration-150"- >- <div className="flex md:h-full lg:flex-col">- <div className="flex-shrink-0">- <div className="inline-flex items-center justify-center h-10 w-10 rounded-md bg-brand-500 text-white sm:h-12 sm:w-12">- {/* <!-- Heroicon name: chart-bar --> */}- <svg- className="h-6 w-6"- xmlns="http://www.w3.org/2000/svg"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- aria-hidden="true"- >- <path- strokeLinecap="round"- strokeLinejoin="round"- strokeWidth="2"- d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"- />- </svg>- </div>- </div>- <div className="ml-4 md:flex-1 md:flex md:flex-col md:justify-between lg:ml-0 lg:mt-4">- <div>- <p className="text-base font-medium text-gray-900">Database</p>- <p className="mt-1 text-sm text-gray-500">- Built on top of Postgres, an extremely scalable relational database, so you can start building with the best tool in hand.- </p>- </div>- <p className="mt-2 text-sm font-medium text-brand-600 lg:mt-4">- Learn more <span aria-hidden="true">→</span>- </p>- </div>- </div>- </a>-- <a- href="#"- className="-m-3 p-3 flex flex-col justify-between rounded-lg hover:bg-gray-50 transition ease-in-out duration-150"- >- <div className="flex md:h-full lg:flex-col">- <div className="flex-shrink-0">- <div className="inline-flex items-center justify-center h-10 w-10 rounded-md bg-brand-500 text-white sm:h-12 sm:w-12">- {/* <!-- Heroicon name: chart-bar --> */}- <svg- className="h-6 w-6"- xmlns="http://www.w3.org/2000/svg"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- aria-hidden="true"- >- <path- strokeLinecap="round"- strokeLinejoin="round"- strokeWidth="2"- d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"- />- </svg>- </div>- </div>- <div className="ml-4 md:flex-1 md:flex md:flex-col md:justify-between lg:ml-0 lg:mt-4">- <div>- <p className="text-base font-medium text-gray-900">Authentication</p>- <p className="mt-1 text-sm text-gray-500">- Manage your users easily, leverage on PostgreSQL’s Row Level Security, and even write policies which fit your unique needs.- </p>- </div>- <p className="mt-2 text-sm font-medium text-brand-600 lg:mt-4">- Learn more <span aria-hidden="true">→</span>- </p>- </div>- </div>- </a>-- <a- href="#"- className="-m-3 p-3 flex flex-col justify-between rounded-lg hover:bg-gray-50 transition ease-in-out duration-150"- >- <div className="flex md:h-full lg:flex-col">- <div className="flex-shrink-0">- <div className="inline-flex items-center justify-center h-10 w-10 rounded-md bg-brand-500 text-white sm:h-12 sm:w-12">- {/* <!-- Heroicon name: chart-bar --> */}- <svg- className="h-6 w-6"- xmlns="http://www.w3.org/2000/svg"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- aria-hidden="true"- >- <path- strokeLinecap="round"- strokeLinejoin="round"- strokeWidth="2"- d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"- />- </svg>- </div>- </div>- <div className="ml-4 md:flex-1 md:flex md:flex-col md:justify-between lg:ml-0 lg:mt-4">- <div>- <p className="text-base font-medium text-gray-900">Storage</p>- <p className="mt-1 text-sm text-gray-500">- Store, organize, and serve any amount of assets from anywhere. Any media, including videos of any size and format.- </p>- </div>- <p className="mt-2 text-sm font-medium text-brand-600 lg:mt-4">- Learn more <span aria-hidden="true">→</span>- </p>- </div>- </div>- </a>-- <a- href="#"- className="-m-3 p-3 flex flex-col justify-between rounded-lg hover:bg-gray-50 transition ease-in-out duration-150"- >- <div className="flex md:h-full lg:flex-col">- <div className="flex-shrink-0">- <div className="inline-flex items-center justify-center h-10 w-10 rounded-md bg-brand-500 text-white sm:h-12 sm:w-12">- {/* <!-- Heroicon name: chart-bar --> */}- <svg- className="h-6 w-6"- xmlns="http://www.w3.org/2000/svg"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- aria-hidden="true"- >- <path- strokeLinecap="round"- strokeLinejoin="round"- strokeWidth="2"- d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"- />- </svg>- </div>- </div>- <div className="ml-4 md:flex-1 md:flex md:flex-col md:justify-between lg:ml-0 lg:mt-4">- <div>- <p className="text-base font-medium text-gray-900">Functions</p>- <p className="mt-1 text-sm text-gray-500">- Trigger backend code automatically with database events, without ever worrying about scaling a server.- </p>- </div>- <p className="mt-2 text-sm font-medium text-brand-600 lg:mt-4">- Learn more <span aria-hidden="true">→</span>- </p>- </div>- </div>- </a>+ {iconSections}</nav><div className="bg-gray-50 px-4 py-8 sm:py-12 sm:px-6 lg:px-8 xl:pl-12"><div>@@ -298,7 +182,7 @@ const FlyOut = () => {style={{zIndex: 100,marginLeft: 0,- pointerEvents: 'visiblePainted'+ pointerEvents: 'visiblePainted',}}onClick={() => handleToggle()}>diff --git a/www/data/Solutions.json b/www/data/Solutions.jsonnew file mode 100644index 00000000000..e3872c10876--- /dev/null+++ b/www/data/Solutions.json@@ -0,0 +1,34 @@+{+ "database": {+ "name": "Database",+ "icon" : "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",+ "description": "Built on top of Postgres, an extremely scalable relational database, so you can start building with the best tool in hand.",+ "description_short": "",+ "label": "",+ "url" : "https://supabase.io/docs"+ },+ "authentication": {+ "name": "Authentication",+ "icon" : "M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",+ "description": "Manage your users easily, leverage on PostgreSQL’s Row Level Security, and even write policies which fit your unique needs.",+ "description_short": "",+ "label": "",+ "url" : "https://supabase.io/docs"+ },+ "storage": {+ "name": "Storage",+ "icon" : "M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4",+ "description": "Store, organize, and serve any amount of assets from anywhere. Any media, including videos of any size and format.",+ "description_short": "",+ "label": "Coming soon",+ "url" : "https://supabase.io/docs"+ },+ "functions": {+ "name": "Functions",+ "icon" : "M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",+ "description": "Trigger backend code automatically with database events, without ever worrying about scaling a server.",+ "description_short": "",+ "label": "Coming soon Q1 2021",+ "url" : "https://supabase.io/docs"+ }+}