HOW SHADCN/UI
ACTUALLY WORKS
Beautifully designed components built with Radix UI and Tailwind CSS. Conventions, patterns, and architecture extracted from the shadcn-ui/ui repository by sourcebook.
WHAT_MATTERS
-
→
This is a monorepo — check workspace dependencies before modifying shared code
-
→
Generated files detected — editing them directly will break builds
-
→
packages/shadcn/src/templates/create-template.ts is a hub file (imported by 9 files) — changes here ripple everywhere
-
→
Circular import chains detected — avoid adding to these cycles
KEY_FINDINGS
This is a monorepo. Changes may affect multiple packages. Check workspace dependencies before modifying shared code.
HIGHTests are co-located with source files (*.test.ts next to *.ts). Keep this pattern -- don't create a separate test/ directory.
HIGHTests use Vitest. Test utilities in: packages/tests/src/utils/helpers.ts.
HIGH12 test files
Styling uses Tailwind CSS utility classes. Custom design tokens defined in packages/shadcn/test/fixtures/next-src/tailwind.config.js — use these instead of arbitrary values.
HIGH39 files
Generated files detected (packages/tests/fixtures/next-app-init/app/layout.tsx, packages/tests/fixtures/next-app/app/layout.tsx, packages/shadcn/test/fixtures/next-app-js/app/layout.js, packages/shadcn/test/fixtures/frameworks/t3-pages/src/pages/index.tsx, templates/start-monorepo/apps/web/src/routeTree.gen.ts, ...). Do NOT edit these directly — modify the source/schema they are generated from.
HIGH6 generated files
Hub files (most depended on): packages/shadcn/src/templates/create-template.ts (imported by 9 files); apps/v4/registry/icons/create-icon-loader.tsx (imported by 5 files). Changes here have the widest blast radius.
HIGHCircular import chains detected: routeTree.gen.ts → router.tsx; routeTree.gen.ts → router.tsx. Avoid adding to these cycles.
HIGH+ 2 MORE FINDINGS (MEDIUM CONFIDENCE)
Project prefers default exports. Use `export default` for main module exports.
MED58 default vs 5 named exports in sampled files
UI components live in: templates/vite-monorepo/apps/web/src/components, templates/vite-app/src/components, templates/next-monorepo/apps/web/components. Add new components here.
MED3 component directories