How j-chau/spellbook works
Detailed Component Breakdown
A. Client Layer:
• Browser interface
• Local Storage component (as indicated by LocalStorage.ts utility)
B. Application Layer (React Components):
1. Pages (Top Level):
• SearchSpells Page
• MySpells Page
2. Core Components (Middle Level):
• Navigation
• SpellList
• SpellCard
• Filter Components
3. Utility Layer (Bottom Level):
• Hooks (useDebounce)
• Utils
• Types
C. External Services:
• Open5e API
• Local Storage Interface
Flow Representation
• User interactions → Components
• Component → Open5e API calls
• Data persistence → Local Storage
• State management flows
Component Relationships
Key relationships:
• SearchSpells page containing filters (ClassFilter, SchoolFilter, Search)
• SpellList containing SpellCard components
• AddButton/RemoveButton interaction with Local Storage
• Filter components' connection to the search functionality
Technical Details
Annotations for:
• TypeScript usage (indicated by .tsx files)
• CSS Modules implementation
• Testing setup (Jest)
• User Interface Layer
• Business Logic Layer
• Data Persistence Layer
• External Services Layer
Important Guidelines: