# ashutoshx7/vengenceui architecture

> Architecture diagram of the GitHub repository ashutoshx7/vengenceui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ashutoshx7/vengenceui
- Repository: https://github.com/ashutoshx7/vengenceui

## Overview

#### Purpose and Runtime
VengeanceUI is a Next.js/React TypeScript site and copy-paste component library for animated landing-page UI. Tailwind CSS provides styling; Framer Motion is the stated animation runtime. The deployable application is rooted at `src/app/layout.tsx` and `src/app/page.tsx`, with static public assets under `public/`.

#### Application Shell and Route Areas
The App Router divides the site into distinct presentation surfaces:
- Landing/home page: `src/app/page.tsx`, composed from `src/components/landing/`.
- Component catalog and per-component documentation: `src/app/components/page.tsx`, `src/app/components/[slug]/page.tsx`.
- Installation/CLI documentation: `src/app/docs/page.tsx`, `src/app/docs/cli/page.tsx`.
- Marketing/content pages are grouped under `src/app/(marketing)/layout.tsx` and routes such as `src/app/(marketing)/showcase/page.tsx`.
- Template browsing: `src/app/templates/page.tsx`.

#### Component Catalog and Documentation Pipeline
Component metadata is centralized in catalog/docs libraries, which drive catalog listing, slug resolution, preview, installation guidance, and prop displays. Core paths are `src/lib/components-catalog.ts`, `src/lib/component-docs.ts`, and `src/components/docs/component-docs-sections.tsx`. The dynamic route `src/app/components/[slug]/page.tsx` is the main boundary between URL-selected component identity and rendered documentation.

#### Reusable UI Implementation Layer
The library’s primary deliverable is the reusable component collection in `src/components/ui/`, including `src/components/ui/animated-button.tsx`, `src/components/ui/interactive-particles.tsx`, and `src/components/ui/reveal-loader.tsx`. Components are generally paired with documentation demos in `src/components/docs/`, such as `src/components/docs/generate-button-demo.tsx` and `src/components/docs/demo-renderer.tsx`; this separates reusable source from site-specific demonstrations.

#### Registry and Distribution Artifacts
Registry JSON under `public/r/` exposes installable component definitions and an index, with `public/r/registry.json`, `public/r/index.json`, and individual records such as `public/r/animated-button.json`. A separate local registry source exists in `src/registry/`, including `src/registry/my-animated-button.tsx`. Registry access/interpretation belongs in `src/lib/registry.ts`; this is the distribution boundary for consumers or CLI-oriented installation flows.

#### Layout, Theme, and Client Interaction
Shared navigation/sidebar/table-of-contents are handled by `src/components/layout/navbar.tsx`, `src/components/layout/sidebar.tsx`, and `src/components/layout/toc.tsx`. Theme state is encapsulated through `src/components/theme-provider.tsx` and `src/components/theme-toggle.tsx`. Browser-only behaviors—sound, clipboard, click-outside, and responsive detection—are isolated in `src/hooks/use-sound.ts`, `src/hooks/useClipboard.ts`, and `src/hooks/use-mobile.ts`.

#### External and Static Integrations
The sole explicit server endpoint is `src/app/api/github-stars/route.ts`, with GitHub-facing logic in `src/lib/github.ts`; the UI can obtain repository-star data without exposing the upstream request details to components. Static media, service-worker support, and web metadata are served from `public/`, `public/sw.js`, `src/app/manifest.ts`, `src/app/robots.ts`, and `src/app/sitemap.ts`. No database, authentication system, or other backend service is evidenced by this tree.

Main entry points: [`src/app/layout.tsx`](https://github.com/ashutoshx7/vengenceui/blob/main/src/app/layout.tsx) (App shell), [`src/app/components/[slug]/page.tsx`](https://github.com/ashutoshx7/vengenceui/blob/main/src/app/components/%5Bslug%5D/page.tsx) (Component docs route), [`src/components/docs/component-docs-sections.tsx`](https://github.com/ashutoshx7/vengenceui/blob/main/src/components/docs/component-docs-sections.tsx) (Docs sections), [`src/app/page.tsx`](https://github.com/ashutoshx7/vengenceui/blob/main/src/app/page.tsx) (Landing page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Next.js application"]
  node_shell["App shell<br/>Next.js root layout<br/>[layout.tsx]"]
  node_home["Landing page<br/>route<br/>[page.tsx]"]
  node_landing["Landing sections<br/>presentation components<br/>[hero.tsx]"]
  node_catalog_route["Component catalog<br/>route<br/>[page.tsx]"]
  node_component_route["Component docs route<br/>dynamic route<br/>[page.tsx]"]
  node_docs_routes["Installation and CLI docs<br/>routes<br/>[page.tsx]"]
  node_marketing["Marketing routes<br/>route group<br/>[layout.tsx]"]
  node_templates["Template browser<br/>route<br/>[page.tsx]"]
  node_github_api{{"GitHub stars API<br/>route handler<br/>[route.ts]"}}
  node_github["GitHub client<br/>server library<br/>[github.ts]"]
  node_public_assets["Public assets and metadata<br/>static delivery<br/>[sw.js]"]
end

subgraph group_catalog["Catalog and docs"]
  node_catalog_data["Component catalog<br/>metadata library"]
  node_component_docs["Component docs metadata<br/>documentation library<br/>[component-docs.ts]"]
  node_docs_sections["Docs sections<br/>documentation renderer"]
end

subgraph group_library["Reusable UI library"]
  node_ui_components["Animated UI components<br/>copy-paste component library"]
  node_demos["Documentation demos<br/>demo components<br/>[demo-renderer.tsx]"]
end

subgraph group_distribution["Registry distribution"]
  node_registry_source["Local registry source<br/>component source"]
  node_registry_lib["Registry access<br/>registry library<br/>[registry.ts]"]
  node_registry_assets["Published registry<br/>static JSON artifacts<br/>[registry.json]"]
end

subgraph group_client["Shared client UI"]
  node_layout_ui["Navigation and docs chrome<br/>shared layout components<br/>[navbar.tsx]"]
  node_theme["Theme controls<br/>client state UI<br/>[theme-provider.tsx]"]
  node_browser_hooks["Browser interaction hooks<br/>client hooks<br/>[use-sound.ts]"]
end

node_shell --> node_home
node_shell --> node_catalog_route
node_shell --> node_component_route
node_shell --> node_docs_routes
node_shell --> node_marketing
node_shell --> node_templates
node_shell -->|"shared chrome"| node_layout_ui
node_shell -->|"theme state"| node_theme
node_home -->|"composes"| node_landing
node_catalog_route -->|"lists"| node_catalog_data
node_component_route -->|"resolves slug"| node_catalog_data
node_component_route -->|"loads docs"| node_component_docs
node_component_route -->|"renders"| node_docs_sections
node_docs_sections -->|"previews"| node_demos
node_demos -->|"demonstrates"| node_ui_components
node_docs_sections -->|"installation guidance"| node_registry_lib
node_registry_lib -->|"reads published records"| node_registry_assets
node_registry_source -.->|"published as"| node_registry_assets
node_github_api -->|"delegates upstream request"| node_github
node_shell -->|"star data"| node_github_api
node_ui_components -->|"client interactions"| node_browser_hooks
node_shell -->|"serves"| node_public_assets

click node_shell "https://github.com/ashutoshx7/vengenceui/blob/main/src/app/layout.tsx"
click node_home "https://github.com/ashutoshx7/vengenceui/blob/main/src/app/page.tsx"
click node_landing "https://github.com/ashutoshx7/vengenceui/blob/main/src/components/landing/hero.tsx"
click node_catalog_route "https://github.com/ashutoshx7/vengenceui/blob/main/src/app/components/page.tsx"
click node_component_route "https://github.com/ashutoshx7/vengenceui/blob/main/src/app/components/%5Bslug%5D/page.tsx"
click node_docs_routes "https://github.com/ashutoshx7/vengenceui/blob/main/src/app/docs/page.tsx"
click node_marketing "https://github.com/ashutoshx7/vengenceui/blob/main/src/app/(marketing)/layout.tsx"
click node_templates "https://github.com/ashutoshx7/vengenceui/blob/main/src/app/templates/page.tsx"
click node_github_api "https://github.com/ashutoshx7/vengenceui/blob/main/src/app/api/github-stars/route.ts"
click node_github "https://github.com/ashutoshx7/vengenceui/blob/main/src/lib/github.ts"
click node_catalog_data "https://github.com/ashutoshx7/vengenceui/blob/main/src/lib/components-catalog.ts"
click node_component_docs "https://github.com/ashutoshx7/vengenceui/blob/main/src/lib/component-docs.ts"
click node_docs_sections "https://github.com/ashutoshx7/vengenceui/blob/main/src/components/docs/component-docs-sections.tsx"
click node_ui_components "https://github.com/ashutoshx7/vengenceui/blob/main/src/components/ui/animated-button.tsx"
click node_demos "https://github.com/ashutoshx7/vengenceui/blob/main/src/components/docs/demo-renderer.tsx"
click node_registry_source "https://github.com/ashutoshx7/vengenceui/blob/main/src/registry/my-animated-button.tsx"
click node_registry_lib "https://github.com/ashutoshx7/vengenceui/blob/main/src/lib/registry.ts"
click node_registry_assets "https://github.com/ashutoshx7/vengenceui/blob/main/public/r/registry.json"
click node_layout_ui "https://github.com/ashutoshx7/vengenceui/blob/main/src/components/layout/navbar.tsx"
click node_theme "https://github.com/ashutoshx7/vengenceui/blob/main/src/components/theme-provider.tsx"
click node_browser_hooks "https://github.com/ashutoshx7/vengenceui/blob/main/src/hooks/use-sound.ts"
click node_public_assets "https://github.com/ashutoshx7/vengenceui/blob/main/public/sw.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_shell,node_home,node_landing,node_catalog_route,node_component_route,node_docs_routes,node_marketing,node_templates,node_github_api,node_github,node_public_assets toneBlue
class node_catalog_data,node_component_docs,node_docs_sections toneAmber
class node_ui_components,node_demos toneMint
class node_registry_source,node_registry_lib,node_registry_assets toneRose
class node_layout_ui,node_theme,node_browser_hooks toneIndigo
```

## Components

### Next.js application

- [App shell](https://github.com/ashutoshx7/vengenceui/blob/main/src/app/layout.tsx): Next.js root layout · Application entry and shared document shell. · `src/app/layout.tsx`
- [Landing page](https://github.com/ashutoshx7/vengenceui/blob/main/src/app/page.tsx): route · `src/app/page.tsx`
- [Landing sections](https://github.com/ashutoshx7/vengenceui/blob/main/src/components/landing/hero.tsx): presentation components · `src/components/landing/hero.tsx`
- [Component catalog](https://github.com/ashutoshx7/vengenceui/blob/main/src/app/components/page.tsx): route · `src/app/components/page.tsx`
- [Component docs route](https://github.com/ashutoshx7/vengenceui/blob/main/src/app/components/%5Bslug%5D/page.tsx): dynamic route · Resolves a URL slug into rendered component documentation. · `src/app/components/[slug]/page.tsx`
- [Installation and CLI docs](https://github.com/ashutoshx7/vengenceui/blob/main/src/app/docs/page.tsx): routes · `src/app/docs/page.tsx`
- [Marketing routes](https://github.com/ashutoshx7/vengenceui/blob/main/src/app/(marketing)/layout.tsx): route group · `src/app/(marketing)/layout.tsx`
- [Template browser](https://github.com/ashutoshx7/vengenceui/blob/main/src/app/templates/page.tsx): route · `src/app/templates/page.tsx`
- [GitHub stars API](https://github.com/ashutoshx7/vengenceui/blob/main/src/app/api/github-stars/route.ts): route handler · Server boundary for upstream GitHub star requests. · `src/app/api/github-stars/route.ts`
- [GitHub client](https://github.com/ashutoshx7/vengenceui/blob/main/src/lib/github.ts): server library · `src/lib/github.ts`
- [Public assets and metadata](https://github.com/ashutoshx7/vengenceui/blob/main/public/sw.js): static delivery · Media, service worker, manifest, robots, and sitemap output. · `public/sw.js`

### Catalog and docs

- [Component catalog](https://github.com/ashutoshx7/vengenceui/blob/main/src/lib/components-catalog.ts): metadata library · Central component metadata and listing definitions. · `src/lib/components-catalog.ts`
- [Component docs metadata](https://github.com/ashutoshx7/vengenceui/blob/main/src/lib/component-docs.ts): documentation library · `src/lib/component-docs.ts`
- [Docs sections](https://github.com/ashutoshx7/vengenceui/blob/main/src/components/docs/component-docs-sections.tsx): documentation renderer · Builds previews, install guidance, and prop displays. · `src/components/docs/component-docs-sections.tsx`

### Reusable UI library

- [Animated UI components](https://github.com/ashutoshx7/vengenceui/blob/main/src/components/ui/animated-button.tsx): copy-paste component library · Reusable Tailwind and Framer Motion component source. · `src/components/ui/animated-button.tsx`
- [Documentation demos](https://github.com/ashutoshx7/vengenceui/blob/main/src/components/docs/demo-renderer.tsx): demo components · Site-specific demonstrations of reusable components. · `src/components/docs/demo-renderer.tsx`

### Registry distribution

- [Local registry source](https://github.com/ashutoshx7/vengenceui/blob/main/src/registry/my-animated-button.tsx): component source · `src/registry/my-animated-button.tsx`
- [Registry access](https://github.com/ashutoshx7/vengenceui/blob/main/src/lib/registry.ts): registry library · Interprets registry data for installation flows. · `src/lib/registry.ts`
- [Published registry](https://github.com/ashutoshx7/vengenceui/blob/main/public/r/registry.json): static JSON artifacts · Installable records and registry indexes served publicly. · `public/r/registry.json`

### Shared client UI

- [Navigation and docs chrome](https://github.com/ashutoshx7/vengenceui/blob/main/src/components/layout/navbar.tsx): shared layout components · `src/components/layout/navbar.tsx`
- [Theme controls](https://github.com/ashutoshx7/vengenceui/blob/main/src/components/theme-provider.tsx): client state UI · `src/components/theme-provider.tsx`
- [Browser interaction hooks](https://github.com/ashutoshx7/vengenceui/blob/main/src/hooks/use-sound.ts): client hooks · Sound, clipboard, click-outside, and responsive behavior. · `src/hooks/use-sound.ts`

## Connections

- App shell → Landing page
- App shell → Component catalog
- App shell → Component docs route
- App shell → Installation and CLI docs
- App shell → Marketing routes
- App shell → Template browser
- App shell → Navigation and docs chrome: shared chrome
- App shell → Theme controls: theme state
- Landing page → Landing sections: composes
- Component catalog → Component catalog: lists
- Component docs route → Component catalog: resolves slug
- Component docs route → Component docs metadata: loads docs
- Component docs route → Docs sections: renders
- Docs sections → Documentation demos: previews
- Documentation demos → Animated UI components: demonstrates
- Docs sections → Registry access: installation guidance
- Registry access → Published registry: reads published records
- Local registry source → Published registry: published as
- GitHub stars API → GitHub client: delegates upstream request
- App shell → GitHub stars API: star data
- Animated UI components → Browser interaction hooks: client interactions
- App shell → Public assets and metadata: serves
