mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 20:28:04 +01:00
- Bump version to 0.1.1 for tracking - Add webpack-bundle-optimizer script for Next.js config - Simplify ESLint configuration to resolve missing dependencies - Prepare for production deployment with proper version control This deployment includes: - Profile update fixes with banner_url support - LN address validation - Auth cookie fixes for profile updates - Various documentation and testing improvements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <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