How tuya-community/tuya-ray-materials works
High-Level Architecture Components
The system should be divided into these main components:
a) Templates Layer
• Device-specific templates (e.g., SweepRobot, PanelLock, PublicPanelIpc)
• Each template containing its own UI components, business logic, and device protocols
b) Materials Layer
• Reusable UI components (HighPerfText, TySlider, RecycleView)
• Shared utilities and hooks
c) Core Framework Layer
• Ray framework integration
• Redux state management
• Device communication protocols
• Internationalization (i18n) support
Key Relationships to Highlight
• Template dependencies on Materials components
• Data flow between device protocols and UI components
• State management patterns using Redux
• Communication with Tuya IoT platform
Component Organization
For each template/material, show:
Template/Material
• Components
• UI Components
• Business Components
• Pages
• Route-based views
• Redux Store
• Actions
• Reducers
• Device Integration
• Protocols
• Schema
• Utils & Hooks
Implementation Details
Technical annotations for:
• TypeScript/JavaScript implementation
• React/Ray component structure
• Redux state flow
• Device protocol handling
• Style management (Less modules)