The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
moved sections around and updated multiple update example
awalias153b8a7820f5
diff --git a/package-lock.json b/package-lock.jsonindex 1614da3e8a3..48e341a0954 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,344 +1,3 @@{- "requires": true,- "lockfileVersion": 1,- "dependencies": {- "ajv": {- "version": "6.11.0",- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz",- "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==",- "requires": {- "fast-deep-equal": "^3.1.1",- "fast-json-stable-stringify": "^2.0.0",- "json-schema-traverse": "^0.4.1",- "uri-js": "^4.2.2"- }- },- "asn1": {- "version": "0.2.4",- "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",- "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",- "requires": {- "safer-buffer": "~2.1.0"- }- },- "assert-plus": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="- },- "asynckit": {- "version": "0.4.0",- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="- },- "aws-sign2": {- "version": "0.7.0",- "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",- "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="- },- "aws4": {- "version": "1.9.1",- "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz",- "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug=="- },- "bcrypt-pbkdf": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",- "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",- "requires": {- "tweetnacl": "^0.14.3"- }- },- "caseless": {- "version": "0.12.0",- "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",- "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="- },- "combined-stream": {- "version": "1.0.8",- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",- "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",- "requires": {- "delayed-stream": "~1.0.0"- }- },- "core-util-is": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="- },- "dashdash": {- "version": "1.14.1",- "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",- "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",- "requires": {- "assert-plus": "^1.0.0"- }- },- "delayed-stream": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="- },- "ecc-jsbn": {- "version": "0.1.2",- "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",- "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",- "requires": {- "jsbn": "~0.1.0",- "safer-buffer": "^2.1.0"- }- },- "extend": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",- "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="- },- "extsprintf": {- "version": "1.3.0",- "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",- "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="- },- "fast-deep-equal": {- "version": "3.1.1",- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",- "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA=="- },- "fast-json-stable-stringify": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",- "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="- },- "forever-agent": {- "version": "0.6.1",- "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",- "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="- },- "form-data": {- "version": "2.3.3",- "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",- "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",- "requires": {- "asynckit": "^0.4.0",- "combined-stream": "^1.0.6",- "mime-types": "^2.1.12"- }- },- "getpass": {- "version": "0.1.7",- "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",- "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",- "requires": {- "assert-plus": "^1.0.0"- }- },- "har-schema": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",- "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="- },- "har-validator": {- "version": "5.1.3",- "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",- "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",- "requires": {- "ajv": "^6.5.5",- "har-schema": "^2.0.0"- }- },- "http-signature": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",- "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",- "requires": {- "assert-plus": "^1.0.0",- "jsprim": "^1.2.2",- "sshpk": "^1.7.0"- }- },- "is-typedarray": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="- },- "isstream": {- "version": "0.1.2",- "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",- "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="- },- "jsbn": {- "version": "0.1.1",- "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",- "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="- },- "json-schema": {- "version": "0.2.3",- "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",- "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="- },- "json-schema-traverse": {- "version": "0.4.1",- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",- "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="- },- "json-stringify-safe": {- "version": "5.0.1",- "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",- "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="- },- "jsprim": {- "version": "1.4.1",- "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",- "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",- "requires": {- "assert-plus": "1.0.0",- "extsprintf": "1.3.0",- "json-schema": "0.2.3",- "verror": "1.10.0"- }- },- "mime-db": {- "version": "1.43.0",- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz",- "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ=="- },- "mime-types": {- "version": "2.1.26",- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz",- "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==",- "requires": {- "mime-db": "1.43.0"- }- },- "oauth-sign": {- "version": "0.9.0",- "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",- "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="- },- "performance-now": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",- "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="- },- "psl": {- "version": "1.7.0",- "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz",- "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ=="- },- "punycode": {- "version": "2.1.1",- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",- "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="- },- "qs": {- "version": "6.5.2",- "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",- "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="- },- "request": {- "version": "2.88.0",- "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",- "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",- "requires": {- "aws-sign2": "~0.7.0",- "aws4": "^1.8.0",- "caseless": "~0.12.0",- "combined-stream": "~1.0.6",- "extend": "~3.0.2",- "forever-agent": "~0.6.1",- "form-data": "~2.3.2",- "har-validator": "~5.1.0",- "http-signature": "~1.2.0",- "is-typedarray": "~1.0.0",- "isstream": "~0.1.2",- "json-stringify-safe": "~5.0.1",- "mime-types": "~2.1.19",- "oauth-sign": "~0.9.0",- "performance-now": "^2.1.0",- "qs": "~6.5.2",- "safe-buffer": "^5.1.2",- "tough-cookie": "~2.4.3",- "tunnel-agent": "^0.6.0",- "uuid": "^3.3.2"- }- },- "safe-buffer": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",- "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg=="- },- "safer-buffer": {- "version": "2.1.2",- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="- },- "sshpk": {- "version": "1.16.1",- "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",- "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",- "requires": {- "asn1": "~0.2.3",- "assert-plus": "^1.0.0",- "bcrypt-pbkdf": "^1.0.0",- "dashdash": "^1.12.0",- "ecc-jsbn": "~0.1.1",- "getpass": "^0.1.1",- "jsbn": "~0.1.0",- "safer-buffer": "^2.0.2",- "tweetnacl": "~0.14.0"- }- },- "tough-cookie": {- "version": "2.4.3",- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",- "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",- "requires": {- "psl": "^1.1.24",- "punycode": "^1.4.1"- },- "dependencies": {- "punycode": {- "version": "1.4.1",- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="- }- }- },- "tunnel-agent": {- "version": "0.6.0",- "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",- "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",- "requires": {- "safe-buffer": "^5.0.1"- }- },- "tweetnacl": {- "version": "0.14.5",- "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",- "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="- },- "uri-js": {- "version": "4.2.2",- "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",- "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",- "requires": {- "punycode": "^2.1.0"- }- },- "uuid": {- "version": "3.4.0",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",- "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="- },- "verror": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",- "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",- "requires": {- "assert-plus": "^1.0.0",- "core-util-is": "1.0.2",- "extsprintf": "^1.2.0"- }- }- }+ "lockfileVersion": 1}diff --git a/web/src/pages/index.js b/web/src/pages/index.jsindex b969efb9916..f2efe8a2879 100755--- a/web/src/pages/index.js+++ b/web/src/pages/index.js@@ -70,11 +70,11 @@ import { createClient } from '@supabase/supabase-js'// Connect to the chat roomconst supabase = createClient('https://chat-room.supabase.co', '1a2b-3c4d-5e6f-7g8h')-// Update a user-const updatedUser = await supabase+// Update multiple users+const updatedUsers = await supabase.from('users')- .eq('username', 'kiwicopple')- .update({ status: 'Online' })+ .eq('account_type', 'paid')+ .update({ highlight_color: 'gold' })`.trim()const features = [@@ -186,90 +186,14 @@ function Home() {</div></header>- <section+ {/* <sectionstyle={{padding: '50px 0',}}className="hero is--dark">- <div className="container text--center">{/* <small>CUSTOMER LOGOS</small> */}</div>- </section>-- {/* For Devs */}- <section className={styles.forDevelopers}>- <div className="container">- <div className={classnames('row', styles.responsiveCentered)}>- <div className="col col--6 col--offset-3">- <h2 className="with-underline">For Developers</h2>- <p className="">- We introspect your database and provide APIs- <strong className="has-emphasis">instantly</strong> so you can stop building- repetitive CRUD APIs and focus on building your products.- </p>- </div>- </div>- <div className="ForDevelopers">- <div className="row">- <div className="ButtonTabs col col--3">- <div>- <button- className={`button button--${- visibleCodeExample === 'SUBSCRIBE' ? 'info is-active' : 'info'- }`}- onClick={() => showCodeExample('SUBSCRIBE')}- >- Realtime subscriptions- </button>- <button- className={`button button--${- visibleCodeExample === 'READ' ? 'info is-active' : 'info '- }`}- onClick={() => showCodeExample('READ')}- >- Get your data- </button>- <button- className={`button button--${- visibleCodeExample === 'CREATE' ? 'info is-active' : 'info '- }`}- onClick={() => showCodeExample('CREATE')}- >- Create a record- </button>- <button- className={`button button--${- visibleCodeExample === 'UPDATE' ? 'info is-active' : 'info '- }`}- onClick={() => showCodeExample('UPDATE')}- >- Update mulitple rows- </button>- </div>- </div>- <div className="col col--9 code-with-header">- {visibleCodeExample === 'SUBSCRIBE' && (- <CustomCodeBlock- header="Receive realtime messages in an example chat room"- js={subscribeExample}- />- )}- {visibleCodeExample === 'READ' && (- <CustomCodeBlock- header="Get all public rooms and their messages"- js={readExample}- />- )}- {visibleCodeExample === 'CREATE' && (- <CustomCodeBlock header="Create a new chat room" js={createExample} />- )}- {visibleCodeExample === 'UPDATE' && (- <CustomCodeBlock header="Update a user" js={updateExample} />- )}- </div>- </div>- </div>- </div>- </section>+ <div className="container text--center"><small>CUSTOMER LOGOS</small></div>+ </section> */}{/* HOW */}<section className={'section-lg'}>@@ -353,6 +277,82 @@ function Home() {</div></section>+ {/* For Devs */}+ <section className={styles.forDevelopers}>+ <div className="container">+ <div className={classnames('row', styles.responsiveCentered)}>+ <div className="col col--6 col--offset-3">+ <h2 className="with-underline">For Developers</h2>+ <p className="">+ We introspect your database and provide APIs+ <strong className="has-emphasis">instantly</strong> so you can stop building+ repetitive CRUD APIs and focus on building your products.+ </p>+ </div>+ </div>+ <div className="ForDevelopers">+ <div className="row">+ <div className="ButtonTabs col col--3">+ <div>+ <button+ className={`button button--${+ visibleCodeExample === 'SUBSCRIBE' ? 'info is-active' : 'info'+ }`}+ onClick={() => showCodeExample('SUBSCRIBE')}+ >+ Realtime subscriptions+ </button>+ <button+ className={`button button--${+ visibleCodeExample === 'READ' ? 'info is-active' : 'info '+ }`}+ onClick={() => showCodeExample('READ')}+ >+ Get your data+ </button>+ <button+ className={`button button--${+ visibleCodeExample === 'CREATE' ? 'info is-active' : 'info '+ }`}+ onClick={() => showCodeExample('CREATE')}+ >+ Create a record+ </button>+ <button+ className={`button button--${+ visibleCodeExample === 'UPDATE' ? 'info is-active' : 'info '+ }`}+ onClick={() => showCodeExample('UPDATE')}+ >+ Update mulitple rows+ </button>+ </div>+ </div>+ <div className="col col--9 code-with-header">+ {visibleCodeExample === 'SUBSCRIBE' && (+ <CustomCodeBlock+ header="Receive realtime messages in an example chat room"+ js={subscribeExample}+ />+ )}+ {visibleCodeExample === 'READ' && (+ <CustomCodeBlock+ header="Get all public rooms and their messages"+ js={readExample}+ />+ )}+ {visibleCodeExample === 'CREATE' && (+ <CustomCodeBlock header="Create a new chat room" js={createExample} />+ )}+ {visibleCodeExample === 'UPDATE' && (+ <CustomCodeBlock header="Update a user" js={updateExample} />+ )}+ </div>+ </div>+ </div>+ </div>+ </section>+{/* USE CASES */}<section className={'section-lg'}><div className="container">