Sveltool
Chrome DevTools panel (Manifest V3) with real-time AST visualisation, prop/state diagramming, and D3.js dependency trees
A Chrome DevTools extension for Svelte developers. Open DevTools, click the Sveltool tab, and you get a live tree view of every component on the page — what it's called, what props it received, and what state it holds.
Built with a team of five at Codesmith and open-sourced under OSLabs.
The extension has three layers:
- A content script injected into the page that walks the Svelte component tree, extracts component names, props, and state, and serialises the result.
- A background script that bridges the page context and the DevTools panel via Chrome's messaging API.
- A DevTools panel built in Svelte itself, rendering the parsed tree as an interactive D3.js visualisation.
Click any node in the tree and the right panel shows that component's props and current state. The tree updates when you navigate or interact with the inspected app.
I worked primarily on the component parser and the D3 tree rendering. The parser walks Svelte's internal component instances in the page's DOM, extracts the relevant data without interfering with the app's reactivity, and packages it into a shape that D3 can consume. The tree renderer uses D3's hierarchy layout to position nodes and draws the connections between parent and child components.
- Svelte for the DevTools panel UI
- D3.js for the tree visualisation
- Chrome Extensions API (Manifest V2) for DevTools integration
- Webpack for bundling