mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 07:19:19 +01:00
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>
2.1 KiB
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
-
Naming Convention
- Use PascalCase for component names
- Suffix with
.tsxfor TypeScript React components - Use descriptive names that reflect the component's purpose
-
Props
- Define all props using TypeScript interfaces
- Use meaningful prop names
- Document required and optional props
- Provide default values where appropriate
-
Styling
- Use Tailwind CSS for styling
- Follow the design system guidelines
- Ensure responsive design
- Maintain accessibility standards
-
Testing
- Each component should have corresponding test files
- Tests should cover main functionality and edge cases
- Use React Testing Library for component tests
-
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