Files
orangecat/docs/development/components/component-architecture.md
Georgy ButaevandClaude Opus 4.8 ae55dc1f80 docs: consolidate taxonomy from ~40 dirs into ~13 coherent areas
The docs tree had sprawled into ~40 overlapping/singleton/empty directories.
Consolidated (history preserved via git rename detection; links rewritten so
no previously-working link broke):

- architecture/ ← adr/, database/, + loose *_ARCHITECTURE / my-cat specs
- development/  ← standards, contributing, guides, examples, templates, components, ai
- operations/   ← devops (+runbooks), deployment, supabase
- design-system/← design, UX, ux-improvements, branding
- reference/    ← api, changelog, content, misc
- forward-looking/ ← planning, improvements, implementation
- archive/2026-h1/ ← point-in-time reports/plans that were loose at docs/ root
- removed empty docs/analysis/; rewrote docs/README.md as a current index

Verified: non-README relative-link health 81→83 OK (0 regressions, same 64
pre-existing-rot broken); all new README links resolve; external refs in
.claude/ + root repointed to moved targets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 11:34:28 +02:00

2.1 KiB

Components Directory

This directory contains all React components used in the OrangeCat application. Components are organized by feature and type to maintain a clear and scalable structure.

Directory Structure

components/
├── auth/             # Authentication-related components
│   ├── LoginForm.tsx
│   ├── RegisterForm.tsx
│   └── AuthProvider.tsx
├── dashboard/        # Dashboard components
│   ├── StatsCard.tsx
│   ├── ActivityFeed.tsx
│   └── FundingOverview.tsx
├── funding/          # Funding page components
│   ├── DonationForm.tsx
│   ├── ProgressBar.tsx
│   └── FundingCard.tsx
├── profile/          # Profile-related components
│   ├── ProfileHeader.tsx
│   ├── ProfileForm.tsx
│   └── SocialLinks.tsx
└── ui/               # Reusable UI components
    ├── Button.tsx
    ├── Card.tsx
    ├── Input.tsx
    └── Modal.tsx

Component Guidelines

  1. Naming Convention

    • Use PascalCase for component names
    • Suffix with .tsx for TypeScript React components
    • Use descriptive names that reflect the component's purpose
  2. Props

    • Define all props using TypeScript interfaces
    • Use meaningful prop names
    • Document required and optional props
    • Provide default values where appropriate
  3. Styling

    • Use Tailwind CSS for styling
    • Follow the design system guidelines
    • Ensure responsive design
    • Maintain accessibility standards
  4. Testing

    • Each component should have corresponding test files
    • Tests should cover main functionality and edge cases
    • Use React Testing Library for component tests
  5. Documentation

    • Include JSDoc comments for component props
    • Document usage examples
    • Note any dependencies or requirements

Best Practices

  • Keep components small and focused on a single responsibility
  • Use composition over inheritance
  • Implement proper error handling
  • Follow React hooks rules
  • Use memoization when necessary
  • Ensure proper TypeScript typing
  • Maintain consistent code style