# luv-jeri/cojeev-ui architecture

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

- Interactive diagram: https://gitdiagram.com/luv-jeri/cojeev-ui
- Repository: https://github.com/luv-jeri/cojeev-ui

## Overview

000h is a shadcn-compatible library of installable React components, presented through a public documentation and marketing site. The main user journey is to browse the catalog, inspect a live example and its source, then install a component into their own project. The repository also includes analytics and a reporting service for feedback. The README documents registry-based installation; registry-host internals and several documentation routes were not sampled, so their implementation links are omitted or marked unverified.

Main entry points: [`app/page.tsx`](https://github.com/luv-jeri/cojeev-ui/blob/main/app/page.tsx) (Landing page), [`registry/cojeev/ui/button.tsx`](https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/button.tsx) (Installable components), [`registry/cojeev/ui/preview.tsx`](https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/preview.tsx) (Preview interface), [`lib/site-config.ts`](https://github.com/luv-jeri/cojeev-ui/blob/main/lib/site-config.ts) (Site configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site and discovery"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_catalog["Component catalog<br/>[catalog.ts]"]
  node_docs["Documentation search<br/>[docs-search.tsx]"]
  node_preview["Live previews"]
  node_installguide["Install guide<br/>[page.tsx]"]
  node_siteconfig["Site configuration<br/>[site-config.ts]"]
  node_structureddata["Structured data<br/>[structured-data.ts]"]
end

subgraph group_library["Component library"]
  node_components["Installable components<br/>[button.tsx]"]
  node_motion["Motion system<br/>[choreography.ts]"]
  node_icon["Icon components<br/>[animated-icon.tsx]"]
  node_controlappearance["Control appearance"]
  node_dialog["Dialog primitives<br/>[dialog.tsx]"]
  node_scroll["Scroll areas<br/>[scroll-area.tsx]"]
  node_codeblock["Code display<br/>[code-block.tsx]"]
  node_previewui["Preview interface<br/>[preview.tsx]"]
end

subgraph group_distribution["Registry distribution"]
  node_registryservice["Registry host<br/>[index.mjs]"]
end

subgraph group_operations["Feedback and analytics"]
  node_reportwidget["Feedback reporting"]
  node_reportclient["Reporting client<br/>[client.ts]"]
  node_reportworker["Report service<br/>[index.ts]"]
  node_analytics["Analytics client<br/>[client.ts]"]
  node_analyticsprovider["Analytics provider"]
end

node_visitor(("Site visitor"))
node_developer(("Installing developer"))

node_visitor -->|"visits"| node_landing
node_landing -->|"counts entries"| node_catalog
node_landing -->|"creates metadata"| node_structureddata
node_landing -->|"reads settings"| node_siteconfig
node_visitor -->|"searches"| node_docs
node_docs -->|"searches entries"| node_catalog
node_visitor -->|"explores examples"| node_preview
node_preview -->|"renders"| node_previewui
node_previewui -->|"shows source"| node_codeblock
node_previewui -.->|"hosts examples"| node_components
node_visitor -->|"follows install guide"| node_installguide
node_installguide -->|"builds install command"| node_siteconfig
node_developer -.->|"requests component"| node_registryservice
node_registryservice -.->|"serves source"| node_components
node_components -->|"uses motion"| node_motion
node_components -->|"applies styling"| node_controlappearance
node_dialog -->|"uses motion hooks"| node_motion
node_scroll -->|"uses choreography"| node_motion
node_visitor -->|"submits feedback"| node_reportwidget
node_reportwidget -->|"sends report"| node_reportclient
node_reportclient -.->|"calls API"| node_reportworker
node_analyticsprovider -.->|"tracks consented activity"| node_analytics
node_analytics -->|"reads deployment flags"| node_siteconfig

click node_landing "https://github.com/luv-jeri/cojeev-ui/blob/main/app/page.tsx"
click node_catalog "https://github.com/luv-jeri/cojeev-ui/blob/main/lib/catalog.ts"
click node_docs "https://github.com/luv-jeri/cojeev-ui/blob/main/components/docs-search.tsx"
click node_preview "https://github.com/luv-jeri/cojeev-ui/blob/main/components/component-preview.tsx"
click node_installguide "https://github.com/luv-jeri/cojeev-ui/blob/main/app/getting-started/page.tsx"
click node_siteconfig "https://github.com/luv-jeri/cojeev-ui/blob/main/lib/site-config.ts"
click node_structureddata "https://github.com/luv-jeri/cojeev-ui/blob/main/lib/seo/structured-data.ts"
click node_components "https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/button.tsx"
click node_motion "https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/motion/choreography.ts"
click node_icon "https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/animated-icon.tsx"
click node_controlappearance "https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/lib/control-appearance.ts"
click node_dialog "https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/dialog.tsx"
click node_scroll "https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/scroll-area.tsx"
click node_codeblock "https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/code-block.tsx"
click node_previewui "https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/preview.tsx"
click node_registryservice "https://github.com/luv-jeri/cojeev-ui/blob/main/workers/registry-host/src/index.mjs"
click node_reportwidget "https://github.com/luv-jeri/cojeev-ui/blob/main/components/reporting/reporting-widget.tsx"
click node_reportclient "https://github.com/luv-jeri/cojeev-ui/blob/main/lib/reporting/client.ts"
click node_reportworker "https://github.com/luv-jeri/cojeev-ui/blob/main/workers/reporting/src/index.ts"
click node_analytics "https://github.com/luv-jeri/cojeev-ui/blob/main/lib/analytics/client.ts"
click node_analyticsprovider "https://github.com/luv-jeri/cojeev-ui/blob/main/components/analytics/analytics-provider.tsx"

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,node_catalog,node_docs,node_preview,node_installguide,node_siteconfig,node_structureddata toneBlue
class node_components,node_motion,node_icon,node_controlappearance,node_dialog,node_scroll,node_codeblock,node_previewui toneAmber
class node_registryservice toneMint
class node_reportwidget,node_reportclient,node_reportworker,node_analytics,node_analyticsprovider toneRose
class node_visitor,node_developer toneIndigo
```

## Components

### Site and discovery

- [Landing page](https://github.com/luv-jeri/cojeev-ui/blob/main/app/page.tsx): `app/page.tsx`
- [Component catalog](https://github.com/luv-jeri/cojeev-ui/blob/main/lib/catalog.ts): `lib/catalog.ts`
- [Documentation search](https://github.com/luv-jeri/cojeev-ui/blob/main/components/docs-search.tsx): `components/docs-search.tsx`
- [Live previews](https://github.com/luv-jeri/cojeev-ui/blob/main/components/component-preview.tsx): `components/component-preview.tsx`
- [Install guide](https://github.com/luv-jeri/cojeev-ui/blob/main/app/getting-started/page.tsx): `app/getting-started/page.tsx`
- [Site configuration](https://github.com/luv-jeri/cojeev-ui/blob/main/lib/site-config.ts): `lib/site-config.ts`
- [Structured data](https://github.com/luv-jeri/cojeev-ui/blob/main/lib/seo/structured-data.ts): `lib/seo/structured-data.ts`

### Component library

- [Installable components](https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/button.tsx): `registry/cojeev/ui/button.tsx`
- [Motion system](https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/motion/choreography.ts): `registry/cojeev/motion/choreography.ts`
- [Icon components](https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/animated-icon.tsx): `registry/cojeev/ui/animated-icon.tsx`
- [Control appearance](https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/lib/control-appearance.ts): `registry/cojeev/lib/control-appearance.ts`
- [Dialog primitives](https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/dialog.tsx): `registry/cojeev/ui/dialog.tsx`
- [Scroll areas](https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/scroll-area.tsx): `registry/cojeev/ui/scroll-area.tsx`
- [Code display](https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/code-block.tsx): `registry/cojeev/ui/code-block.tsx`
- [Preview interface](https://github.com/luv-jeri/cojeev-ui/blob/main/registry/cojeev/ui/preview.tsx): `registry/cojeev/ui/preview.tsx`

### Registry distribution

- [Registry host](https://github.com/luv-jeri/cojeev-ui/blob/main/workers/registry-host/src/index.mjs): `workers/registry-host/src/index.mjs`

### Feedback and analytics

- [Feedback reporting](https://github.com/luv-jeri/cojeev-ui/blob/main/components/reporting/reporting-widget.tsx): `components/reporting/reporting-widget.tsx`
- [Reporting client](https://github.com/luv-jeri/cojeev-ui/blob/main/lib/reporting/client.ts): `lib/reporting/client.ts`
- [Report service](https://github.com/luv-jeri/cojeev-ui/blob/main/workers/reporting/src/index.ts): `workers/reporting/src/index.ts`
- [Analytics client](https://github.com/luv-jeri/cojeev-ui/blob/main/lib/analytics/client.ts): `lib/analytics/client.ts`
- [Analytics provider](https://github.com/luv-jeri/cojeev-ui/blob/main/components/analytics/analytics-provider.tsx): `components/analytics/analytics-provider.tsx`

### Other components

- **Site visitor**
- **Installing developer**

## Connections

- Site visitor → Landing page: visits (evidence: `app/page.tsx`)
- Landing page → Component catalog: counts entries (evidence: `app/page.tsx`)
- Landing page → Structured data: creates metadata (evidence: `app/page.tsx`)
- Landing page → Site configuration: reads settings (evidence: `app/page.tsx`)
- Site visitor → Documentation search: searches (evidence: `components/docs-search.tsx`)
- Documentation search → Component catalog: searches entries
- Site visitor → Live previews: explores examples (evidence: `components/component-preview.tsx`)
- Live previews → Preview interface: renders (evidence: `components/component-preview.tsx`)
- Preview interface → Code display: shows source (evidence: `registry/cojeev/ui/preview.tsx`)
- Preview interface → Installable components: hosts examples
- Site visitor → Install guide: follows install guide (evidence: `app/getting-started/page.tsx`)
- Install guide → Site configuration: builds install command (evidence: `app/getting-started/page.tsx`)
- Installing developer → Registry host: requests component (evidence: `README.md`)
- Registry host → Installable components: serves source (evidence: `README.md`)
- Installable components → Motion system: uses motion
- Installable components → Control appearance: applies styling (evidence: `registry/cojeev/ui/button.tsx`)
- Dialog primitives → Motion system: uses motion hooks (evidence: `registry/cojeev/ui/dialog.tsx`)
- Scroll areas → Motion system: uses choreography (evidence: `registry/cojeev/ui/scroll-area.tsx`)
- Site visitor → Feedback reporting: submits feedback
- Feedback reporting → Reporting client: sends report (evidence: `components/reporting/reporting-widget.tsx`)
- Reporting client → Report service: calls API
- Analytics provider → Analytics client: tracks consented activity
- Analytics client → Site configuration: reads deployment flags (evidence: `lib/analytics/client.ts`)
