How ashutoshx7/vengenceui works
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: layout.tsx App shell · [slug]/page.tsx Component docs route · component-docs-sections.tsx Docs sections · app/page.tsx Landing page
Components 22
Next.js application
- App shell · Application entry and shared document shell.
src/app/layout.tsx - Landing page
src/app/page.tsx - Landing sections
src/components/landing/hero.tsx - Component catalog
src/app/components/page.tsx - Component docs route · Resolves a URL slug into rendered component documentation.
src/app/components/[slug]/page.tsx - Installation and CLI docs
src/app/docs/page.tsx - Marketing routes
src/app/(marketing)/layout.tsx - Template browser
src/app/templates/page.tsx - GitHub stars API · Server boundary for upstream GitHub star requests.
src/app/api/github-stars/route.ts - GitHub client
src/lib/github.ts - Public assets and metadata · Media, service worker, manifest, robots, and sitemap output.
public/sw.js
Catalog and docs
- Component catalog · Central component metadata and listing definitions.
src/lib/components-catalog.ts - Component docs metadata
src/lib/component-docs.ts - Docs sections · Builds previews, install guidance, and prop displays.
src/components/docs/component-docs-sections.tsx
Reusable UI library
- Animated UI components · Reusable Tailwind and Framer Motion component source.
src/components/ui/animated-button.tsx - Documentation demos · Site-specific demonstrations of reusable components.
src/components/docs/demo-renderer.tsx
Registry distribution
- Local registry source
src/registry/my-animated-button.tsx - Registry access · Interprets registry data for installation flows.
src/lib/registry.ts - Published registry · Installable records and registry indexes served publicly.
public/r/registry.json
Shared client UI
- Navigation and docs chrome
src/components/layout/navbar.tsx - Theme controls
src/components/theme-provider.tsx - Browser interaction hooks · Sound, clipboard, click-outside, and responsive behavior.
src/hooks/use-sound.ts
Connections 22
- 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