Skip to content

docs: add PowerSync DevTools guides for Vite, Nuxt, and Node.js - #672

Open
khawarizmus wants to merge 4 commits into
mainfrom
diagnostics-docs
Open

khawarizmus wants to merge 4 commits into
mainfrom
diagnostics-docs

Conversation

@khawarizmus

Copy link
Copy Markdown
Contributor

Summary

Adds docs for the new PowerSync DevTools.

Changes

  • Rewrote tools/devtools-overview. It explains what DevTools is and how it works, and links to one setup page per environment.
  • New setup pages:
    • tools/devtools/vite: Vite 7 and Vite 8, in tabs.
    • tools/devtools/nuxt: Nuxt DevTools 3 and 4, in tabs, with a migration guide from @powersync/nuxt 0.x.
    • tools/devtools/node: Node.js apps.
  • New shared pages:
    • tools/devtools/using-devtools: what each DevTools tab shows.
    • tools/devtools/mcp: how coding agents connect to DevTools with MCP.
  • Removed: the old tools/nuxt-inspector page. Its URL now redirects to tools/devtools/nuxt.
  • Updated the Nuxt SDK page: it now uses PowerSyncDatabase, because NuxtPowerSyncDatabase is removed.
  • Updated links: in tools/overview and tools/ai-tools.

This PR should be merged after powersync-ja/powersync-js#1094 is released, so we can add minimum versions of @powersync/web, @powersync/nuxt and @powersync/node.

AI Disclosure

The docs were generated with the help of Claude. Modified and reviewed manually.

@mintlify

mintlify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
powersync 🟢 Ready View Preview Oct 1, 2026, 7:54 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

Comment thread tools/devtools/nuxt.mdx Outdated
Comment on lines +64 to +70
Nuxt DevTools 4 is in beta. It runs on Vite DevTools and needs Vite 8.1.5 or later. Nuxt 4.5 includes a compatible Vite version.

Nuxt 4 depends on Nuxt DevTools 3. To use version 4, install it and override the version that Nuxt uses. For example, with pnpm, add this to `pnpm-workspace.yaml`:

```yaml
overrides:
'@nuxt/devtools': 4.0.0-beta.2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Nuxt DevTools 4 beta status, the "Vite 8.1.5 or later" floor, and the 4.0.0-beta.2 override pin aren't backed by anything in the cited implementation PR (powersync-js#1094) — that PR's own testing notes and lockfile only reference @nuxt/devtools@3.4.1. Since this is a third-party prerelease version that can go stale quickly, either verify it against the actual @nuxt/devtools release history before publishing, or add a verification TODO like the ones already used elsewhere in this PR for unconfirmed version numbers.

Comment thread tools/devtools/node.mdx

## Requirements

- `@powersync/node`. {/* TODO: Add the minimum version after the release. It needs the `diagnostics` sync option and the `connector` accessor from `@powersync/common`. */}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike the equivalent requirement bullets on the Vite and Nuxt pages (which give a placeholder version before the TODO), this one has no version qualifier at all, so once the MDX comment is stripped the rendered bullet just reads "@powersync/node." with no information. Consider adding a placeholder like the other two pages do, e.g. "@powersync/node (version TBC)." so the list item isn't empty of content.

@claude

claude Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Couldn't run Vale or the link checker in this environment (CI check results and vale/gh pr checks were blocked by sandbox permissions), so those results aren't reflected here — only the manual accuracy/clarity review above.

Comment thread tools/devtools/node.mdx Outdated

```typescript
import { PowerSyncDatabase } from '@powersync/node';
import { enablePowerSyncDiagnostics } from '@powersync/diagnostics/node';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was pointed out by Claude locally, from what I can see it may be valid feedback:

@powersync/diagnostics is installed with -D, but the example imports it statically at the top of the file. A production install that skips dev dependencies (npm ci --omit=dev) will fail on startup, even though the call is behind the NODE_ENV check. Can we switch to a dynamic import inside the check, and add one sentence saying why?

if (process.env.NODE_ENV !== 'production') {
  const { enablePowerSyncDiagnostics } = await import('@powersync/diagnostics/node');
  const devtools = await enablePowerSyncDiagnostics(db);
  console.log(`PowerSync DevTools: ${devtools.signInUrl}`);
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was fixed in both repos.

PowerSync currently provides DevTools integrations for Dart/Flutter and Nuxt. These embed a diagnostics panel into your existing IDE or framework tooling, so you can inspect your app's local database, Sync Stream state, and JWT credentials without launching a separate tool. They are available in development builds only.
PowerSync DevTools shows the sync status, buckets, Sync Stream subscriptions, local SQLite data, schema, and logs of the PowerSync client in your app. You can also run SQL queries and sync actions. Coding agents can read the same data through [MCP tools](/tools/devtools/mcp) when you use Vite, Nuxt DevTools 4, or Node.js.

DevTools runs in development only and adds nothing to a production build.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adds nothing to a production build. is this really true for Node.js, where it seems the tools have to explicitly be enabled for dev only?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes with the changes you suggested above this becomes true even for Node js apps where a production install doesn't include the package, and the app never loads it.

Comment thread tools/devtools/vite.mdx
## Requirements

- `@powersync/web` 2.5.0 or later. {/* TODO: Confirm the version after the release. */}
- Vite 7, or Vite 8.3 or later.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vite 8.3 is inconsistent with Vite 8.1.5 mentioned on the Nuxt page - seems a bit odd since we say the Nuxt version runs on this one. Just want to confirm.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both numbers were correct, but they meant different things. Vite 8.3 is the first version with the devtools config option that plain Vite apps use. Nuxt DevTools 4 needs Vite 8.1.5 or later, and on versions before 8.3 it adds Vite DevTools itself, so Nuxt users never touch that option. To avoid the confusion, we now say "needs Nuxt 4.5 or later" and we give no Vite version.

|---|---|
| Database list | Selects the database to show. It appears only when more than one database is attached, for example when your app is open in two browser tabs. |
| **Sync now** | Requests a checkpoint and waits until the client is up to date. Your app must connect with `checkpointMode: 'requests'`. Read [Sync Catch-Up](/client-sdks/advanced/checkpoint-requests). |
| **Clear & re-sync** | Deletes the local data and downloads it again. Hold the button for one second to start it. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should point out that this will also clear data still in the upload Queue in case they made writes (e.g. while offline) that they expect to still sync

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same goes for the corresponding command on the MCP page

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, added a warning under the header table.

Comment thread tools/devtools/using-devtools.mdx Outdated
The tables in your schema are SQLite views. The client's sync state is in internal `ps_*` tables, such as `ps_buckets`, `ps_oplog`, and `ps_crud`.

<Warning>
Writes in the SQL editor change your local data. A write to one of your schema tables goes into the upload queue, like a write from your app.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Writes in the SQL editor change your local data. A write to one of your schema tables goes into the upload queue, like a write from your app.
Writes in the SQL editor change your local data. A write to one of your schema tables goes into the upload queue, and your connector's `uploadData()` sends it to your backend, like a write from your app.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used your wording here

---

PowerSync currently provides DevTools integrations for Dart/Flutter and Nuxt. These embed a diagnostics panel into your existing IDE or framework tooling, so you can inspect your app's local database, Sync Stream state, and JWT credentials without launching a separate tool. They are available in development builds only.
PowerSync DevTools shows the sync status, buckets, Sync Stream subscriptions, local SQLite data, schema, and logs of the PowerSync client in your app. You can also run SQL queries and sync actions. Coding agents can read the same data through [MCP tools](/tools/devtools/mcp) when you use Vite, Nuxt DevTools 4, or Node.js.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Rather than describing what the devtools show, it would be more useful to readers to describe what the devtools help with - i.e. explain the use cases behind these things. So as an example, rather than just saying "they show local data" explain what that means for a user, e.g. they allow you to inspect the live local data of a client (I'm not sure if this is the best summary). Then a reader can more easily grok if they'd be useful for their use case or not.

…warning, Nuxt 4.5 requirement

# Conflicts:
#	tools/devtools/node.mdx
#	tools/devtools/using-devtools.mdx

This branch was successfully deployed

1 active deployment
staging — 78aeb52d Deployed Oct 1, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants