How seungyeop-lee/directory-watcher works
Main Components
a. Core Components:
• File System Watcher Engine
• Configuration Manager
• Command Execution Engine
• Event Handler
• Lifecycle Manager
b. Supporting Components:
• Logger System
• Error Handler
• Command Manager
┌─ Directory Watcher System ──────────────────────────────────┐
• ┌─ Configuration Layer ─────┐ │
• Config Parser │ │
• YAML Handler │ │
• Config Validator │ │
• ┘ │
• ┌─ Core Watch Engine ───────┐ ┌─ Event Pipeline ────┐ │
• FSNotify Integration │───▶│ - Event Filter │ │
• Directory Monitor │ │ - Event Debouncer │ │
• Path Manager │ │ - Event Router │ │
• ┘ └──────────────────────┘ │
• ┌─ Command Management ──────┐ ┌─ Execution Engine ──┐ │
• Command Parser │───▶│ - Runner │ │
• Command Builder │ │ - Process Manager │ │
• Variable Interpolator │ │ - Interrupt Handler │ │
• ┘ └──────────────────────┘ │
• ┌─ Lifecycle Hooks ─────────┐ ┌─ Output Handling ───┐ │
• Before Change │ │ - Logger │ │
• After Change │ │ - Error Reporter │ │
• Finish Watch │ └──────────────────────┘ │
• ┘ │
• ┘
Key Relationships to Highlight
• Command execution flow (bold lines)
Implementation Details
• FSNotify integration point
• Command execution environment
• Platform-specific components (Unix/Windows)
• Error handling paths
• Logging system integration