page.tsx — ui Source File
Architecture documentation for page.tsx, a tsx file in the ui codebase. 14 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 3a58ab06_5d4b_5607_01b6_9b055f101a35["page.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 9c1a1e1b_87f8_29d5_c12d_e83869cf94e4["next"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> 9c1a1e1b_87f8_29d5_c12d_e83869cf94e4 f5b0b1d9_de2f_9c31_0bcd_4adbd07581cb["navigation"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> f5b0b1d9_de2f_9c31_0bcd_4adbd07581cb 8964a549_2e67_58d7_11c7_c9265d5c7971["config"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> 8964a549_2e67_58d7_11c7_c9265d5c7971 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 683e59cc_aef3_6181_1192_a4dcb3faf152["mode-switcher"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> 683e59cc_aef3_6181_1192_a4dcb3faf152 96af2142_6218_7e81_b315_d8e5b5579f90["tailwind-indicator"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> 96af2142_6218_7e81_b315_d8e5b5579f90 f14cf7ca_f213_afc2_bc66_ebc0fb7d9834["config"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> f14cf7ca_f213_afc2_bc66_ebc0fb7d9834 865c7556_edf2_9585_e074_89d75194f7a1["design-system-provider"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> 865c7556_edf2_9585_e074_89d75194f7a1 73619f96_c063_56c9_7ddc_c1aec768db1a["item-picker"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> 73619f96_c063_56c9_7ddc_c1aec768db1a b81cb9e6_cf82_4f85_be04_9120eb9107c1["preview-style"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> b81cb9e6_cf82_4f85_be04_9120eb9107c1 a1e21489_f424_d51e_ac28_81bfa7d904c0["random-button"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> a1e21489_f424_d51e_ac28_81bfa7d904c0 e6d4c76d_1a23_ab24_a326_a7e1433a75ee["api"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> e6d4c76d_1a23_ab24_a326_a7e1433a75ee 59c28bae_bf23_eaf9_96bc_8cab053c5c96["constants"] 3a58ab06_5d4b_5607_01b6_9b055f101a35 --> 59c28bae_bf23_eaf9_96bc_8cab053c5c96 style 3a58ab06_5d4b_5607_01b6_9b055f101a35 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as React from "react"
import { type Metadata } from "next"
import { notFound } from "next/navigation"
import { siteConfig } from "@/lib/config"
import { absoluteUrl } from "@/lib/utils"
import { DarkModeScript } from "@/components/mode-switcher"
import { TailwindIndicator } from "@/components/tailwind-indicator"
import { BASES, type Base } from "@/registry/config"
import { DesignSystemProvider } from "@/app/(create)/components/design-system-provider"
import { ItemPickerScript } from "@/app/(create)/components/item-picker"
import { PreviewStyle } from "@/app/(create)/components/preview-style"
import { RandomizeScript } from "@/app/(create)/components/random-button"
import { getBaseComponent, getBaseItem } from "@/app/(create)/lib/api"
import { ALLOWED_ITEM_TYPES } from "@/app/(create)/lib/constants"
export const revalidate = false
export const dynamic = "force-static"
export const dynamicParams = false
const getCacheRegistryItem = React.cache(
async (name: string, base: Base["name"]) => {
return await getBaseItem(name, base)
}
)
const getCachedRegistryComponent = React.cache(
async (name: string, base: Base["name"]) => {
return await getBaseComponent(name, base)
}
)
export async function generateMetadata({
params,
}: {
params: Promise<{
base: string
name: string
}>
}): Promise<Metadata> {
const paramBag = await params
const base = BASES.find((l) => l.name === paramBag.base)
if (!base) {
return {}
}
const item = await getBaseItem(paramBag.name, base.name)
if (!item) {
return {}
}
const title = item.name
const description = item.description
return {
title: item.name,
description,
openGraph: {
title,
// ... (84 more lines)
Domain
Subdomains
Functions
Dependencies
- api
- config
- config
- constants
- design-system-provider
- item-picker
- mode-switcher
- navigation
- next
- preview-style
- random-button
- react
- tailwind-indicator
- utils
Source
Frequently Asked Questions
What does page.tsx do?
page.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, SearchAPI subdomain.
What functions are defined in page.tsx?
page.tsx defines 5 function(s): BlockPage, generateMetadata, generateStaticParams, getCacheRegistryItem, getCachedRegistryComponent.
What does page.tsx depend on?
page.tsx imports 14 module(s): api, config, config, constants, design-system-provider, item-picker, mode-switcher, navigation, and 6 more.
Where is page.tsx in the architecture?
page.tsx is located at apps/v4/app/(create)/preview/[base]/[name]/page.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/app/(create)/preview/[base]/[name]).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free