How vaibhavkanojia/fishbone works
Project type and purpose
• It comprises two main runtime halves:
• the extension host (the VS Code “backend”) written in TypeScript under src/extension
• a React-based webview “frontend” under src/webview
• There is also a Docusaurus‐based documentation site in docs/fishbone and unit/integration tests under src/test.
File structure
Top-level:
• CONFIG & BUILD: .github/, .vscode/, .husky/, esbuild.mjs, tsconfig.json, package.json
• DOCUMENTATION: docs/fishbone/ (Docusaurus site sources)
• EXTENSION RUNTIME: src/extension/ – activation (extension.ts), commands, custom FS & Notebook providers (fbaFSProvider.ts, fbaNotebookProvider.ts), renderers, AI integration (fbAIProvider.ts), utilities, constants
• WEBVIEW FRONTEND: src/webview/ – public (HTML/manifest), React app in src (components, pages, CSS, tests)
• TESTS: src/test/
• ASSETS: images/, db.json, language-configuration files
Additional insights from README
• Extensibility: imports, reset workflows
• Third-party libs: React, Material-UI, fishbone-chart, js-yaml, jsonpath
a. Main components
1. VS Code Extension Host
• Activation & Command Controller
• File System Provider (.fba file management)
• Notebook Provider (if using notebook API)
• AI/REST Provider (fbAIProvider, fbAiTools)
• Renderer (cell / NBRQ renderer)
2. Webview Frontend (React App)
• FishboneCanvas (fishboneChart.js)
• Data Providers (REST, dlt logs)
• UI Components (effects, categories, dialogs, summary table)
3. Documentation Site (Docusaurus)
4. External Services
• REST servers (JIRA, GitHub, custom)
• DLT-logs extension (for live log queries)
5. Storage
• .fba analysis files (json via JS-YAML)
• db.json (example data)
b. Relationships & data flows
• VS Code UI → Extension Host registers commands & menus →
• User triggers “New fishbone” or opens .fba → Extension Host spins up a WebviewPanel →
• Extension ↔ Webview communicate via postMessage / onDidReceiveMessage
• Webview makes REST or dlt-logs requests by dispatching messages back to the extension which has credentials/contexts to call external APIs
• Extension writes/reads .fba files via its custom FS provider
• Documentation site is built/deployed separately via Docusaurus (not part of the runtime)
c. Architectural patterns & design principles
• Separation of concerns: host logic vs. UI logic
• Event-driven messaging between extension host & webview
• Pluggable providers (FS, notebook, AI, REST) following VS Code’s Provider APIs
• MV* style in React frontend: container components vs. presentational components
• Plugin extensibility: import/nest fishbones, reset workflows
d. Key technologies & libraries
• Node & VS Code Extension API (TypeScript)
• React, react-dom, Material-UI, fishbone-chart
• Docusaurus (docs)
• esbuild for bundling the extension
• js-yaml & jsonpath for file parsing and queries