File and folder organization conventions for React + Vite + shadcn/ui projects. Use when creating new components, organizing files, deciding folder structure, naming files/folders, or reviewing project organization. Covers folder-per-component vs flat structure, naming conventions, barrel exports, internal elements, and form patterns.
This Claude skill provides a comprehensive set of file and folder organization conventions specifically tailored for React, Vite, and shadcn/ui projects. It streamlines the development workflow by establishing clear rules for naming conventions, folder hierarchies (folder-per-component vs. flat structure), barrel exports, and specialized patterns for forms and pages, ensuring a scalable and maintainable codebase.
Use Cases
Project Initialization: Setting up a new React + Vite project with a standardized directory structure to prevent technical debt from the start.
Codebase Refactoring: Reorganizing messy component folders into a logical hierarchy using the 'folder-per-component' or 'grouping folder' logic.
Team Onboarding: Providing a clear style guide for new developers to ensure consistent naming (PascalCase vs. lowercase) and export patterns across the team.
Component Architecture: Deciding when to extract internal elements into sub-folders or keep them flat based on complexity and reusability.
Form Pattern Implementation: Applying a structured 'Form Utilities' pattern to manage complex UI primitives like controllers, fields, and layout containers.
Important: Only create components/ or containers/ folders in pages when
helpers are shared by multiple sibling pages. For single-page helpers, keep
files flat in the page folder.