How iamgio/quarkdown works
Main Components Identification
The system can be broken down into these major components:
a) Core Engine:
• Lexer/Parser (core/src/main/kotlin/eu/iamgio/quarkdown/lexer, parser)
• AST (core/src/main/kotlin/eu/iamgio/quarkdown/ast)
• Function System (core/src/main/kotlin/eu/iamgio/quarkdown/function)
• Rendering System (core/src/main/kotlin/eu/iamgio/quarkdown/rendering)
b) CLI Interface:
• Command Processing (cli/src/main/kotlin/eu/iamgio/quarkdown/cli)
• Execution Strategies (cli/src/main/kotlin/eu/iamgio/quarkdown/cli/exec/strategy)
c) Server Component:
• Web Server (server/src/main/kotlin/eu/iamgio/quarkdown/server)
• Browser Integration (server/src/main/kotlin/eu/iamgio/quarkdown/server/browser)
d) Standard Library:
• Built-in Functions (stdlib/src/main/kotlin/eu/iamgio/quarkdown/stdlib)
┌─────────────────────────────────────────────────────────────┐
• User Interface Layer │
• ┌──────────┐ ┌──────────┐ ┌──────────────────────┐ │
• CLI │ │ REPL │ │ Web Interface │ │
• ┬─────┘ └────┬─────┘ └──────────┬───────────┘ │
• ┼──────────────┼─────────────────────┼──────────────┘
┌───────┼──────────────┼─────────────────────┼──────────────┐
• Processing Layer │ │
• ┌────▼─────┐ ┌───▼────────┐ ┌─────▼────────┐ │
• Pipeline │◄───┤ Compiler │ │ Web Server │ │
• ┬─────┘ └───────────┬┘ └──────────────┘ │
• ┌────▼──────────────────────▼─┐ │
• Core Engine │ │
• ┌─────────┐ ┌─────────┐ │ │
• Lexer │──► Parser │ │ │
• ┘ └────┬────┘ │ │
• ┌─────▼────┐ │ │
• AST │ │ │
• ┬────┘ │ │
• ┌───────▼──────┐ │ ┌──────────────┐ │
• Functions │◄┼─────┤Standard Lib │ │
• ┬──────┘ │ └──────────────┘ │
• ┌───────▼──────┐ │ │
• Renderer │ │ │
• ┘ │ │
• ┘ │
• ┘
Key Relationships to Highlight
a) Input Flow:
• CLI/REPL → Pipeline → Core Engine
• Web Interface → Web Server → Pipeline
b) Processing Flow:
• Lexer → Parser → AST → Functions → Renderer
• Standard Library integration with Functions
• Pipeline orchestration of the entire process
Additional Elements
Important aspects:
• Document type support (slides, paged, plain)
• Media storage system
• Theme system
• File watching and live preview capabilities
• Function call system
• Error handling flow