How matry/editor works
Main System Components
A. Core Editor Layer
• Main editor components from /editor directory:
• State Management (state.js)
• DOM Manipulation (dom.js)
• CSS Object Model (cssom.js)
• Event Handlers (handlers.js)
• Effects System (effects.js)
B. Mode System Layer
• This as a wrapper around the core editor
• Different modes from /editor/modes:
• Normal Mode
• Interactive Mode
• Append Mode
• Project Mode
C. Component Layer
• This above the core editor
• React components from /editor/components:
• Workspace View
• Project View
• Canvas Node
• Style Editor
• File View
D. Extension System
• This on the side
• Extension architecture from /extensions
• Currently highlight the image search extension as an example
E. Overlay System
• This as a top layer
• Components from /overlay:
• Overlay
F. Utility Services
• As a supporting layer
• Utilities from /utils:
• Storage
• Broadcast Channel
• URL Handling
Specific Architectural Patterns to Highlight
• Command Pattern: Show how keyboard commands flow through the system
• Observer Pattern: Illustrate the state management and updates
• Component Hierarchy: Demonstrate the React component structure
• Extension System: Show how plugins can integrate
Technical Stack Indicators
Technology badges or labels for:
• React (Frontend Framework)
• TypeScript (for type-safe components)
• Tailwind CSS (Styling)
• Vite (Build Tool)
Important Relationships
• Command Flow: Keyboard Input → Mode System → Core Editor → State Updates → UI Updates
• Extension Integration: Extension System → Core Editor → Overlay System
• State Management: Core Editor → Component Updates
• File System Interaction: Project View → Storage System