Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix local development

Inian Parameshwarane2d500bd6474
diff --git a/.gitignore b/.gitignore
index f77c20cc4d3..3d26802d617 100644
--- a/.gitignore
+++ b/.gitignore
@@ -98,4 +98,5 @@ typings/
# DynamoDB Local files
.dynamodb/
-.vscode
\ No newline at end of file
+.vscode
+.vercel
diff --git a/Makefile b/Makefile
index a6cdc86ac47..ee3a926f7be 100644
--- a/Makefile
+++ b/Makefile
@@ -34,4 +34,7 @@ github.repos.%:
github.traction:
cd "$(REPO_DIR)"/web && \
- npm run traction
\ No newline at end of file
+ npm run traction
+
+dev:
+ vercel dev --listen 8080 --local-config vercel-local.json
\ No newline at end of file
diff --git a/vercel-local.json b/vercel-local.json
new file mode 100644
index 00000000000..9afdef4d9bb
--- /dev/null
+++ b/vercel-local.json
@@ -0,0 +1,63 @@
+{
+ "rewrites": [
+ { "source": "/new/:match*", "destination": "http://localhost:3000/new/:match*" },
+ { "source": "/", "destination": "http://localhost:3000/new" },
+ { "source": "/beta", "destination": "http://localhost:3000/new/beta" },
+ { "source": "/:name.:extension", "destination": "http://localhost:3005/:name.:extension" },
+ { "source": "/:match*", "destination": "http://localhost:3005/:match*/" }
+ ],
+ "redirects": [
+ {
+ "source": "/blog/2020/07/10/surviving-hacker-news",
+ "destination": "/blog/2020/07/10/alpha-launch-postmortem"
+ },
+ {
+ "source": "/docs/common/_CommonResponses",
+ "destination": "/docs"
+ },
+ { "source": "/docs/common/_DummyData", "destination": "/docs" },
+ { "source": "/docs/common/_FromFunction", "destination": "/docs" },
+ { "source": "/docs/common/filters/_adj", "destination": "/docs/client/ajv" },
+ { "source": "/docs/common/filters/_cd", "destination": "/docs/client/cd" },
+ { "source": "/docs/common/filters/_cs", "destination": "/docs/client/cs" },
+ { "source": "/docs/common/filters/_eq", "destination": "/docs/client/eq" },
+ { "source": "/docs/common/filters/_filter", "destination": "/docs/client/filter" },
+ { "source": "/docs/common/filters/_gt", "destination": "/docs/client/gt" },
+ { "source": "/docs/common/filters/_gte", "destination": "/docs/client/gte" },
+ { "source": "/docs/common/filters/_ilike", "destination": "/docs/client/ilike" },
+ { "source": "/docs/common/filters/_in", "destination": "/docs/client/in" },
+ { "source": "/docs/common/filters/_is", "destination": "/docs/client/is" },
+ { "source": "/docs/common/filters/_like", "destination": "/docs/client/like" },
+ { "source": "/docs/common/filters/_lt", "destination": "/docs/client/lt" },
+ { "source": "/docs/common/filters/_lte", "destination": "/docs/client/lte" },
+ { "source": "/docs/common/filters/_match", "destination": "/docs/client/match" },
+ { "source": "/docs/common/filters/_neq", "destination": "/docs/client/neq" },
+ { "source": "/docs/common/filters/_not", "destination": "/docs/client/not" },
+ { "source": "/docs/common/filters/_nxl", "destination": "/docs/client/nxl" },
+ { "source": "/docs/common/filters/_nxr", "destination": "/docs/client/nxr" },
+ { "source": "/docs/common/filters/_or", "destination": "/docs/client/or" },
+ { "source": "/docs/common/filters/_ova", "destination": "/docs/client/ov" },
+ { "source": "/docs/common/filters/_ovr", "destination": "/docs/client/ov" },
+ { "source": "/docs/common/filters/_sl", "destination": "/docs/client/sl" },
+ { "source": "/docs/common/filters/_sr", "destination": "/docs/client/sr" },
+ { "source": "/docs/library/authentication", "destination": "/docs/guides/auth" },
+ { "source": "/docs/library/delete", "destination": "/docs/client/delete" },
+ { "source": "/docs/library/get", "destination": "/docs/client/select" },
+ { "source": "/docs/library/getting-started", "destination": "/docs/client/supabase-client" },
+ { "source": "/docs/library/patch", "destination": "/docs/client/update" },
+ { "source": "/docs/library/post", "destination": "/docs/client/insert" },
+ { "source": "/docs/library/stored-procedures", "destination": "/docs/client/rpc" },
+ { "source": "/docs/library/subscribe", "destination": "/docs/client/subscribe" },
+ { "source": "/docs/library/user-management", "destination": "/docs/guides/auth" },
+ { "source": "/docs/postgres/postgres-intro", "destination": "/docs/postgres/server/about" },
+ { "source": "/docs/realtime/about", "destination": "/docs/realtime/server/about" },
+ { "source": "/docs/realtime/aws", "destination": "/docs/postgres/server/aws" },
+ {
+ "source": "/docs/realtime/digitalocean",
+ "destination": "/docs/postgres/server/digitalocean"
+ },
+ { "source": "/docs/realtime/docker", "destination": "/docs/postgres/server/docker" },
+ { "source": "/docs/realtime/source", "destination": "/docs/postgres/server/about" }
+ ],
+ "trailingSlash": false
+}
diff --git a/www/components/Button.tsx b/www/components/Button.tsx
index 21f283d29e1..82723faa3a0 100644
--- a/www/components/Button.tsx
+++ b/www/components/Button.tsx
@@ -43,7 +43,7 @@ const Button = (props: Props) => {
</button>
)
- return url ? <Link href={url}>{renderButton()}</Link> : renderButton()
+ return url ? <a href={url}>{renderButton()}</a> : renderButton()
}
export default Button
diff --git a/www/components/Nav/Company.tsx b/www/components/Nav/Company.tsx
index e4dadc39f5c..b633808cc47 100644
--- a/www/components/Nav/Company.tsx
+++ b/www/components/Nav/Company.tsx
@@ -81,7 +81,7 @@ const Company = () => {
</div>
<div className="mt-6 text-sm font-medium">
<a
- href="https://supabase.io/blog"
+ href="/blog"
className="text-gray-600 hover:text-gray-500 dark:text-brand-600 dark:hover:text-brand-700 transition ease-in-out duration-150"
>
View all posts <span aria-hidden="true">&rarr;</span>
diff --git a/www/components/Nav/index.tsx b/www/components/Nav/index.tsx
index 31c68862be6..66fb0664f30 100644
--- a/www/components/Nav/index.tsx
+++ b/www/components/Nav/index.tsx
@@ -244,7 +244,7 @@ const Nav = (props: Props) => {
Beta
</a>
<a
- href="https://supabase.io/docs/pricing"
+ href="/docs/pricing"
className={`
inline-flex items-center px-1 border-b-2 border-transparent text-sm font-medium
text-gray-500 hover:text-gray-700 hover:border-gray-500 p-5
diff --git a/www/data/AdminAccess.json b/www/data/AdminAccess.json
index e47dd0654a4..f5919dd1a94 100644
--- a/www/data/AdminAccess.json
+++ b/www/data/AdminAccess.json
@@ -3,18 +3,18 @@
"header": "Manage your data with the familiarity of a spreadsheet",
"description": "You don’t have to be a database expert to use Supabase. Our table editor makes Postgres easy to use, even for non-techies. You can do everything right in our dashboard.",
"cta": "Explore Table View",
- "url": "https://supabase.io/docs/guides/platform"
+ "url": "/docs/guides/platform"
},
"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 save you time. Run common queries and even build applications using our growing list of templates.",
"cta": "Explore SQL Editor",
- "url": "https://supabase.io/docs/guides/platform"
+ "url": "/docs/guides/platform"
},
"tabAuthRules": {
"header": "User management as straight-forward as it can be",
"description": "Easily manage your users with Supabase Auth, with email logins, magic links, and third-party logins. Create complex access policies with SQL rules to fit your unique business needs.",
"cta": "Explore Auth Policies",
- "url": "https://supabase.io/docs/guides/auth"
+ "url": "/docs/guides/auth"
}
-}
\ No newline at end of file
+}
diff --git a/www/data/BlogPosts.json b/www/data/BlogPosts.json
index db7395cbb08..1541789124a 100644
--- a/www/data/BlogPosts.json
+++ b/www/data/BlogPosts.json
@@ -4,8 +4,8 @@
"title": "Tayfa Built a No-Code Website Builder Deployed in Seven Days",
"description": "",
"postMeta": {
- "name" : "Paul Copplestone",
- "avatarUrl": "https://supabase.io/blog/2020/12/02/case-study-xendit",
+ "name": "Paul Copplestone",
+ "avatarUrl": "/blog/2020/12/02/case-study-xendit",
"publishDate": "",
"readLength": 6
},
@@ -16,8 +16,8 @@
"title": "Supabase Partners With Strive School To Help Teach Open Source",
"description": "",
"postMeta": {
- "name" : "Paul Copplestone",
- "avatarUrl": "https://supabase.io/blog/2020/12/02/supabase-striveschool",
+ "name": "Paul Copplestone",
+ "avatarUrl": "/blog/2020/12/02/supabase-striveschool",
"publishDate": "",
"readLength": 6
},
diff --git a/www/data/CaseStudies.json b/www/data/CaseStudies.json
index 605d1c4f1d1..575e8480205 100644
--- a/www/data/CaseStudies.json
+++ b/www/data/CaseStudies.json
@@ -6,7 +6,7 @@
"imgUrl": "images/case-study-monitoro.jpg",
"logoUrl": "images/logos/monitoro.png",
"organization": "Monitoro",
- "url": "https://supabase.io/blog/2020/12/02/case-study-monitoro",
+ "url": "/blog/2020/12/02/case-study-monitoro",
"postMeta": {
"name": "Paul Copplestone",
"avatarUrl": "https://avatars0.githubusercontent.com/u/10214025?v=4",
@@ -22,7 +22,7 @@
"imgUrl": "images/case-study-tayfab.jpg",
"logoUrl": "images/logos/monitoro.png",
"organization": "Tayfab",
- "url": "https://supabase.io/blog/2020/12/02/case-study-tayfa",
+ "url": "/blog/2020/12/02/case-study-tayfa",
"postMeta": {
"name": "Paul Copplestone",
"avatarUrl": "https://avatars0.githubusercontent.com/u/10214025?v=4",
@@ -38,7 +38,7 @@
"imgUrl": "images/case-study-xendit.jpg",
"logoUrl": "images/logos/xendit.png",
"organization": "Llama Lab",
- "url": "https://supabase.io/blog/2020/12/02/case-study-xendit",
+ "url": "/blog/2020/12/02/case-study-xendit",
"postMeta": {
"name": "Paul Copplestone",
"avatarUrl": "https://avatars0.githubusercontent.com/u/10214025?v=4",
diff --git a/www/data/Company.json b/www/data/Company.json
index 8dc8f0d02ca..cd1bfb72181 100644
--- a/www/data/Company.json
+++ b/www/data/Company.json
@@ -2,25 +2,25 @@
{
"text": "Blog",
"description": "Read the latest developments from Supabase",
- "url": "https://supabase.io/blog",
+ "url": "/blog",
"icon": "M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"
},
{
"text": "Open Source",
"description": "Supabase is an opensource company, supporting existing open source tools and communities wherever possible.",
- "url": "https://supabase.io/oss",
+ "url": "/oss",
"icon": "M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"
},
{
"text": "Humans.txt",
"description": "Overview of Supabase staff",
- "url": "https://supabase.io/humans.txt",
+ "url": "/humans.txt",
"icon": "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"
},
{
"text": "Lawyers.txt",
"description": "Details of technology used by Supabase",
- "url": "https://supabase.io/lawyers.txt",
+ "url": "/lawyers.txt",
"icon": "M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
}
]
diff --git a/www/data/DeveloperFeatures.json b/www/data/DeveloperFeatures.json
index f97b687e481..f2d4dd54f0b 100644
--- a/www/data/DeveloperFeatures.json
+++ b/www/data/DeveloperFeatures.json
@@ -3,13 +3,13 @@
"name": "Typescript Support",
"description": "Type definitions built directly from your database schema",
"badge": null,
- "url": "https://supabase.io/docs/client/generating-types"
+ "url": "/docs/client/generating-types"
},
{
"name": "Install from CDN",
"description": "Use Supabase in the browser without a build process",
"badge": null,
- "url": "https://supabase.io/docs/client/initializing"
+ "url": "/docs/client/initializing"
},
{
"name": "Local emulator",
diff --git a/www/data/Developers.json b/www/data/Developers.json
index 2142d36b0a0..7cd70c35a7e 100644
--- a/www/data/Developers.json
+++ b/www/data/Developers.json
@@ -2,13 +2,13 @@
{
"text": "Documentation",
"description": "Everything you need that makes it simple to get started.",
- "url": "https://supabase.io/docs",
+ "url": "/docs",
"icon": "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"
},
{
"text": "API reference",
"description": "Examples and references for using API libraries",
- "url": "https://supabase.io/docs/client/supabase-client",
+ "url": "/docs/client/supabase-client",
"icon": "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"
}
]
diff --git a/www/data/Footer.json b/www/data/Footer.json
index f6d777be20c..f0bc9dcb89b 100644
--- a/www/data/Footer.json
+++ b/www/data/Footer.json
@@ -4,11 +4,11 @@
"links": [
{
"text": "Database",
- "url": "https://supabase.io/docs/guides/database"
+ "url": "/docs/guides/database"
},
{
"text": "Authentication",
- "url": "https://supabase.io/docs/guides/auth"
+ "url": "/docs/guides/auth"
},
{
"text": "Storage",
@@ -20,7 +20,7 @@
},
{
"text": "Pricing",
- "url": "https://supabase.io/docs/pricing"
+ "url": "/docs/pricing"
}
]
},
@@ -29,11 +29,11 @@
"links": [
{
"text": "Support",
- "url": "https://supabase.io/docs/support"
+ "url": "/docs/support"
},
{
"text": "Case Studies",
- "url": "https://supabase.io/blog/tags/case-study"
+ "url": "/blog/tags/case-study"
},
{
"text": "System Status",
@@ -41,7 +41,7 @@
},
{
"text": "Terms of service",
- "url": "https://supabase.io/docs/company/terms"
+ "url": "/docs/company/terms"
}
]
},
diff --git a/www/data/Solutions.json b/www/data/Solutions.json
index 5c458ff037c..32011186b4f 100644
--- a/www/data/Solutions.json
+++ b/www/data/Solutions.json
@@ -1,34 +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",
+ "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": "Every project is a full Postgres database, the world's most trusted relational database.",
"description_short": "",
"label": "",
- "url" : "https://supabase.io/docs/guides/database"
+ "url": "/docs/guides/database"
},
"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",
+ "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": "Add user sign ups and logins, securing your data with Row Level Security.",
"description_short": "",
"label": "",
- "url" : "https://supabase.io/docs/guides/auth"
+ "url": "/docs/guides/auth"
},
"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",
+ "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 large files. Any media, including videos and images.",
"description_short": "",
"label": "Coming soon",
- "url" : "https://mailchi.mp/supabase/storage"
+ "url": "https://mailchi.mp/supabase/storage"
},
"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",
+ "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": "Write custom code and cron jobs without deploying or scaling servers.",
"description_short": "",
"label": "Coming soon",
- "url" : "https://mailchi.mp/supabase/functions"
+ "url": "https://mailchi.mp/supabase/functions"
}
}
diff --git a/www/pages/beta.tsx b/www/pages/beta.tsx
index 58ed0e849ce..6548c835d6a 100644
--- a/www/pages/beta.tsx
+++ b/www/pages/beta.tsx
@@ -144,7 +144,7 @@ const Introduction = () => {
we've been fortunate to work with thousands of early adopters on improving both our Open
Source, and Hosted offerings. Companies like{' '}
<a
- href="https://supabase.io/blog/2020/12/02/case-study-xendit"
+ href="/blog/2020/12/02/case-study-xendit"
target="_blank"
className="text-brand-700 hover:text-brand-800"
>
@@ -152,7 +152,7 @@ const Introduction = () => {
</a>
,{' '}
<a
- href="https://supabase.io/blog/2020/12/02/case-study-monitoro"
+ href="/blog/2020/12/02/case-study-monitoro"
target="_blank"
className="text-brand-700 hover:text-brand-800"
>
@@ -160,7 +160,7 @@ const Introduction = () => {
</a>
, and{' '}
<a
- href="https://supabase.io/blog/2020/12/02/case-study-tayfa"
+ href="/blog/2020/12/02/case-study-tayfa"
target="_blank"
className="text-brand-700 hover:text-brand-800"
>
@@ -549,7 +549,7 @@ const NewFeaturesAndIntegrations = () => {
If you're new to Supabase, here's a few of the things you get when you choose us
as your backend. We provide{' '}
<a
- href="https://supabase.io/docs/client/auth-signup"
+ href="/docs/client/auth-signup"
target="_blank"
className="text-brand-700 hover:text-brand-800"
>
@@ -557,7 +557,7 @@ const NewFeaturesAndIntegrations = () => {
</a>{' '}
(and{' '}
<a
- href="https://supabase.io/docs/gotrue/server/about#endpoints"
+ href="/docs/gotrue/server/about#endpoints"
target="_blank"
className="text-brand-700 hover:text-brand-800"
>
@@ -579,7 +579,7 @@ const NewFeaturesAndIntegrations = () => {
<p>
You can{' '}
<a
- href="https://supabase.io/docs/guides/client-libraries#realtime-changes"
+ href="/docs/guides/client-libraries#realtime-changes"
target="_blank"
className="text-brand-700 hover:text-brand-800"
>
@@ -598,7 +598,7 @@ const NewFeaturesAndIntegrations = () => {
You can use your database immediately, without an ORM or an API backend. We
support GraphQL-like{' '}
<a
- href="https://supabase.io/docs/client/select#query-foreign-tables"
+ href="/docs/client/select#query-foreign-tables"
target="_blank"
className="text-brand-700 hover:text-brand-800"
>
@@ -606,7 +606,7 @@ const NewFeaturesAndIntegrations = () => {
</a>{' '}
in a single request, and you can even{' '}
<a
- href="https://supabase.io/docs/client/rpc"
+ href="/docs/client/rpc"
target="_blank"
className="text-brand-700 hover:text-brand-800"
>
@@ -680,8 +680,8 @@ const BetaPricing = () => (
</li>
</ul>
<p className="mb-10">
- Whilst we're not yet ready to publish a standardized pricing model, we are committing to the
- following initiatives:
+ Whilst we're not yet ready to publish a standardized pricing model, we are committing to
+ the following initiatives:
</p>
<ul className="list-decimal list-outside ml-6 mb-10">
<li className="mb-5">
@@ -694,8 +694,8 @@ const BetaPricing = () => (
for free.
</li>
<li className="mb-5">
- University (and participating code school) Students will be eligible for 2 years
- of base tier usage (Code Schools can contact{' '}
+ University (and participating code school) Students will be eligible for 2 years of
+ base tier usage (Code Schools can contact{' '}
<a
href="mailto:[email protected]"
target="_blank"
@@ -750,7 +750,7 @@ const OpenSource = () => (
<p className="mb-10">
One of the biggest barriers to Open Source is knowing exactly how to get started. We're{' '}
<a
- href="https://supabase.io/blog/2020/12/02/supabase-striveschool"
+ href="/blog/2020/12/02/supabase-striveschool"
target="_blank"
className="text-brand-700 hover:text-brand-800"
>