The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Refactored AdminAccess and tabs and added screen grab videos
Joshen Limdc155befcb4c
diff --git a/www/components/index_sections/AdminAccess.tsx b/www/components/index_sections/AdminAccess.tsxindex d09265450fc..c6498cf64fc 100644--- a/www/components/index_sections/AdminAccess.tsx+++ b/www/components/index_sections/AdminAccess.tsx@@ -1,17 +1,33 @@+import React, { useState, ReactElement } from 'react'import Tabs from '../tabs'const AdminAccess = () => {+ const [tabId, setTabId] = useState('tabTableEditor')+return (<div className="py-16 bg-gray-50 overflow-hidden lg:py-24"><div className="relative max-w-xl mx-auto px-4 sm:px-6 lg:px-8 lg:max-w-7xl">- <div className="relative mt-12 lg:mt-24 lg:grid lg:grid-cols-2 lg:gap-8 lg:items-center">+ <div className="relative mt-12 items-center mt-24"><div className="relative"><small>MADE FOR DEVELOPERS</small>- <h2 className="text-3xl leading-8 font-bold tracking-tight text-gray-900 sm:text-4xl">+ <h2 className="mt-4 text-3xl leading-8 font-medium tracking-tight text-gray-900 sm:text-4xl">Organise your app, without a developer</h2>- <div className="mt-6">- <Tabs />+ <div className="mt-6 grid grid-cols-2 gap-52 items-center">+ <Tabs+ tabId={tabId}+ setTabId={setTabId}+ />+ <div>+ <div className="w-full rounded-t-md h-5 bg-gray-700 flex items-center justify-start px-2">+ <div className="h-2 w-2 mr-2 rounded-full bg-gray-500"/>+ <div className="h-2 w-2 mr-2 rounded-full bg-gray-500"/>+ <div className="h-2 w-2 mr-2 rounded-full bg-gray-500"/>+ </div>+ <video className="rounded-b-md shadow-md" src={`videos/${tabId}.mp4`} autoPlay loop muted>+ Your browser does not support the video tag+ </video>+ </div></div></div></div>diff --git a/www/components/tabs.tsx b/www/components/tabs.tsxindex 85eeae60d9b..f106d92f686 100644--- a/www/components/tabs.tsx+++ b/www/components/tabs.tsx@@ -1,17 +1,12 @@-import React, { useState, ReactElement } from 'react'--type Props = {- children: ReactElement[]- event: any- target: HTMLInputElement- tabMarkup: any- tabId: string+type Props = {+ tabId: string,+ setTabId: Function,}-function Tabs() {- const [tabId, setTabId] = useState('tabTableEditor')+function Tabs(props: Props) {+ const { tabId, setTabId } = props- function handleTabChange(event: Props) {+ function handleTabChange(event: any) {//@ts-ignoreevent.preventDefault()const tabId: string = event.target.id@@ -19,97 +14,77 @@ function Tabs() {}const tabMarkup: any = {- tabTableEditor: (- <div>- <div className="mt-5">- <dd className="mt-2 text-base text-gray-800">- Manage your data with the familiarity of a spreadsheet- </dd>- <dd className="mt-2 text-base text-gray-500">- You don’t have to be a database expert to start using Supabase — Our table editor makes- Postgres easy to use even for non-techies.- </dd>- </div>- <button- type="button"- className="mt-6 inline-flex items-center px-3 py-2 border border-transparent shadow-sm text-sm leading-4 font-medium rounded-md text-white bg-brand-600 hover:bg-brand-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brand-500"- >- Explore table view- </button>- </div>- ),- tabSqlEditor: (+ tabTableEditor: {+ header: 'Manage your data with the familiarity of a spreadsheet',+ description: 'You don’t have to be a database expert to start using Supabase — Our table editor makes Postgres easy to use even for non-techies, and you can do everything right in our dashboard.',+ cta: 'Explore Table View'+ },+ tabSqlEditor: {+ header: 'In-built SQL editor for when you need greater control',+ description: 'Write, save, and execute SQL queries directly on our dashboard, with templates to help you save time from common queries and even build applications.',+ cta: 'Explore SQL Editor'+ },+ tabAuthRules: {+ header: 'User management as straight-forward as it can be',+ description: 'Easily manage your users via our authentication, or integrate third party logins. Create policies with complex SQL rules which fit your unique business needs.',+ cta: 'Explore Auth Policies'+ }+ }++ return (+ <div className="flex justify-between items-center w-full"><div>- <div className="mt-5">- <dd className="mt-2 text-base text-gray-800">- In-built SQL editor for when you need greater control- </dd>- <dd className="mt-2 text-base text-gray-500">- Write, save, and execute SQL queries directly on our dashboard, with templates to help- you save time from common queries and even build applications.- </dd>+ <div className="border-b border-gray-200">+ <nav className="-mb-px flex" aria-label="Tabs">+ <a+ href="#"+ id="tabTableEditor"+ className={"w-1/4 py-4 px-1 text-center border-b-2 font-medium text-sm" + (tabId === "tabTableEditor" ? " border-brand-500 text-brand-600" : " border-b border-gray-200 text-gray-500 hover:text-gray-700 hover:border-gray-300")}+ onClick={(event: any) => handleTabChange(event)}+ >+ Table Editor+ </a>+ <a+ href="#"+ id="tabSqlEditor"+ className={"w-1/4 py-4 px-1 text-center border-b-2 font-medium text-sm" + (tabId === "tabSqlEditor" ? " border-brand-500 text-brand-600" : " border-b border-gray-200 text-gray-500 hover:text-gray-700 hover:border-gray-300")}+ onClick={(event: any) => handleTabChange(event)}+ >+ SQL Editor+ </a>+ <a+ href="#"+ id="tabAuthRules"+ className={"w-1/4 py-4 px-1 text-center border-b-2 font-medium text-sm" + (tabId === "tabAuthRules" ? " border-brand-500 text-brand-600" : " border-b border-gray-200 text-gray-500 hover:text-gray-700 hover:border-gray-300")}+ onClick={(event: any) => handleTabChange(event)}+ aria-current="page"+ >+ Auth Rules+ </a>+ </nav></div>- <button- type="button"- className="mt-6 inline-flex items-center px-3 py-2 border border-transparent shadow-sm text-sm leading-4 font-medium rounded-md text-white bg-brand-600 hover:bg-brand-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brand-500"- >- Explore SQL editor- </button>- </div>- ),- tabAuthRules: (- <div>- <div className="mt-5">- <dd className="mt-2 text-base text-gray-800">- User management as straight-forward as it can be- </dd>- <dd className="mt-2 text-base text-gray-500">- Easily manage your users via our authentication, or integrate third party logins. Create- policies with complex SQL rules which fit your unique business needs.- </dd>++ {/* Might want to extract this out into a component within this file too */}+ <div className="mt-6">+ <div>+ <div className="mt-5">+ <dd className="mt-8 text-2xl text-gray-800">+ {tabMarkup[tabId].header}+ </dd>+ <dd className="mt-8 text-base text-gray-500">+ {tabMarkup[tabId].description}+ </dd>+ </div>+ <button+ type="button"+ className="mt-8 inline-flex items-center px-3 py-2 border border-transparent shadow-sm text-sm leading-4 rounded-md text-white bg-brand-600 hover:bg-brand-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brand-500"+ >+ {tabMarkup[tabId].cta}+ </button>+ </div></div>- <button- type="button"- className="mt-6 inline-flex items-center px-3 py-2 border border-transparent shadow-sm text-sm leading-4 font-medium rounded-md text-white bg-brand-600 hover:bg-brand-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brand-500"- >- Explore auth policies- </button>- </div>- ),- }- return (- <div>- <div className="border-b border-gray-200">- <nav className="-mb-px flex" aria-label="Tabs">- <a- href="#"- id="tabTableEditor"- className={"w-1/4 py-4 px-1 text-center border-b-2 font-medium text-sm" + (tabId === "tabTableEditor" ? " border-brand-500 text-brand-600" : " border-b border-gray-200 text-gray-500 hover:text-gray-700 hover:border-gray-300")}- onClick={(event: any) => handleTabChange(event)}- >- Table editor- </a>- <a- href="#"- id="tabSqlEditor"- className={"w-1/4 py-4 px-1 text-center border-b-2 font-medium text-sm" + (tabId === "tabSqlEditor" ? " border-brand-500 text-brand-600" : " border-b border-gray-200 text-gray-500 hover:text-gray-700 hover:border-gray-300")}- onClick={(event: any) => handleTabChange(event)}- >- SQL editor- </a>- <a- href="#"- id="tabAuthRules"- className={"w-1/4 py-4 px-1 text-center border-b-2 font-medium text-sm" + (tabId === "tabAuthRules" ? " border-brand-500 text-brand-600" : " border-b border-gray-200 text-gray-500 hover:text-gray-700 hover:border-gray-300")}- onClick={(event: any) => handleTabChange(event)}- aria-current="page"- >- Auth rules- </a>- </nav></div>- <div className="mt-6">{tabMarkup[tabId]}</div></div>)}diff --git a/www/package-lock.json b/www/package-lock.jsonindex d8e0deb8432..ec3fbf4ad3a 100644--- a/www/package-lock.json+++ b/www/package-lock.json@@ -745,7 +745,6 @@"version": "1.1.5","resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz","integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",- "optional": true,"requires": {"delegates": "^1.0.0","readable-stream": "^2.0.6"@@ -755,7 +754,6 @@"version": "2.3.7","resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz","integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",- "optional": true,"requires": {"core-util-is": "~1.0.0","inherits": "~2.0.3",@@ -769,14 +767,12 @@"safe-buffer": {"version": "5.1.2","resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",- "optional": true+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="},"string_decoder": {"version": "1.1.1","resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz","integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",- "optional": true,"requires": {"safe-buffer": "~5.1.0"}@@ -1025,7 +1021,6 @@"version": "4.0.3","resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz","integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==",- "optional": true,"requires": {"buffer": "^5.5.0","inherits": "^2.0.4",@@ -1374,8 +1369,7 @@"code-point-at": {"version": "1.1.0","resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",- "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",- "optional": true+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="},"collapse-white-space": {"version": "1.0.6",@@ -1508,8 +1502,7 @@"console-control-strings": {"version": "1.1.0","resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",- "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",- "optional": true+ "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="},"constants-browserify": {"version": "1.0.0",@@ -1952,8 +1945,7 @@"delegates": {"version": "1.0.0","resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",- "optional": true+ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="},"depd": {"version": "1.1.2",@@ -1980,8 +1972,7 @@"detect-libc": {"version": "1.0.3","resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",- "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",- "optional": true+ "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="},"detective": {"version": "5.2.0",@@ -2627,8 +2618,7 @@"fs-constants": {"version": "1.0.0","resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",- "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",- "optional": true+ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="},"fs-extra": {"version": "9.0.1",@@ -2703,7 +2693,6 @@"version": "2.7.4","resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz","integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",- "optional": true,"requires": {"aproba": "^1.0.3","console-control-strings": "^1.0.0",@@ -2718,14 +2707,12 @@"ansi-regex": {"version": "2.1.1","resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",- "optional": true+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="},"strip-ansi": {"version": "3.0.1","resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz","integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",- "optional": true,"requires": {"ansi-regex": "^2.0.0"}@@ -2811,8 +2798,7 @@"has-unicode": {"version": "2.0.1","resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",- "optional": true+ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="},"has-value": {"version": "1.0.0",@@ -3198,7 +3184,6 @@"version": "1.0.0","resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz","integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",- "optional": true,"requires": {"number-is-nan": "^1.0.0"}@@ -3858,8 +3843,7 @@"mkdirp-classic": {"version": "0.5.3","resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",- "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",- "optional": true+ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="},"modern-normalize": {"version": "1.0.0",@@ -4175,7 +4159,6 @@"version": "4.1.2","resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz","integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",- "optional": true,"requires": {"are-we-there-yet": "~1.1.2","console-control-strings": "~1.1.0",@@ -4192,8 +4175,7 @@"number-is-nan": {"version": "1.0.1","resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",- "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",- "optional": true+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="},"object-assign": {"version": "4.1.1",@@ -6141,8 +6123,7 @@"set-blocking": {"version": "2.0.0","resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",- "optional": true+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="},"set-value": {"version": "2.0.1",@@ -6199,14 +6180,12 @@"signal-exit": {"version": "3.0.3","resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",- "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",- "optional": true+ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="},"simple-concat": {"version": "1.0.1","resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",- "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",- "optional": true+ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="},"simple-get": {"version": "4.0.0",@@ -6547,7 +6526,6 @@"version": "1.0.2","resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz","integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",- "optional": true,"requires": {"code-point-at": "^1.0.0","is-fullwidth-code-point": "^1.0.0",@@ -6557,14 +6535,12 @@"ansi-regex": {"version": "2.1.1","resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",- "optional": true+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="},"strip-ansi": {"version": "3.0.1","resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz","integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",- "optional": true,"requires": {"ansi-regex": "^2.0.0"}@@ -6770,7 +6746,6 @@"version": "2.1.1","resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz","integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",- "optional": true,"requires": {"chownr": "^1.1.1","mkdirp-classic": "^0.5.2",@@ -6782,7 +6757,6 @@"version": "2.1.4","resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.4.tgz","integrity": "sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw==",- "optional": true,"requires": {"bl": "^4.0.3","end-of-stream": "^1.4.1",@@ -7081,7 +7055,6 @@"version": "0.6.0","resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz","integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",- "optional": true,"requires": {"safe-buffer": "^5.0.1"}@@ -7511,7 +7484,6 @@"version": "3.0.0","resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz","integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",- "optional": true,"requires": {"kind-of": "^3.0.2"}@@ -7526,7 +7498,6 @@"version": "3.2.2","resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz","integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",- "optional": true,"requires": {"is-buffer": "^1.1.5"}@@ -7560,8 +7531,7 @@"safe-buffer": {"version": "5.1.2","resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",- "optional": true+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="},"string_decoder": {"version": "1.1.1",@@ -7689,7 +7659,6 @@"version": "1.1.3","resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz","integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",- "optional": true,"requires": {"string-width": "^1.0.2 || 2"}diff --git a/www/public/videos/tabAuthRules.mp4 b/www/public/videos/tabAuthRules.mp4new file mode 100644index 00000000000..b41c5c8fdeaBinary files /dev/null and b/www/public/videos/tabAuthRules.mp4 differdiff --git a/www/public/videos/tabSqlEditor.mp4 b/www/public/videos/tabSqlEditor.mp4new file mode 100644index 00000000000..de25152f31fBinary files /dev/null and b/www/public/videos/tabSqlEditor.mp4 differdiff --git a/www/public/videos/tabTableEditor.mp4 b/www/public/videos/tabTableEditor.mp4new file mode 100644index 00000000000..cad67d2f383Binary files /dev/null and b/www/public/videos/tabTableEditor.mp4 differ