mirror of
https://github.com/bitbaum/fitfoot.git
synced 2026-12-04 04:46:59 +01:00
🚀 Automated deployment 📊 All quality checks included 🔄 Monitor will handle issues
FitFoot Component Library
Created Date: 2025-01-23
Last Modified Date: 2025-01-23
Last Modified Summary: Created centralized component library documentation
📚 Overview
This is the complete documentation for all FitFoot UI components, organized by category for easy navigation.
🎨 Design System
Colors
- Primary: Amber (Swiss gold) -
bg-amber-600,text-amber-600 - Secondary: Gray -
bg-gray-200,text-gray-700 - Success: Green -
bg-green-600,text-green-600 - Error: Red -
bg-red-600,text-red-600
Typography
- Headers:
font-semiboldwith varying sizes - Body:
text-baseregular weight - Small:
text-smfor secondary information
Spacing
- Consistent scale: 4, 8, 12, 16, 24, 32, 48px
- Component padding: Usually
p-4orp-6 - Section margins: Usually
mb-6ormb-8
🧩 Component Categories
🎛️ Layout Components
| Component | Purpose | Location | Status |
|---|---|---|---|
| Header | Main navigation header | layout/header.tsx |
✅ Complete |
| Footer | Site footer with links | layout/footer.tsx |
📝 Planned |
| Layout | Page layout wrapper | layout/RootLayoutContent.tsx |
📝 Planned |
🎨 UI Components
| Component | Purpose | Location | Status |
|---|---|---|---|
| Button | Interactive buttons | ui/button.tsx |
✅ Complete |
| Input | Form inputs | ui/input.tsx |
📝 Planned |
| Badge | Status indicators | ui/badge.tsx |
✅ Complete |
| Logo | Brand logo component | ui/logo.tsx |
✅ Complete |
🔐 Authentication Components
| Component | Purpose | Location | Status |
|---|---|---|---|
| UserDropdown | User menu dropdown | auth/user-dropdown.tsx |
✅ Complete |
| SessionGuard | Route protection | auth/session-guard.tsx |
✅ Complete |
🛒 E-commerce Components
| Component | Purpose | Location | Status |
|---|---|---|---|
| ProductCard | Product display card | products/ProductCard.tsx |
📝 Planned |
| CartItem | Shopping cart item | cart/CartItem.tsx |
📝 Planned |
| MiniCart | Header cart dropdown | cart/mini-cart.tsx |
✅ Complete |
⚙️ Admin Components
| Component | Purpose | Location | Status |
|---|---|---|---|
| AdminLayout | Admin page layout | admin/AdminLayout.tsx |
✅ Complete |
| ProductEditor | Product editing form | admin/ProductEditor.tsx |
✅ Complete |
| AnalyticsDashboard | Admin analytics | admin/AnalyticsDashboard.tsx |
✅ Complete |
🎯 Usage Guidelines
Importing Components
// UI Components
import { Button } from '@/components/ui/button'
import { Badge } from '@/components/ui/badge'
// Layout Components
import { Header } from '@/components/layout/header'
import { Footer } from '@/components/layout/footer'
// Auth Components
import { UserDropdown } from '@/components/auth/user-dropdown'
Component Props Pattern
interface ComponentProps {
children?: React.ReactNode
className?: string
// Component-specific props
}
export function Component({ children, className, ...props }: ComponentProps) {
return (
<div className={cn('base-styles', className)}>
{children}
</div>
)
}
Styling Guidelines
- Use Tailwind CSS for all styling
- Apply responsive design with mobile-first approach
- Use
cn()utility for conditional classes - Follow consistent spacing and color patterns
🔍 Component Status Legend
- ✅ Complete: Fully documented with examples
- 🔄 In Progress: Being documented
- 📝 Planned: Not yet documented
- ⚠️ Needs Update: Documentation outdated
🛠️ Development Workflow
Adding New Components
- Create component in appropriate directory
- Add TypeScript interfaces
- Implement responsive design
- Add error handling
- Create documentation file
- Update this index
Updating Components
- Modify component code
- Update documentation
- Test across breakpoints
- Update modification date
📋 Component Checklist
Before Creating
- Check if similar component exists
- Define clear purpose and scope
- Plan responsive behavior
- Consider accessibility
During Development
- Use TypeScript interfaces
- Follow naming conventions
- Implement error handling
- Add loading states
- Test responsive design
After Creation
- Write documentation
- Add usage examples
- Update this index
- Create tests if needed
🎨 Figma Design System
Our design system in Figma includes:
- Color palette and typography
- Component specifications
- Responsive breakpoints
- Interaction states
📱 Responsive Breakpoints
/* Mobile First */
default: 0px-639px
sm: 640px+
md: 768px+
lg: 1024px+
xl: 1280px+
2xl: 1536px+
🔗 Related Documentation
- Component Patterns for AI - Reusable patterns
- UI Guidelines - Design system details
- Architecture Guide - System overview
💡 Pro Tip: Use the search function in your editor to quickly find component documentation by name!