# pageai-pro/page-ui architecture

> Architecture diagram of the GitHub repository pageai-pro/page-ui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pageai-pro/page-ui
- Repository: https://github.com/pageai-pro/page-ui

## Overview

Page UI is a React/Next.js landing-page kit: users browse examples or templates, then copy components into their app, optionally bootstrapping files with the CLI. Its repository also contains the showcase website and a brick-based code/theme customization surface. The README documents the copy-and-paste workflow; sampled source confirms the CLI’s file-copy behavior and selected website/component relationships. Other connections involving unsampled modules are omitted or marked unverified.

Main entry points: [`website/app/page.tsx`](https://github.com/pageai-pro/page-ui/blob/main/website/app/page.tsx) (Showcase home), [`components/MDXComponents.tsx`](https://github.com/pageai-pro/page-ui/blob/main/components/MDXComponents.tsx) (MDX components), [`packages/cli/index.mjs`](https://github.com/pageai-pro/page-ui/blob/main/packages/cli/index.mjs) (Setup CLI), [`components/landing`](https://github.com/pageai-pro/page-ui/tree/main/components/landing) (Landing components)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_kit["Landing-page kit"]
  node_landing_components["Landing components"]
  node_templates["Page templates"]
  node_ui_primitives["UI primitives"]
end

subgraph group_customize["Customization tools"]
  node_brick_editor["Brick editor"]
  node_brick_controls["Brick controls<br/>[brick-controls.tsx]"]
  node_brick_state["Brick state<br/>[brick-state.tsx]"]
  node_theme_tools["Theme tools<br/>[color-themes.tsx]"]
  node_code_generators["Theme code output"]
end

subgraph group_showcase["Showcase website"]
  node_component_demos["Component demos<br/>[CodePreview.tsx]"]
  node_mdx_registry["MDX components<br/>[MDXComponents.tsx]"]
  node_showcase_home["Showcase home<br/>[page.tsx]"]
  node_template_catalog["Template catalog<br/>[page.tsx]"]
  node_content_routes["Content routes<br/>[page.tsx]"]
  node_blog_content["Blog components"]
  node_site_navigation["Site navigation<br/>[Header.tsx]"]
  node_search["Site search<br/>[SearchButton.tsx]"]
end

subgraph group_bootstrap["Project bootstrap"]
  node_cli["Setup CLI<br/>[index.mjs]"]
  node_file_selection["File selection<br/>[getFiles.js]"]
end

node_visitor(("Developer"))
node_target_app["Developer app"]

node_visitor -.->|"browses showcase"| node_showcase_home
node_showcase_home -->|"presents examples"| node_landing_components
node_showcase_home -->|"renders header"| node_site_navigation
node_showcase_home -->|"links templates"| node_template_catalog
node_visitor -.->|"browses templates"| node_template_catalog
node_template_catalog -.->|"lists templates"| node_templates
node_content_routes -->|"renders MDX"| node_mdx_registry
node_mdx_registry -->|"wraps components"| node_landing_components
node_mdx_registry -->|"registers components"| node_blog_content
node_component_demos -->|"uses tabs and cards"| node_ui_primitives
node_site_navigation -->|"renders search"| node_search
node_landing_components -.->|"uses shared UI"| node_ui_primitives
node_visitor -->|"runs setup"| node_cli
node_cli -->|"selects files"| node_file_selection
node_cli -->|"copies setup files"| node_target_app
node_visitor -.->|"customizes bricks"| node_brick_editor
node_brick_editor -.->|"uses editor state"| node_brick_state
node_brick_controls -.->|"updates controls state"| node_brick_state
node_theme_tools -.->|"generates theme code"| node_code_generators

click node_landing_components "https://github.com/pageai-pro/page-ui/tree/main/components/landing"
click node_templates "https://github.com/pageai-pro/page-ui/tree/main/templates/landing-page-templates/template"
click node_ui_primitives "https://github.com/pageai-pro/page-ui/tree/main/components/shared/ui"
click node_component_demos "https://github.com/pageai-pro/page-ui/blob/main/components/blog/CodePreview.tsx"
click node_mdx_registry "https://github.com/pageai-pro/page-ui/blob/main/components/MDXComponents.tsx"
click node_showcase_home "https://github.com/pageai-pro/page-ui/blob/main/website/app/page.tsx"
click node_template_catalog "https://github.com/pageai-pro/page-ui/blob/main/templates/landing-page-templates/page.tsx"
click node_content_routes "https://github.com/pageai-pro/page-ui/blob/main/website/app/%5B...slug%5D/page.tsx"
click node_blog_content "https://github.com/pageai-pro/page-ui/tree/main/components/blog"
click node_site_navigation "https://github.com/pageai-pro/page-ui/blob/main/components/shared/Header.tsx"
click node_search "https://github.com/pageai-pro/page-ui/blob/main/components/search/SearchButton.tsx"
click node_brick_editor "https://github.com/pageai-pro/page-ui/blob/main/components/bricks/brick-code-editor.tsx"
click node_brick_controls "https://github.com/pageai-pro/page-ui/blob/main/components/bricks/brick-controls.tsx"
click node_brick_state "https://github.com/pageai-pro/page-ui/blob/main/components/bricks/state/brick-state.tsx"
click node_theme_tools "https://github.com/pageai-pro/page-ui/blob/main/components/bricks/theme/color-themes.tsx"
click node_code_generators "https://github.com/pageai-pro/page-ui/tree/main/components/bricks/theme/code-stringifiers"
click node_cli "https://github.com/pageai-pro/page-ui/blob/main/packages/cli/index.mjs"
click node_file_selection "https://github.com/pageai-pro/page-ui/blob/main/packages/cli/files/getFiles.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_landing_components,node_templates,node_ui_primitives toneBlue
class node_brick_editor,node_brick_controls,node_brick_state,node_theme_tools,node_code_generators toneAmber
class node_component_demos,node_mdx_registry,node_showcase_home,node_template_catalog,node_content_routes,node_blog_content,node_site_navigation,node_search toneMint
class node_cli,node_file_selection toneRose
class node_visitor,node_target_app toneIndigo
```

## Components

### Landing-page kit

- [Landing components](https://github.com/pageai-pro/page-ui/tree/main/components/landing): `components/landing`
- [Page templates](https://github.com/pageai-pro/page-ui/tree/main/templates/landing-page-templates/template): `templates/landing-page-templates/template`
- [UI primitives](https://github.com/pageai-pro/page-ui/tree/main/components/shared/ui): `components/shared/ui`

### Customization tools

- [Brick editor](https://github.com/pageai-pro/page-ui/blob/main/components/bricks/brick-code-editor.tsx): `components/bricks/brick-code-editor.tsx`
- [Brick controls](https://github.com/pageai-pro/page-ui/blob/main/components/bricks/brick-controls.tsx): `components/bricks/brick-controls.tsx`
- [Brick state](https://github.com/pageai-pro/page-ui/blob/main/components/bricks/state/brick-state.tsx): `components/bricks/state/brick-state.tsx`
- [Theme tools](https://github.com/pageai-pro/page-ui/blob/main/components/bricks/theme/color-themes.tsx): `components/bricks/theme/color-themes.tsx`
- [Theme code output](https://github.com/pageai-pro/page-ui/tree/main/components/bricks/theme/code-stringifiers): `components/bricks/theme/code-stringifiers`

### Showcase website

- [Component demos](https://github.com/pageai-pro/page-ui/blob/main/components/blog/CodePreview.tsx): `components/blog/CodePreview.tsx`
- [MDX components](https://github.com/pageai-pro/page-ui/blob/main/components/MDXComponents.tsx): `components/MDXComponents.tsx`
- [Showcase home](https://github.com/pageai-pro/page-ui/blob/main/website/app/page.tsx): `website/app/page.tsx`
- [Template catalog](https://github.com/pageai-pro/page-ui/blob/main/templates/landing-page-templates/page.tsx): `templates/landing-page-templates/page.tsx`
- [Content routes](https://github.com/pageai-pro/page-ui/blob/main/website/app/%5B...slug%5D/page.tsx): `website/app/[...slug]/page.tsx`
- [Blog components](https://github.com/pageai-pro/page-ui/tree/main/components/blog): `components/blog`
- [Site navigation](https://github.com/pageai-pro/page-ui/blob/main/components/shared/Header.tsx): `components/shared/Header.tsx`
- [Site search](https://github.com/pageai-pro/page-ui/blob/main/components/search/SearchButton.tsx): `components/search/SearchButton.tsx`

### Project bootstrap

- [Setup CLI](https://github.com/pageai-pro/page-ui/blob/main/packages/cli/index.mjs): `packages/cli/index.mjs`
- [File selection](https://github.com/pageai-pro/page-ui/blob/main/packages/cli/files/getFiles.js): `packages/cli/files/getFiles.js`

### Other components

- **Developer**
- **Developer app**

## Connections

- Developer → Showcase home: browses showcase
- Showcase home → Landing components: presents examples (evidence: `website/app/page.tsx`)
- Showcase home → Site navigation: renders header (evidence: `website/app/page.tsx`)
- Showcase home → Template catalog: links templates (evidence: `website/app/page.tsx`)
- Developer → Template catalog: browses templates
- Template catalog → Page templates: lists templates
- Content routes → MDX components: renders MDX (evidence: `website/app/[...slug]/page.tsx`)
- MDX components → Landing components: wraps components (evidence: `components/MDXComponents.tsx`)
- MDX components → Blog components: registers components (evidence: `components/MDXComponents.tsx`)
- Component demos → UI primitives: uses tabs and cards (evidence: `components/blog/CodePreview.tsx`)
- Site navigation → Site search: renders search (evidence: `components/shared/Header.tsx`)
- Landing components → UI primitives: uses shared UI (evidence: `components/landing/cta/LandingPrimaryCta.tsx`)
- Developer → Setup CLI: runs setup
- Setup CLI → File selection: selects files (evidence: `packages/cli/index.mjs`)
- Setup CLI → Developer app: copies setup files (evidence: `packages/cli/index.mjs`)
- Developer → Brick editor: customizes bricks
- Brick editor → Brick state: uses editor state
- Brick controls → Brick state: updates controls state
- Theme tools → Theme code output: generates theme code
