Introduction
The Pizza Chef Frontend component library provides a modern, performant set of React components built with TypeScript, Redux, and Tailwind CSS. The architecture emphasizes type safety, state management, and responsive design patterns.Component Architecture
Components are organized by feature domain, following a clear separation of concerns:Technology Stack
React 19
Functional components with hooks for state and lifecycle management
TypeScript
Full type safety with strict mode enabled
Redux Toolkit
Centralized state management with typed hooks
Tailwind CSS
Utility-first styling with custom design system
State Management
All components integrate with Redux using typed hooks fromstore/index.ts:
Redux Slices
- pizzaSlice: Manages pizza catalog, filters, and search state
- orderSlice: Handles current order, order history, and loading states
Core Components
Pizza Components
PizzaCard
Interactive card component for displaying individual pizzas with add-to-order functionality
PizzaFilters
Comprehensive filtering system with search, category, price range, and sorting controls
Order Components
OrderSummary
Real-time order management with quantity controls, discount calculation, and checkout
Dashboard Components
Analytics
Data visualization dashboard with revenue metrics and order distribution charts
Type System
All components use strongly-typed interfaces fromsrc/types/:
Design Patterns
Animation & Motion
Components use Framer Motion for smooth transitions:Icon System
Lucide React provides consistent iconography:Responsive Design
Tailwind breakpoints enable mobile-first responsive layouts:Styling Conventions
Glass Morphism
Many components use backdrop blur effects:Interactive States
Hover and active states provide tactile feedback:Color System
- Primary: Orange (
orange-500,orange-600) - Success: Green (
green-500,green-600) - Danger: Red (
red-500) - Neutral: Gray scale (
gray-50togray-900)
Navigation
Components use React Router for client-side navigation:Performance Optimizations
- Lazy animations: Components animate only on user interaction
- Memoized selectors: Redux selectors prevent unnecessary re-renders
- Conditional rendering: Empty states and loading states reduce DOM complexity
- Debounced inputs: Search and filter inputs minimize Redux updates
Accessibility
- Semantic HTML elements (
button,input,select) - ARIA-compliant form controls
- Keyboard navigation support
- Focus states on interactive elements
- Color contrast meets WCAG standards
Next Steps
PizzaCard Component
Learn about the interactive pizza display card
PizzaFilters Component
Explore the filtering and search system
OrderSummary Component
Understand order management and checkout
Analytics Component
Dive into data visualization patterns