How ronkok/hurmet works
Main Components
a) Frontend Layer:
• Rich Text Editor Interface (based on ProseMirror, evident from prosemirror.js)
• Calculation Engine
• Document Renderer
• Progressive Web App (PWA) Infrastructure
b) Core Processing Components:
• Parser System (parser.js, lexer.js)
• Calculation Engine (calculate.js, evaluate.js)
• Markdown Processing (md2ast.js, md2html.js)
• Mathematical Processing (complex.js, matrix.js, rational.js)
c) Specialized Modules:
• Beam Analysis System (beam/ directory)
• Unit Handling System (units.js)
• Spreadsheet Functionality (spreadsheet.js)
Component Relationships
• User Input → Rich Text Editor → Parser → Calculation Engine → Document Renderer
• Document Storage ↔ PWA Cache System
• Mathematical Expressions → TeX Parser → Calculation Engine
Architectural Patterns to Highlight
• Module-based architecture (evident from src/ structure)
• Component-based frontend (nodeviews.js, schema.js)
• Service Worker architecture (sw.js) for PWA functionality
User Interface (Editor)
Parser System --- Calculation Engine --- Document Renderer
Storage System --- Mathematical Modules --- Specialized Tools
Important Implementation Details to Note
• PWA caching mechanism
• Separation between editing and calculation
• Beam analysis subsystem
• Integration with TeX parsing (texToCalc.js)
Key Integration Points
• Document how the editor interfaces with the calculation engine
• How the PWA system enables offline functionality
• Mathematical expression parsing flow
This architecture should emphasize Hurmet's primary goal of maintaining readability while performing complex calculations, as highlighted in the README.