Quick reference for Claude Code when working with this repository.
Modern React TypeScript template with automated quality checks and AI-ready development tools.
Stack: React 19, TypeScript, Vite, Biome, Vitest, Storybook
npm start # Start dev server
npm run build # Production build
npm run lint # Check code issues
npm run format # Auto-format code
npm test # Run tests
npm run storybook:text # Component testssrc/
├── features/ # Feature modules (self-contained)
├── shared/ # Reusable code
│ ├── components/
│ ├── hooks/
│ ├── services/
│ ├── stores/
│ ├── types/
│ └── utils/
├── app.tsx
└── main.tsx
Key: Always check project-structure.md for current file layout before creating new files.
- ✅ Use TypeScript with explicit types
- ✅ Follow
.rulesfile for all code - ✅ Import with
@/alias:@/shared/components/button - ✅ Direct exports (no barrel/index files)
- ✅ Semantic HTML (
<button>, not<div onClick>) - ✅ Run
npm run lintafter changes and fix all issues, run command again after fixing them to verify that they are fixed
- ❌ Create example/demo files
- ❌ Use
anytype - ❌ Use console.log (use console.error/warn if needed)
- ❌ Skip accessibility attributes
- ❌ Create index.ts barrel exports
- ❌ Use non-semantic HTML for interactive elements
// ✅ GOOD: Direct export, typed props, semantic HTML
export interface ButtonProps {
label: string;
onClick: () => void;
variant?: 'primary' | 'secondary';
}
export function Button(props: ButtonProps) {
return (
<button
onClick={props.onClick}
className={`btn btn-${props.variant}`}
type="button"
>
{props.label}
</button>
);
}// ❌ BAD: No types, non-semantic HTML
export default function Button(props) {
return <div onClick={props.onClick}>{props.label}</div>
}// feature-name.tsx - Main component
export function FeatureName() { ... }
// feature-name.stories.tsx - Storybook component docs
export default { title: 'Features/FeatureName' };
// feature-name.test.tsx - Unit tests
test('renders correctly', () => { ... });- Write code following TypeScript and accessibility rules
- Format with
npm run format - Lint with
npm run lintand fix any errors - Test with
npm test - Build with
npm run buildto verify
Before adding dependencies:
- Check if functionality exists in
shared/ - Use Context7 MCP for library docs:
get-library-docs - Prefer well-maintained packages with TypeScript support
KISS - Simple, readable solutions only YAGNI - Build what's needed now, not "might need" DRY - Reuse shared components, don't duplicate
Before considering tesk completed:
- TypeScript compiles without errors
- Linting passes (
npm run lint) - Formatting applied (
npm run format) - Accessibility rules followed
- Semantic HTML used
- Direct imports (no barrel exports)
- Components have proper types
Linting errors:
npm run check:fix # Auto-fix what's possible
npm run lint # Check remaining issuesType errors:
- Define explicit types for all props and returns
- Avoid
any- useunknownif type is truly unknown - Check
shared/types/for existing type definitions
Import errors:
- Use
@/prefix for src imports - Check
project-structure.mdfor correct paths
Available MCP servers:
- playwright - Browser automation
- figma - Design tokens
- context7 - Library documentation