How haste/tales-beyond works
Main Components
a. Browser Extension Components:
• Background Service Worker (from background.js)
• Content Scripts Layer
• User Interface Elements
• Storage System
b. External Services Integration:
• D&D Beyond Platform
• TaleSpire Platform
┌─ Browser Extension Environment ─────────────────────────┐
• ┌─ User Interface ─────┐ ┌─ Core Logic ────────┐ │
• Context Menus │ │ - Character Handler │ │
• Options Page │ │ - Monster Handler │ │
• Dialog Components │ │ - Mods System │ │
• ┬─┘ └─────────┬──────────┘ │
• ┌─ Background Service Worker ─────────┴──────────┐ │
• D&D Beyond Integration │ │
• TaleSpire Communication │ │
• ┬─────────────────────────┘ │
• ┼────────────────────────────┘
┌────────────────────────┼────────────────────────────┐
• External Services │ │
• ┌─────────────────┐ │ ┌────────────────┐ │
• D&D Beyond │◄─┴─►│ TaleSpire │ │
• ┘ └────────────────┘ │
• ┘
Component Details
a. Browser Extension Core:
• Manifest files (manifest.chrome.json and manifest.firefox.json)
• Background service worker
• Content script injection points
• Storage utilities (storage.js)
b. Feature Modules:
• Character handling (characters.js)
• Monster handling (monsters.js)
• Modification system (mods.js)
• Theme management (themes.js)
c. User Interface:
• Context menu system (contextmenu.js)
• Options page (options.html/js)
• Style system (scss directory)
Interaction Flows to Demonstrate
• How dice roll requests flow from D&D Beyond to TaleSpire
• How the observer pattern (observer.js) monitors D&D Beyond changes
• Storage interaction patterns
• How different clients (browser/symbiote) interact with the core system