DocPage() — supabase Function Reference
Architecture documentation for the DocPage() function in page.tsx from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD daf61a5c_ae42_1be8_7311_e9ffbc3fe53a["DocPage()"] 08a34405_1a84_76a1_9e7e_5879d7268772["getDocFromParams()"] daf61a5c_ae42_1be8_7311_e9ffbc3fe53a -->|calls| 08a34405_1a84_76a1_9e7e_5879d7268772 f2eaa29e_b03b_b94b_36f9_934a391ab358["getTableOfContents()"] daf61a5c_ae42_1be8_7311_e9ffbc3fe53a -->|calls| f2eaa29e_b03b_b94b_36f9_934a391ab358 style daf61a5c_ae42_1be8_7311_e9ffbc3fe53a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/design-system/app/(app)/docs/[[...slug]]/page.tsx lines 77–123
export default async function DocPage(props: DocPageProps) {
const params = await props.params
const doc = await getDocFromParams({ params })
if (!doc) {
notFound()
}
const toc = await getTableOfContents(doc.body.raw)
return (
<div className="relative xl:grid xl:grid-cols-[1fr_160px] gap-4 px-6 py-6 lg:py-8">
<div className="mx-auto w-full min-w-0 max-w-4xl flex-1">
<div className="mb-4 flex items-center space-x-1 text-sm text-foreground-muted">
<div className="overflow-hidden text-ellipsis whitespace-nowrap">Docs</div>
<ChevronRight className="h-4 w-4 text-foreground-muted" />
<div className="text-foreground-lighter">{doc.title}</div>
</div>
<div className="space-y-2 mb-5">
<h1 className="scroll-m-20 text-4xl tracking-tight">{doc.title}</h1>
{doc.description && (
<p className="text-lg text-foreground-light">
<Balancer>{doc.description}</Balancer>
</p>
)}
</div>
<Separator className="mb-6" />
<SourcePanel doc={doc} />
<div className="pb-12">
<Mdx code={doc.body.code} />
</div>
<DocsPager doc={doc} />
</div>
{doc.toc && (
<div className="hidden text-sm xl:block">
<div className="sticky top-8 -mt-10 pt-8">
<ScrollArea className="pb-10">
<div className="h-[calc(100vh-3.5rem)] py-14">
<DashboardTableOfContents toc={toc} />
</div>
</ScrollArea>
</div>
</div>
)}
</div>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does DocPage() do?
DocPage() is a function in the supabase codebase.
What does DocPage() call?
DocPage() calls 2 function(s): getDocFromParams, getTableOfContents.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free