lovable-boilerplate
CLAUDE.md65 starsChanged 16 months agoMITView on GitHub
This project uses a sophisticated design system based on comprehensive instructions in .github/instructions/ and .cursor/rules/. Key principles:
In this repository8 other files it gives its agents.
- .cursor/rules/components.mdcCursor rule
- .cursor/rules/core.mdcCursor rule
- .cursor/rules/design.mdcCursor rule
- .cursor/rules/forms.mdcCursor rule
- .cursor/rules/hooks.mdcCursor rule
- .cursor/rules/quality.mdcCursor rule
- .cursor/rules/services.mdcCursor rule
- .cursor/rules/typescript.mdcCursor rule
The file
We split this CLAUDE.md into the rules it gives an agent
12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
Component Size Limit: Never exceed 300 lines per component
- Distinctive: line 46
Extract Reusable Logic: Use custom hooks instead of duplicating code
- Very specific: line 47
Service Layer Pattern: No inline API calls in components - use service layer in src/lib/
- Distinctive: line 77
Use Tailwind classes following the project's design system
- Distinctive: line 85
Design Philosophy: Create unique, custom-crafted interfaces that feel premium and engaging
- Distinctive: line 86
Color Strategy: Use colors intentionally to evoke the right emotions and enhance user experience
- Distinctive: line 100
No test framework currently configured - determine testing approach from codebase if tests are needed
- Very specific: line 105
Use TypeScript interfaces for type safety - define shared types in src/lib/types.ts
- Distinctive: line 107
Follow React Hook Form patterns with Zod validation for forms
- Distinctive: line 108
Use TanStack Query for API state management
- Very specific: line 109
Import UI components from @/components/ui/
- Very specific: line 110
Use the toast system via use-toast hook for notifications
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Development Commands
Core Development
npm run dev- Start development server on port 8080npm run build- Create production buildnpm run build:dev- Create development buildnpm run lint- Run ESLint linternpm run preview- Preview production build locally
Package Management
npm install- Install dependencies (or usebun installfor faster installs)
Architecture & Structure
Framework Stack
- React 18.3.1 with TypeScript for UI
- Vite 5.4.1 as build tool with SWC for fast compilation
- shadcn/ui component library built on Radix UI primitives
- Tailwind CSS 3.4.11 for styling with custom design system
- React Router DOM v6 for client-side routing
- TanStack Query for server state management
- React Hook Form + Zod for form handling and validation
Key Architecture Patterns
Component Organization & Structure
src/components/ui/- Pre-built shadcn/ui components (40+ available, READ-ONLY)src/components/common/- Reusable components (20-100 lines each)src/components/forms/- Form-specific componentssrc/components/features/- Feature-specific componentssrc/pages/- Route-level page componentssrc/hooks/- Custom React hooks includinguse-mobile.tsxanduse-toast.tssrc/lib/utils.ts- Utility functions with Tailwind class merging viacn()functionsrc/lib/types.ts- Shared TypeScript types and interfacessrc/lib/constants.ts- Application constantssrc/lib/validations/- Zod validation schemas
Critical Architecture Rules
- Component Size Limit: Never exceed 300 lines per component
- Composition Over Complexity: Build complex UI from smaller, focused components
- Single Responsibility: Each component should have one clear purpose
- Extract Reusable Logic: Use custom hooks instead of duplicating code
- Service Layer Pattern: No inline API calls in components - use service layer in
src/lib/
Import Aliases (configured in vite.config.ts)
@/maps to./src/@/componentsfor components@/libfor utilities@/hooksfor custom hooks
Routing Structure
Routes are defined in src/App.tsx. Add new routes above the catch-all * route:
<Routes>
<Route path="/" element={<Index />} />
{/* ADD NEW ROUTES HERE */}
<Route path="*" element={<NotFound />} />
</Routes>Design System Integration
This project uses a sophisticated design system based on comprehensive instructions in .github/instructions/ and .cursor/rules/. Key principles:
shadcn/ui Components
Over 40 pre-built components available in src/components/ui/:
- Layout:
card,separator,sheet,sidebar,tabs,accordion - Forms:
button,input,form,select,checkbox,radio-group - Overlays:
dialog,alert-dialog,drawer,popover,tooltip - Data Display:
table,badge,avatar,chart,carousel
Styling Conventions & Quality Standards
- Use Tailwind classes following the project's design system
- Generous spacing:
py-16 lg:py-24for sections - Consistent rhythm:
space-y-4 lg:space-y-6for content - Mobile-first responsive design approach
- Premium, sophisticated visual hierarchy with purposeful color psychology
- Accessibility: Maintain WCAG 2.1 AA contrast ratios (4.5:1 minimum)
- Never ship without running
npm run lint- must pass without errors - Industry-specific designs: Adapt visual identity, emotional tone, and color psychology to target audience
- Design Philosophy: Create unique, custom-crafted interfaces that feel premium and engaging
- Color Strategy: Use colors intentionally to evoke the right emotions and enhance user experience
Configuration Files
vite.config.ts- Vite configuration with path aliases and port 8080components.json- shadcn/ui configuration with default style and slate base colortailwind.config.ts- Tailwind configuration with dark mode supporttsconfig.json- TypeScript configuration with strict mode
Environment Variables
⚠️ Security: This is a client-side application. Only use VITE_ prefixed environment variables for public configuration. Never expose sensitive data like API secrets.
Testing & Quality
- ESLint configured with React and TypeScript rules
- No test framework currently configured - determine testing approach from codebase if tests are needed
Development Patterns & Best Practices
Code Organization
- Use TypeScript interfaces for type safety - define shared types in
src/lib/types.ts - Implement responsive design mobile-first
- Follow React Hook Form patterns with Zod validation for forms
- Use TanStack Query for API state management
- Import UI components from
@/components/ui/ - Use the toast system via
use-toasthook for notifications
Cursor Rules Integration
This project includes comprehensive Cursor rules in .cursor/rules/ that auto-apply based on file context:
- Core Rules (
core.mdc) - Always active architecture and quality rules - Component Rules (
components.mdc) - Auto-loads when editingsrc/components/** - Design Rules (
design.mdc) - Auto-loads when editing UI/styling files - Form Rules (
forms.mdc) - Auto-loads when editing form components - Hook Rules (
hooks.mdc) - Auto-loads when editingsrc/hooks/** - Service Rules (
services.mdc) - Auto-loads when editingsrc/lib/**
Reference with @rule-name in prompts (e.g., @quality for quality checklist)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

