Skip to content
Source
Sign inSign up
TanStack/devtools
Open History to see the last commit

overview.md

98 lines4.4 KB

1---
2title: Overview
3id: overview
4---
5​
6TanStack Devtools is a framework-agnostic devtool for managing and debugging *your devtools*.
7​
8We offer you all the tools you need to build and maintain your own devtools with ease.
9​
10We will continue to improve and expand the capabilities of TanStack Devtools, so you can focus on building great applications while we take care of the heavy lifting. We offer you an easy way
11to add your own custom devtools and merge multiple instances of TanStack Devtools into a single cohesive experience.
12​
13> [!IMPORTANT]
14> TanStack Devtools is currently in **alpha** and its API is subject to change.
15​
16## Origin
17​
18Have you ever wanted to build your own devtools? Then you start work on them, and you realize how complex and time-consuming it can be. First of all, you have to deal with the dreaded z-indexes!
19Create the trigger, make sure you can move it, style the panel, handle the interactions, make sure
20it's not getting in the way... The list keeps going on, and you're just trying to build your
21next feature in half the time!
22​
23​
24Well, that's where TanStack Devtools comes in. We provide a solid foundation for building your own devtools, so you can focus on what matters most: your application. We provide everything you need
25out of the box and all you have to do is plug the simple custom devtool panel into your app!
26​
27## What's in the Box
28​
29TanStack Devtools is composed of several packages organized into layers. You only need to install the ones relevant to your use case.
30​
31### Framework Adapters
32​
33- `@tanstack/react-devtools`
34- `@tanstack/vue-devtools`
35- `@tanstack/solid-devtools`
36- `@tanstack/preact-devtools`
37​
38Thin wrappers that integrate the devtools into your framework of choice. Pick the one that matches your app and you're good to go.
39​
40### Core
41​
42- `@tanstack/devtools` β€” The devtools shell UI built in Solid.js. Provides the plugin system, tab navigation, settings panel, and trigger button.
43​
44### Event System
45​
46- `@tanstack/devtools-event-client` β€” Type-safe event client for building custom plugins.
47- `@tanstack/devtools-event-bus` β€” WebSocket/SSE transport layer connecting client and server.
48​
49### Build Tools
50​
51- `@tanstack/devtools-vite` β€” Vite plugin providing source inspection, console piping, enhanced logging, and production build stripping.
52​
53### Utilities
54​
55- `@tanstack/devtools-utils` β€” Plugin factory helpers for each framework.
56- `@tanstack/devtools-ui` β€” Shared Solid.js UI component library.
57- `@tanstack/devtools-client` β€” Internal typed event client for core devtools operations.
58​
59## Architecture
60​
61The diagram below shows how the layers connect at a high level:
62​
63```mermaid
64graph TD
65 subgraph App["Your Application"]
66 adapter["Framework Adapter<br/><i>React / Vue / Solid / Preact</i>"]
67 subgraph shell["@tanstack/devtools β€” Core Shell"]
68 plugins["Plugin System & Tab Navigation"]
69 settings["Settings & State Persistence"]
70 ui["Trigger, Panel, Source Inspector"]
71 end
72 subgraph events["Event System"]
73 ec["EventClient<br/><i>Typed events for plugins</i>"]
74 eb["EventBus<br/><i>WebSocket / SSE transport</i>"]
75 end
76 end
77​
78 adapter --> shell
79 shell --> events
80```
81​
82Your application loads a **Framework Adapter**, which mounts the **Core Shell**. The shell manages the plugin lifecycle, renders tabs, and surfaces settings. Plugins communicate through the **Event System**, which provides typed events locally and can bridge to a server over WebSocket or SSE when needed.
83​
84## Key Features
85​
86- **Framework Agnostic**: Works with React, Vue, Solid, and Preact out of the box.
87- **Plugin System & Marketplace**: Build, share, and install devtools plugins with a simple API.
88- **Type-Safe Event System**: Communicate between plugins and the shell using fully typed events.
89- **Source Inspector**: Click any element in your app to jump straight to its source code (go-to-source).
90- **Console Piping**: Route devtools output to your browser console for a familiar debugging workflow.
91- **Picture-in-Picture Mode**: Pop the devtools panel out into its own window so it never covers your app.
92- **Customizable Hotkeys**: Rebind keyboard shortcuts to match your workflow.
93​
94## Next Steps
95​
96- [Quick Start](./quick-start) β€” Get running in 2 minutes
97- [Architecture Overview](./architecture) β€” Understand how the pieces fit together
98- [Building Custom Plugins](./building-custom-plugins) β€” Create your own devtools