How browsh-org/browsh works
Main Components Identification
a) Web Extension (webext/)
• Firefox integration layer
• DOM manipulation and rendering
• Graphics and text processing
b) Interfacer (interfacer/)
• Core application logic
• TTY handling
• Firefox communication
• Raw text server
c) Firefox Browser
• Headless instance
• Web page processing
• JavaScript execution
┌─────────────────┐
• Client Layer │ (Terminal/Browser)
• ┬────────┘
┌────────┴────────┐
• Interfacer │ (Go Implementation)
• ┬────────┘
┌────────┴────────┐
• Web Extension │ (Firefox Extension)
• ┬────────┘
┌────────┴────────┐
• Headless Firefox│
• ┬────────┘
┌────────┴────────┐
• Web Content │
• ┘
Component Details
For each major component, include these specific elements:
Web Extension Component:
• Background Scripts (src/background/)
• DOM Handlers (src/dom/)
• Graphics Builder
• Text Builder
• TTY Grid System
Interfacer Component:
• Command Processing
• Firefox Management
• TTY Interface
• Raw Text Server
• Configuration Management
Data Flow Indicators
• User input flow from terminal/browser to the interfacer
• Communication between interfacer and web extension
• Web content rendering pipeline
• Text conversion and formatting flow
Technical Details
Annotations for:
• Go-based backend services
• JavaScript-based extension components
• Firefox integration points
• WebSocket/Native messaging channels
• Text rendering pipeline
Implementation Notes
• The separation between the terminal interface and web processing
• The role of the web extension in converting web content to text
• The communication flow between components
• The configuration and state management system