How z-js-framework/z-js works
Main Components Identification
The system consists of several core modules:
• Rendering Engine
• Routing System
• State Management
• Component System
• Hooks System
• Fetch Module
• Forms Module
• Utilities
┌─────────────────────────────────────────────────────┐
• Core Utilities │
• (utilities.js - Basic helper functions) │
• ┘
┌─────────────────────────────────────────────────────┐
• Rendering Engine │
• ┌─────────────┐ ┌──────────┐ ┌───────────────┐ │
• HTML │ │ CSS │ │ Morphdom │ │
• Templating │ │ in JS │ │ Integration │ │
• ┘ └──────────┘ └───────────────┘ │
• ┘
┌─────────────────────────────────────────────────────┐
• State Management │
• ┌─────────────┐ ┌──────────┐ ┌───────────────┐ │
• Component │ │ Global │ │ State Radio │ │
• State │ │ Store │ │ Integration │ │
• ┘ └──────────┘ └───────────────┘ │
• ┘
┌─────────────────────────────────────────────────────┐
• Feature Modules │
• ┌─────────────┐ ┌──────────┐ ┌───────────────┐ │
• Router │ │ Hooks │ │ Forms │ │
• ┘ └──────────┘ └───────────────┘ │
• ┘
┌─────────────────────────────────────────────────────┐
• Z-Fetch API │
• (HTTP Methods, Configuration, Error Handling) │
• ┘
• Blue: Data flow
• Green: State updates
• Red: Error propagation
• Orange: Event handling
Important Notes
• Component relationships
• State flow patterns
• Event propagation
• Error handling paths
• Integration points with external libraries (like Morphdom)
Implementation Details
• Rectangles: Core modules
• Rounded rectangles: Features
• Hexagons: Integration points
• Circles: State stores
• Diamonds: Decision points in data flow
• Simplicity in design
• Direct DOM manipulation
• Template literal-based components
• Built-in state management
• Efficient routing system
• Integrated fetch capabilities
This system design will help developers understand how Z.Js Framework's components work together to create a cohesive frontend development experience while maintaining its "low mental overhead" philosophy.