How shadcnstudio/shadcn-studio works
shadcn/studio is a Next.js showcase and customization site for copy-and-paste UI components, blocks, templates, and themes. The main visitor journey is to browse component or block examples, inspect and copy implementation code, or open the theme generator to preview and adjust styles. The repository also contains dashboard and marketing block previews. The graph covers the documented product branches and source-indexed core modules; unsampled routes and dynamic wiring are represented only where the tree or README supports them.
Main entry points: settingsContext.tsx Theme settings · shadows.ts Shadow styles · ThemesProvider.tsx Theme application · theme-style-generator.ts Style generation
Components 32
Discovery and catalog
- Component catalog
src/app/(front)/components/page.tsx - Component registry
src/config/components.tsx - Blocks catalog
src/app/(front)/blocks/BlocksIndexContent.tsx - Blocks route
src/app/(front)/blocks/page.tsx - Block details
src/app/(front)/(blocks-inner-pages)/blocks/[category]/[section]/BlockPage.tsx - Component details
src/components/ComponentDetails.tsx - Code views
src/components/CodeBlockMultipleView.tsx - Source endpoint
src/app/api/get-file-content/route.ts
UI examples
- Component variants
src/components/shadcn-studio - Marketing blocks
src/components/shadcn-studio/blocks - Dashboard blocks
src/components/shadcn-studio/blocks - Dashboard preview
src/app/(blank)/preview/dashboard-and-application/dashboard-shell/dashboard-shell-01/page.tsx
Theme customization
- Theme generator
src/app/(front)/theme-generator/page.tsx - Theme controls
src/components/customizer/ThemeControlPanel.tsx - Theme settings
src/contexts/settingsContext.tsx - Theme persistence
src/hooks/useLocalStorage.ts - Theme presets
src/utils/theme-presets.ts - Theme application
src/providers/ThemesProvider.tsx - Style generation
src/utils/theme-style-generator.ts - Color conversion
src/utils/color-converter.ts - Shadow styles
src/utils/shadows.ts - Theme model
src/types/theme.ts - Default theme
src/config/theme.ts
Shared UI foundation
- Button primitive
src/components/ui/button.tsx - Card primitive
src/components/ui/card.tsx - Avatar primitive
src/components/ui/avatar.tsx - Breadcrumb primitive
src/components/ui/breadcrumb.tsx - Dropdown primitive
src/components/ui/dropdown-menu.tsx - Separator primitive
src/components/ui/separator.tsx - Sheet primitive
src/components/ui/sheet.tsx - Sidebar primitive
src/components/ui/sidebar.tsx
Other components
- Site visitor
Connections 30
- Site visitor → Component catalog: browses
README.md - Site visitor → Blocks route: browses
README.md - Blocks route → Blocks catalog: renders
src/app/(front)/blocks/page.tsx - Component catalog → Component registry: uses registry
src/app/(front)/components/page.tsx - Blocks catalog → Block details: opens examples
- Site visitor → Component details: inspects examples
README.md - Component details → Code views: shows code
- Code views → Source endpoint: loads source
- Site visitor → Component variants: copies variants
README.md - Site visitor → Dashboard preview: previews dashboard
README.md - Dashboard preview → Dashboard blocks: renders blocks
src/app/(blank)/preview/dashboard-and-application/dashboard-shell/dashboard-shell-01/page.tsx - Dashboard preview → Sidebar primitive: uses sidebar
src/app/(blank)/preview/dashboard-and-application/dashboard-shell/dashboard-shell-01/page.tsx - Site visitor → Theme generator: customizes theme
README.md - Theme generator → Theme controls: presents controls
- Theme controls → Theme settings: updates settings
src/components/customizer/ThemeControlPanel.tsx - Theme settings → Theme persistence: persists theme
src/contexts/settingsContext.tsx - Theme settings → Theme presets: applies preset
src/contexts/settingsContext.tsx - Theme application → Theme settings: reads settings
src/providers/ThemesProvider.tsx - Theme application → Color conversion: converts colors
src/providers/ThemesProvider.tsx - Theme application → Shadow styles: builds shadows
src/providers/ThemesProvider.tsx - Theme presets → Default theme: uses defaults
src/utils/theme-presets.ts - Theme presets → Theme model: returns theme data
src/utils/theme-presets.ts - Default theme → Theme model: defines theme
src/config/theme.ts - Style generation → Color conversion: converts colors
src/utils/theme-style-generator.ts - Style generation → Shadow styles: formats shadows
src/utils/theme-style-generator.ts - Style generation → Default theme: uses defaults
src/utils/theme-style-generator.ts - Shadow styles → Color conversion: converts colors
src/utils/shadows.ts - Shadow styles → Theme model: uses theme model
src/utils/shadows.ts - Sidebar primitive → Sheet primitive: uses sheet
src/components/ui/sidebar.tsx - Sidebar primitive → Separator primitive: uses separator
src/components/ui/sidebar.tsx