ReferencePage() — supabase Function Reference
Architecture documentation for the ReferencePage() function in page.tsx from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 3209e6f3_8d6d_ac1c_7e61_019ebb7c0ba8["ReferencePage()"] 9e04b292_66c7_6129_dcb5_dfa277f2392b["parseReferencePath()"] 3209e6f3_8d6d_ac1c_7e61_019ebb7c0ba8 -->|calls| 9e04b292_66c7_6129_dcb5_dfa277f2392b 0df772dc_7499_81c0_d9d9_35372b5ce3b3["redirectNonexistentReferenceSection()"] 3209e6f3_8d6d_ac1c_7e61_019ebb7c0ba8 -->|calls| 0df772dc_7499_81c0_d9d9_35372b5ce3b3 style 3209e6f3_8d6d_ac1c_7e61_019ebb7c0ba8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/app/reference/[...slug]/page.tsx lines 17–57
export default async function ReferencePage(props: { params: Promise<{ slug: Array<string> }> }) {
const params = await props.params
const { slug } = params
if (!Object.keys(REFERENCES).includes(slug[0].replaceAll('-', '_'))) {
notFound()
}
const parsedPath = parseReferencePath(slug)
const isClientSdkReference = parsedPath.__type === 'clientSdk'
const isCliReference = parsedPath.__type === 'cli'
const isApiReference = parsedPath.__type === 'api'
const isSelfHostingReference = parsedPath.__type === 'self-hosting'
if (isClientSdkReference) {
const { sdkId, maybeVersion, path } = parsedPath
const sdkData = REFERENCES[sdkId]
if (sdkData.enabled === false) {
notFound()
}
const latestVersion = sdkData.versions[0]
const version = maybeVersion ?? latestVersion
await redirectNonexistentReferenceSection(sdkId, version, path, version === latestVersion)
return <ClientSdkReferencePage sdkId={sdkId} libVersion={version} />
} else if (isCliReference) {
return <CliReferencePage />
} else if (isApiReference) {
return <ApiReferencePage />
} else if (isSelfHostingReference) {
return (
<SelfHostingReferencePage service={parsedPath.service} servicePath={parsedPath.servicePath} />
)
} else {
notFound()
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does ReferencePage() do?
ReferencePage() is a function in the supabase codebase.
What does ReferencePage() call?
ReferencePage() calls 2 function(s): parseReferencePath, redirectNonexistentReferenceSection.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free