Skip to content

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

Working!

Chase Granberry4a041814404a
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index 240e34fdf32..21524546e27 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -837,6 +837,13 @@ export const self_hosting = {
{ name: 'Configuration', url: '/guides/self-hosting/realtime/config', items: [] },
],
},
+ {
+ name: 'Analytics Server',
+ items: [
+ { name: 'Reference', url: '/reference/self-hosting-analytics/introduction', items: [] },
+ { name: 'Configuration', url: '/guides/self-hosting/analytics/config', items: [] },
+ ],
+ },
],
}
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
index e585077975f..be3aa9451ae 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
@@ -22,6 +22,7 @@ import cliCommonSections from '~/../../spec/common-cli-sections.json'
import libCommonSections from '~/../../spec/common-client-libs-sections.json'
import authServerCommonSections from '~/../../spec/common-self-hosting-auth-sections.json'
import realtimeServerCommonSections from '~/../../spec/common-self-hosting-realtime-sections.json'
+import analyticsServerCommonSections from '~/../../spec/common-self-hosting-analytics-sections.json'
import storageServerCommonSections from '~/../../spec/common-self-hosting-storage-sections.json'
import { flattenSections } from '~/lib/helpers'
import NavigationMenuHome from './HomeMenu'
@@ -70,6 +71,7 @@ export type RefKeyOptions =
| 'self-hosting-auth'
| 'self-hosting-storage'
| 'self-hosting-realtime'
+ | 'self-hosting-analytics'
const NavigationMenu = () => {
const router = useRouter()
@@ -154,6 +156,9 @@ const NavigationMenu = () => {
case url.includes(`/docs/reference/self-hosting-realtime`) && url:
menuState.setMenuLevelId('reference_self_hosting_realtime')
break
+ case url.includes(`/docs/reference/self-hosting-analytics`) && url:
+ menuState.setMenuLevelId('reference_self_hosting_analytics')
+ break
default:
break
@@ -304,6 +309,13 @@ const NavigationMenu = () => {
commonSections={realtimeServerCommonSections}
lib="self-hosting-realtime"
/>
+ <NavigationMenuRefList
+ key={'reference-self-hosting-analytics-menu'}
+ id={'reference_self_hosting_realtime'}
+ active={isReference_Self_Hosting_Realtime}
+ commonSections={analyticsServerCommonSections}
+ lib="self-hosting-analytics"
+ />
</div>
)
}
diff --git a/apps/docs/docs/ref/self-hosting-analytics/introduction.mdx b/apps/docs/docs/ref/self-hosting-analytics/introduction.mdx
new file mode 100644
index 00000000000..bbcbe72bd94
--- /dev/null
+++ b/apps/docs/docs/ref/self-hosting-analytics/introduction.mdx
@@ -0,0 +1,29 @@
+---
+id: introduction
+title: Introduction
+hideTitle: true
+---
+
+<div className="flex items-start gap-6 not-prose" id="introduction">
+ <img src="/docs/img/icons/menu/reference-analytics.svg" className="w-8 h-8 rounded" />
+ <div className="flex flex-col gap-2">
+ <h1 className="text-3xl text-scale-1200 m-0">Self-Hosting Analytics</h1>
+ </div>
+</div>
+
+<RefSubLayout.EducationRow>
+ <RefSubLayout.Details>
+
+ Analytics == Logflare
+
+ </RefSubLayout.Details>
+
+ <RefSubLayout.Examples>
+
+ ### Client libraries
+
+ ### Additional links
+
+ </RefSubLayout.Examples>
+
+</RefSubLayout.EducationRow>
diff --git a/apps/docs/layouts/SiteLayout.tsx b/apps/docs/layouts/SiteLayout.tsx
index d8966e5d668..c4e6ee9a28b 100644
--- a/apps/docs/layouts/SiteLayout.tsx
+++ b/apps/docs/layouts/SiteLayout.tsx
@@ -34,6 +34,10 @@ const levelsData = {
icon: '/docs/img/icons/menu/realtime',
name: 'Realtime',
},
+ analytics: {
+ icon: '/docs/img/icons/menu/analytics',
+ name: 'Analytics',
+ },
storage: {
icon: '/docs/img/icons/menu/storage',
name: 'Storage',
@@ -102,6 +106,10 @@ const levelsData = {
icon: '/docs/img/icons/menu/reference-realtime',
name: 'Realtime Server Reference',
},
+ reference_self_hosting_analytics: {
+ icon: '/docs/img/icons/menu/reference-analytics',
+ name: 'analytics Server Reference',
+ },
}
const MobileHeader = memo(function MobileHeader() {
diff --git a/apps/docs/package.json b/apps/docs/package.json
index f8fd026c549..e9fa1f2badc 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -35,7 +35,9 @@
"gen:supabase-js:v2": "npm-run-all gen:supabase-js:v2:ref",
"gen:supabase-js:v2:ref": "ts-node ./generator/index.ts gen --type legacy --input ../../spec/supabase_js_v2.yml --output ./docs/reference/javascript/generated",
"gen:realtime": "npm-run-all gen:realtime:config",
- "gen:realtime:config": "ts-node ./generator/index.ts gen --type config --input ../../spec/realtime_v0_config.yaml --output ./docs/reference/realtime/generated/config.mdx"
+ "gen:realtime:config": "ts-node ./generator/index.ts gen --type config --input ../../spec/realtime_v0_config.yaml --output ./docs/reference/realtime/generated/config.mdx",
+ "gen:analytics": "npm-run-all gen:analytics:config",
+ "gen:analytics:config": "ts-node ./generator/index.ts gen --type config --input ../../spec/analytics_v0_config.yaml --output ./docs/reference/analytics/generated/config.mdx"
},
"dependencies": {
"@algolia/autocomplete-js": "^1.7.2",
@@ -110,4 +112,4 @@
"tsx": "^3.12.2",
"typescript": "^4.5.3"
}
-}
+}
\ No newline at end of file
diff --git a/apps/docs/pages/index.mdx b/apps/docs/pages/index.mdx
index d8aebeb4157..f1a68b30401 100644
--- a/apps/docs/pages/index.mdx
+++ b/apps/docs/pages/index.mdx
@@ -310,6 +310,13 @@ export const apis = [
href: 'reference/self-hosting-realtime/introduction',
description: 'Self-host your own Realtime server.',
},
+ {
+ title: 'Self-Hosting Analytics',
+ icon: '/docs/img/icons/menu/reference-analytics',
+ hasLightIcon: true,
+ href: 'reference/self-hosting-analytics/introduction',
+ description: 'Self-host your own Analytics server.',
+ },
]
export const platform = [
diff --git a/apps/docs/pages/reference/analytics/config.tsx b/apps/docs/pages/reference/analytics/config.tsx
new file mode 100644
index 00000000000..e22dfe2e911
--- /dev/null
+++ b/apps/docs/pages/reference/analytics/config.tsx
@@ -0,0 +1,115 @@
+import fs from 'fs'
+import matter from 'gray-matter'
+import components from '~/components/index'
+import { MDXRemote } from 'next-mdx-remote'
+import { serialize } from 'next-mdx-remote/serialize'
+
+// @ts-expect-error
+import specFile from '~/../../spec/analytics_v0_config.yaml' assert { type: 'yml' }
+import { Parameter } from '~/lib/refGenerator/refTypes'
+
+import ReactMarkdown from 'react-markdown'
+
+// Parameters are grouped on the page by tag
+const TAGS = ['general', 'database']
+
+export default function Config(props) {
+ return (
+ <div>
+ <div className="flex my-16">
+ <div className="w-full prose">
+ <h1 className="text-4xl mb-16">{specFile.info.title} Configuration</h1>
+ <ReactMarkdown>{specFile.info.description}</ReactMarkdown>
+ <div>
+ <div>
+ {props.docs
+ .filter((doc) => doc.introPage)
+ .map((item) => (
+ <MDXRemote {...item.content} components={components} />
+ ))}
+ </div>
+ {TAGS.map((tag) =>
+ specFile.parameters
+ .filter((param: Parameter) => param.tags[0] === tag)
+ .map((parameter: Parameter, index) => (
+ <div>
+ {index === 0 && <h2 className="text-xl capitalize">{tag} Settings</h2>}
+ <div className="mt-8">
+ <div>
+ <h2 className="text-xl font-medium text-scale-1200 font-mono">
+ <span className="mr-2">$</span>
+ {parameter.title}
+ </h2>
+ <div className="grid" id={parameter.id}>
+ <div className="border-b pb-8" key={parameter.id}>
+ <div className=" mb-16">
+ <p className="mb-4 scroll-mt-16 mt-0 text-scale-1100 text-base">
+ <ReactMarkdown>{parameter.description}</ReactMarkdown>
+ </p>
+ <div className="grid gap-2">
+ <div className="flex gap-2">
+ Required: <code>{parameter.required.toString()}</code>
+ </div>
+ <div className="flex gap-2">
+ Default:
+ <code>
+ {parameter.default ? parameter.default.toString() : 'None'}
+ </code>
+ </div>
+ </div>
+ </div>
+ {parameter.links &&
+ parameter.links.map((link) => (
+ <div>
+ <h3>See also:</h3>
+ <li>
+ <a href={link.link}>{link.name}</a>
+ </li>
+ </div>
+ ))}
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ ))
+ )}
+ </div>
+ </div>
+ </div>
+ </div>
+ )
+}
+export async function getServerSideProps() {
+ // an array of ids of the intro sections for this library
+ const introPages = ['analytics']
+
+ const pages = [...introPages]
+
+ // Grab custom markdown intro page files
+ const allMarkdownDocs = await Promise.all(
+ pages.map(async (x: any, i) => {
+ const pathName = `docs/ref/analytics/${x}.mdx`
+
+ const markdownExists = fs.existsSync(pathName)
+
+ const fileContents = markdownExists ? fs.readFileSync(pathName, 'utf8') : ''
+ const { data, content } = matter(fileContents)
+
+ return {
+ id: x,
+ title: x,
+ // ...content,
+ meta: data,
+ introPage: introPages.includes(x),
+ content: content ? await serialize(content || '') : null,
+ }
+ })
+ )
+
+ return {
+ props: {
+ docs: allMarkdownDocs,
+ },
+ }
+}
diff --git a/apps/docs/pages/reference/self-hosting-analytics/[...slug].tsx b/apps/docs/pages/reference/self-hosting-analytics/[...slug].tsx
new file mode 100644
index 00000000000..f1d1e2dfaec
--- /dev/null
+++ b/apps/docs/pages/reference/self-hosting-analytics/[...slug].tsx
@@ -0,0 +1,21 @@
+import selfHostingAnalyticsCommonSections from '~/../../spec/common-self-hosting-analytics-sections.json'
+
+import RefSectionHandler from '~/components/reference/RefSectionHandler'
+import { flattenSections } from '~/lib/helpers'
+import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'
+import handleRefStaticProps from '~/lib/mdx/handleRefStaticProps'
+import { gen_v3 } from '~/lib/refGenerator/helpers'
+
+const sections = flattenSections(selfHostingAnalyticsCommonSections)
+
+export default function JSReference(props) {
+ return <RefSectionHandler sections={sections} pageProps={props} type="api" />
+}
+
+export async function getStaticProps() {
+ return handleRefStaticProps(sections, '/self-hosting-analytics')
+}
+
+export function getStaticPaths() {
+ return handleRefGetStaticPaths()
+}
diff --git a/apps/docs/public/img/icons/menu/analytics-light.svg b/apps/docs/public/img/icons/menu/analytics-light.svg
new file mode 100644
index 00000000000..3cea218cd72
--- /dev/null
+++ b/apps/docs/public/img/icons/menu/analytics-light.svg
@@ -0,0 +1,6 @@
+<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M4.55762 4.87402L9.07535 15.2056L10.2522 10.6476L15.0002 9.46582L4.55762 4.87402Z" fill="#92CEAC" stroke="#299764" stroke-miterlimit="10" stroke-linejoin="bevel"/>
+<path d="M1.36621 1.63246L3.49715 3.82855" stroke="#299764" stroke-miterlimit="10"/>
+<line x1="5.3623" y1="1.33521" x2="5.3623" y2="3.68408" stroke="#299764" stroke-miterlimit="10"/>
+<line x1="3.41797" y1="5.55371" x2="1.05225" y2="5.55371" stroke="#299764" stroke-miterlimit="10"/>
+</svg>
diff --git a/apps/docs/public/img/icons/menu/analytics.svg b/apps/docs/public/img/icons/menu/analytics.svg
new file mode 100644
index 00000000000..2c3be34319e
--- /dev/null
+++ b/apps/docs/public/img/icons/menu/analytics.svg
@@ -0,0 +1,6 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M4.55762 4.52319L9.07535 14.8547L10.2522 10.2968L15.0002 9.11499L4.55762 4.52319Z" fill="#133929" stroke="#4CC38A" stroke-miterlimit="10" stroke-linejoin="bevel"/>
+<path d="M1.36621 1.28163L3.49715 3.47772" stroke="#4CC38A" stroke-miterlimit="10"/>
+<line x1="5.3623" y1="0.984375" x2="5.3623" y2="3.33325" stroke="#4CC38A" stroke-miterlimit="10"/>
+<line x1="3.41797" y1="5.20288" x2="1.05225" y2="5.20288" stroke="#4CC38A" stroke-miterlimit="10"/>
+</svg>
diff --git a/apps/docs/public/img/icons/menu/reference-analytics-light.svg b/apps/docs/public/img/icons/menu/reference-analytics-light.svg
new file mode 100644
index 00000000000..1a9bef014b3
--- /dev/null
+++ b/apps/docs/public/img/icons/menu/reference-analytics-light.svg
@@ -0,0 +1 @@
+<svg width="15" height="15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m3.558 4.523 4.517 10.332 1.177-4.558L14 9.115 3.558 4.523Z" fill="url(#a)"/><path fill-rule="evenodd" clip-rule="evenodd" d="m3.266 4.65.42-.418 10.443 4.592-.052.6-4.564 1.136-1.13 4.374-.6.048L3.267 4.651Zm.91.493 3.822 8.74.946-3.666.231-.229 3.844-.957-8.843-3.888Z" fill="url(#b)"/><path fill-rule="evenodd" clip-rule="evenodd" d="m.595 1.06 2.13 2.196-.456.443L.138 1.503l.457-.443Z" fill="url(#c)"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3.862 3.333V.984H4.5v2.35h-.637Z" fill="url(#d)"/><path fill-rule="evenodd" clip-rule="evenodd" d="M.052 4.703h2.366v.636H.052v-.636Z" fill="url(#e)"/><defs><linearGradient id="a" x1="-2.606" y1=".984" x2="19.391" y2=".984" gradientUnits="userSpaceOnUse"><stop stop-color="#429B72"/><stop offset="1" stop-color="#4CC38A" stop-opacity=".6"/></linearGradient><linearGradient id="b" x1="-2.606" y1=".984" x2="19.391" y2=".984" gradientUnits="userSpaceOnUse"><stop stop-color="#429B72"/><stop offset="1" stop-color="#4CC38A" stop-opacity=".6"/></linearGradient><linearGradient id="c" x1="-2.606" y1=".984" x2="19.391" y2=".984" gradientUnits="userSpaceOnUse"><stop stop-color="#429B72"/><stop offset="1" stop-color="#4CC38A" stop-opacity=".6"/></linearGradient><linearGradient id="d" x1="-2.606" y1=".984" x2="19.391" y2=".984" gradientUnits="userSpaceOnUse"><stop stop-color="#429B72"/><stop offset="1" stop-color="#4CC38A" stop-opacity=".6"/></linearGradient><linearGradient id="e" x1="-2.606" y1=".984" x2="19.391" y2=".984" gradientUnits="userSpaceOnUse"><stop stop-color="#429B72"/><stop offset="1" stop-color="#4CC38A" stop-opacity=".6"/></linearGradient></defs></svg>
\ No newline at end of file
diff --git a/apps/docs/public/img/icons/menu/reference-analytics.svg b/apps/docs/public/img/icons/menu/reference-analytics.svg
new file mode 100644
index 00000000000..bbb0c056edb
--- /dev/null
+++ b/apps/docs/public/img/icons/menu/reference-analytics.svg
@@ -0,0 +1 @@
+<svg width="15" height="15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m3.558 4.523 4.517 10.332 1.177-4.558L14 9.115 3.558 4.523Z" fill="url(#a)"/><path fill-rule="evenodd" clip-rule="evenodd" d="m3.266 4.65.42-.418 10.443 4.592-.052.6-4.564 1.136-1.13 4.374-.6.048L3.267 4.651Zm.91.493 3.822 8.74.946-3.666.231-.229 3.844-.957-8.843-3.888Z" fill="url(#b)"/><path fill-rule="evenodd" clip-rule="evenodd" d="m.595 1.06 2.13 2.196-.456.443L.138 1.503l.457-.443Z" fill="url(#c)"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3.862 3.333V.984H4.5v2.35h-.637Z" fill="url(#d)"/><path fill-rule="evenodd" clip-rule="evenodd" d="M.052 4.703h2.366v.636H.052v-.636Z" fill="url(#e)"/><defs><linearGradient id="a" x1="-2.606" y1=".984" x2="19.391" y2=".984" gradientUnits="userSpaceOnUse"><stop stop-color="#F4FFFA"/><stop offset="1" stop-color="#D8FFEC" stop-opacity=".6"/></linearGradient><linearGradient id="b" x1="-2.606" y1=".984" x2="19.391" y2=".984" gradientUnits="userSpaceOnUse"><stop stop-color="#F4FFFA"/><stop offset="1" stop-color="#D8FFEC" stop-opacity=".6"/></linearGradient><linearGradient id="c" x1="-2.606" y1=".984" x2="19.391" y2=".984" gradientUnits="userSpaceOnUse"><stop stop-color="#F4FFFA"/><stop offset="1" stop-color="#D8FFEC" stop-opacity=".6"/></linearGradient><linearGradient id="d" x1="-2.606" y1=".984" x2="19.391" y2=".984" gradientUnits="userSpaceOnUse"><stop stop-color="#F4FFFA"/><stop offset="1" stop-color="#D8FFEC" stop-opacity=".6"/></linearGradient><linearGradient id="e" x1="-2.606" y1=".984" x2="19.391" y2=".984" gradientUnits="userSpaceOnUse"><stop stop-color="#F4FFFA"/><stop offset="1" stop-color="#D8FFEC" stop-opacity=".6"/></linearGradient></defs></svg>
\ No newline at end of file
diff --git a/spec/analytics_v0_config.yaml b/spec/analytics_v0_config.yaml
new file mode 100644
index 00000000000..366943a0547
--- /dev/null
+++ b/spec/analytics_v0_config.yaml
@@ -0,0 +1,228 @@
+configspec: '001'
+
+# This section outlines the general information for the tool.
+info:
+ id: 'analytics' # {string} A unique ID for this tool.
+ version: 'next' # {string} The current version number of the tool.
+ title: 'Analytics' # {string} A readable name.
+ source: 'https://github.com/supabase/realtime' # {string} Where developers can find the source code.
+ bugs: 'https://github.com/supabase/realtime/issues' # {string} Where developers can file bugs.
+ spec: 'https://github.com/supabase/supabase/blob/master/spec/realtime_v0_config.yml' # {string} Where developers can find this spec (to link directly in the docs).
+ description: |
+ You can use Environment Variables to configure your Realtime Server.
+ tags:
+ - id: general
+ title: General Settings
+ description: General server settings.
+ - id: database
+ title: Database Settings
+ description: Connecting to your database.
+
+# This section is an array of public functions which a user might need to execute.
+parameters:
+ - id: 'PORT' # {string} A unique identifier for this param.
+ title: 'PORT' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: '4000'
+ description: |
+ Port which you can connect your client/listeners
+
+ - id: 'DB_HOST' # {string} A unique identifier for this param.
+ title: 'DB_HOST' # {string} Any name.
+ tags: ['database'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'localhost'
+ description: |
+ Database host URL
+
+ - id: 'DB_NAME' # {string} A unique identifier for this param.
+ title: 'DB_NAME' # {string} Any name.
+ tags: ['database'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'postgres'
+ description: |
+ Database name
+
+ - id: 'DB_USER' # {string} A unique identifier for this param.
+ title: 'DB_USER' # {string} Any name.
+ tags: ['database'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'postgres'
+ description: |
+ Database user
+
+ - id: 'DB_PASSWORD' # {string} A unique identifier for this param.
+ title: 'DB_PASSWORD' # {string} Any name.
+ tags: ['database'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'postgres'
+ description: |
+ Database password
+
+ - id: 'DB_PORT' # {string} A unique identifier for this param.
+ title: 'DB_PORT' # {string} Any name.
+ tags: ['database'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: '5432'
+ description: |
+ Database port
+
+ - id: 'DB_SSL' # {string} A unique identifier for this param.
+ title: 'DB_SSL' # {string} Any name.
+ tags: ['database'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'true'
+ description: |
+ Database SSL connection
+
+ - id: 'DB_IP_VERSION' # {string} A unique identifier for this param.
+ title: 'DB_IP_VERSION' # {string} Any name.
+ tags: ['database'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'IPv4'
+ description: |
+ Connect to database via either IPv4 or IPv6. Disregarded if database host is an IP address (e.g. '127.0.0.1') and recommended if database host is a name (e.g. 'db.abcd.supabase.co') to prevent potential non-existent domain (NXDOMAIN) errors.
+
+ - id: 'REPLICATION_MODE' # {string} A unique identifier for this param.
+ title: 'REPLICATION_MODE' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'RLS'
+ description: |
+ Connect to database via either IPv4 or IPv6. Disregarded if database host is an IP address (e.g. '127.0.0.1') and recommended if database host is a name (e.g. 'db.abcd.supabase.co') to prevent potential non-existent domain (NXDOMAIN) errors.
+
+ - id: 'SLOT_NAME' # {string} A unique identifier for this param.
+ title: 'SLOT_NAME' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'realtime_rls'
+ description: |
+ A unique name for Postgres to track the Write-Ahead Logging (WAL). If the Realtime server dies then this slot can keep the changes since the last committed position.
+
+ - id: 'TEMPORARY_SLOT' # {string} A unique identifier for this param.
+ title: 'TEMPORARY_SLOT' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'false'
+ description: |
+ Start logical replication slot as either temporary or permanent
+
+ - id: 'REALTIME_IP_VERSION' # {string} A unique identifier for this param.
+ title: 'REALTIME_IP_VERSION' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'IPV6'
+ description: |
+ Bind realtime via either IPv4 or IPv6
+
+ - id: 'PUBLICATIONS' # {string} A unique identifier for this param.
+ title: 'PUBLICATIONS' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: '[\"supabase_realtime\"]'
+ description: |
+ JSON encoded array of publication names. Realtime RLS currently accepts one publication.
+
+ - id: 'SECURE_CHANNELS' # {string} A unique identifier for this param.
+ title: 'SECURE_CHANNELS' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'true'
+ description: |
+ Enable/Disable channels authorization via JWT verification
+
+ - id: 'JWT_SECRET' # {string} A unique identifier for this param.
+ title: 'JWT_SECRET' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: '""'
+ description: |
+ HS algorithm octet key (e.g. "95x0oR8jq9unl9pOIx")
+
+ - id: 'JWT_CLAIM_VALIDATORS' # {string} A unique identifier for this param.
+ title: 'JWT_CLAIM_VALIDATORS' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: '{}'
+ description: |
+ Expected claim key/value pairs compared to JWT claims via equality checks in order to validate JWT. e.g. '{"iss": "Issuer", "nbf": 1610078130}'.
+
+ - id: 'EXPOSE_METRICS' # {string} A unique identifier for this param.
+ title: 'EXPOSE_METRICS' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'false'
+ description: |
+ Expose Prometheus metrics at '/metrics' endpoint.
+
+ - id: 'DB_RECONNECT_BACKOFF_MIN' # {string} A unique identifier for this param.
+ title: 'DB_RECONNECT_BACKOFF_MIN' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: '100'
+ description: |
+ Specify the minimum amount of time to wait before reconnecting to database
+
+ - id: 'DB_RECONNECT_BACKOFF_MAX' # {string} A unique identifier for this param.
+ title: 'DB_RECONNECT_BACKOFF_MAX' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: '120000'
+ description: |
+ Specify the maximum amount of time to wait before reconnecting to database
+
+ - id: 'REPLICATION_POLL_INTERVAL' # {string} A unique identifier for this param.
+ title: 'REPLICATION_POLL_INTERVAL' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: '300'
+ description: |
+ Specify how often Realtime RLS should poll the replication slot for changes
+
+ - id: 'SUBSCRIPTION_SYNC_INTERVAL' # {string} A unique identifier for this param.
+ title: 'SUBSCRIPTION_SYNC_INTERVAL' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: '60000'
+ description: |
+ Specify how often Realtime RLS should confirm connected subscribers and the tables they're listening to
+
+ - id: 'MAX_CHANGES' # {string} A unique identifier for this param.
+ title: 'MAX_CHANGES' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: '100'
+ description: |
+ Soft limit for the number of database changes to fetch per replication poll
+
+ - id: 'MAX_RECORD_BYTES' # {string} A unique identifier for this param.
+ title: 'MAX_RECORD_BYTES' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: '1048576' # bytes or 1MB
+ description: |
+ Controls the maximum size of a WAL record
diff --git a/spec/common-self-hosting-analytics-sections.json b/spec/common-self-hosting-analytics-sections.json
new file mode 100644
index 00000000000..0ffa94e1b1a
--- /dev/null
+++ b/spec/common-self-hosting-analytics-sections.json
@@ -0,0 +1,9 @@
+[
+ {
+ "id": "introduction",
+ "title": "Introduction",
+ "slug": "introduction",
+ "summary": "Introduction",
+ "type": "markdown"
+ }
+]