How mayu-live/framework works
Main Components
a) Core System Components:
• Server-Side Runtime
• VirtualDOM Engine
• Component Manager
• State Management System
• Resource System
• Router
• Client-Side Runtime (minimal)
• DOM Updater
• Event Handler
• Stream Handler
• Development Tools
• Hot Reload System
• Asset Pipeline
• Metrics Collector
b) External Systems:
• HTTP/2 Server
• Prometheus Metrics
• File System (for component storage)
• Browser Client
• Development Tools (optional subsystem)
Key Relationships to Highlight
a) Data Flow:
• Server → Client Stream (DOM updates)
• Client → Server (Event callbacks)
• File System → Resource System → Component Manager
• VirtualDOM → DOM Patch Generator → Client
• Metrics Collection → Prometheus Endpoint
b) Component Lifecycle:
• File Loading → Compilation → Component Registry
• State Updates → VDOM Reconciliation → DOM Patches
• Event Handling → State Updates → Re-render
Architectural Patterns to Emphasize
• Component-based Architecture
• Event-driven System
• Asynchronous Processing
• Hot Module Replacement
• File-system Based Routing
• Resource Pipeline
Implementation Details
• Mayu Framework |
• Server Core | | Resource System | | Component | | Client | |
• Pipeline | | Runtime | |
• VDOM Engine | | - Asset Loading | | - Compilation | | - DOM Updates | |
• State Manager | | - Hot Reload | | - Registration | | - Event Hand. | |
• Router | | - Cache Manager | | - Lifecycle | | - Streaming | |
• Development | | Metrics | | HTTP/2 | |
• Tools | | System | | Server | |
• Hot Reloader | | - Prometheus | | - Session Mgmt | |
• Debug Tools | | - Performance | | - Compression | |
Important Notes
• Async nature of the system
• Minimal client-side footprint
• Demonstrate the hot-reload capability
• Metrics collection system
• HTTP/2 streaming connection
• File system routing structure