Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions installation/quickstart-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ The following outlines our recommended steps to implement PowerSync in your proj
<Step title="[Optional] Generate a Development Token">
Generate a [Development Token](/installation/authentication-setup/development-tokens) so you can get up and running quickly, without implementing full authentication integration yet.
</Step>
<Step title="[Optional] Test Sync with our Diagnostics App">
Use our hosted [Diagnostics App](https://diagnostics-app.powersync.com) to validate that your backend source database is syncing into SQLite as expected based on your Sync Rules.
<Step title="[Optional] Test Sync with the Sync Diagnostics Client">
Use our hosted [Sync Diagnostics Client](https://diagnostics-app.powersync.com) to validate that your backend source database is syncing into SQLite as expected based on your Sync Rules.
</Step>
<Step title="Implement PowerSync on the Client-Side">
Implement PowerSync in your app using one of our Client SDKs:
Expand Down
6 changes: 3 additions & 3 deletions resources/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ Troubleshooting techniques depend on the type of issue:
4. **Writes to the backend database are failing:** PowerSync is not actively involved: use normal debugging techniques (server-side logging; client and server-side error tracking).
5. **Updates are slow to sync, or queries run slow**: See [Performance](/resources/troubleshooting#performance)

### Diagnostics app
### Sync Diagnostics Client

Access the diagnostics app here: [https://diagnostics-app.powersync.com](https://diagnostics-app.powersync.com)
Access the Sync Diagnostics Client here: [https://diagnostics-app.powersync.com](https://diagnostics-app.powersync.com)

This is a standalone web app that presents data from the perspective of a specific user. It can be used to:

Expand Down Expand Up @@ -63,7 +63,7 @@ Essentially, run the following to grab the SQLite file:
</Tab>
</Tabs>

Our [diagnostics app](/resources/troubleshooting#diagnostics-app) and several of our [demo apps](/resources/demo-apps-example-projects) also contain a SQL console view to inspect the local database contents. Consider implementing similar functionality in your app. See a React example [here](https://github.com/powersync-ja/powersync-js/blob/main/tools/diagnostics-app/src/app/views/sql-console.tsx).
Our [Sync Diagnostics Client](/resources/troubleshooting#sync-diagnostics-client) and several of our [demo apps](/resources/demo-apps-example-projects) also contain a SQL console view to inspect the local database contents. Consider implementing similar functionality in your app. See a React example [here](https://github.com/powersync-ja/powersync-js/blob/main/tools/diagnostics-app/src/app/views/sql-console.tsx).

### Client-side Logging

Expand Down
2 changes: 1 addition & 1 deletion resources/usage-and-billing/usage-and-billing-faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Data hosted can temporarily spike during Sync Rule deployments and defragmentati
![](/images/resources/instance-logs-sync-stream-complete.png)
</Frame>
## 3. **Compare Metrics**
Use the [Diagnostics app](https://github.com/powersync-ja/powersync-js/tree/main/tools/diagnostics-app) to compare total rows vs. operations synced to the user device. If you are seeing a much higher number of operations, you might benefit from [defragmentation](/usage/lifecycle-maintenance/compacting-buckets#defragmenting).
Use the [Sync Diagnostics Client](https://github.com/powersync-ja/powersync-js/tree/main/tools/diagnostics-app) to compare total rows vs. operations synced to the user device. If you are seeing a much higher number of operations, you might benefit from [defragmentation](/usage/lifecycle-maintenance/compacting-buckets#defragmenting).
## 4. **Detailed Sync Operations**
- Use the [test-client](https://github.com/powersync-ja/powersync-service/blob/main/test-client/src/bin.ts)'s `fetch-operations` command with the `--raw` flag:

Expand Down
8 changes: 4 additions & 4 deletions self-hosting/installation/client-side-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ We recommend splitting up your client-side implementation into four phases:
<CardGroup>
<Card title="Generate development token" icon="key" href="/self-hosting/installation/client-side-setup#1-generate-development-token" horizontal />

<Card title="Run Diagnostics app" icon="bug" href="/self-hosting/installation/client-side-setup#2-run-the-diagnostics-app-using-a-development-token" horizontal />
<Card title="Run Sync Diagnostics Client" icon="bug" href="/self-hosting/installation/client-side-setup#2-run-the-sync-diagnostics-client-using-a-development-token" horizontal />

<Card title="Use client SDK with token" icon="code" href="/self-hosting/installation/client-side-setup#3-use-the-client-sdk-with-development-token" horizontal />

Expand Down Expand Up @@ -70,9 +70,9 @@ const token = await new jose.SignJWT({})
console.log(token);
```

## 2. Run the Diagnostics app using a development token
## 2. Run the Sync Diagnostics Client using a development token

With the [Diagnostics web app](https://github.com/powersync-ja/powersync-js/tree/main/tools/diagnostics-app) you can quickly inspect a user's local database. By using this you can confirm that the PowerSync Service configuration and sync rules behave as expected without needing to set up authentication or app UI.
With the [Sync Diagnostics Client](https://github.com/powersync-ja/powersync-js/tree/main/tools/diagnostics-app) you can quickly inspect a user's local database. By using this you can confirm that the PowerSync Service configuration and Sync Rules behave as expected without needing to set up authentication or app UI.

The app is currently available at [https://diagnostics-app.powersync.com](https://diagnostics-app.powersync.com/)

Expand All @@ -87,7 +87,7 @@ Enter your PowerSync Service endpoint (see the port number specified in your con
<Info>
**Checkpoint:**

Inspect your global bucket and synced table (from the [PowerSync Service Setup](/self-hosting/installation/powersync-service-setup) section) in the diagnostics app — these should match the sync rules you [defined previously](/self-hosting/installation/powersync-service-setup#1.sync-rules).
Inspect your global bucket and synced table (from the [PowerSync Service Setup](/self-hosting/installation/powersync-service-setup) section) in the Sync Diagnostics Client — these should match the sync rules you [defined previously](/self-hosting/installation/powersync-service-setup#1.sync-rules).
</Info>

## 3. Use the Client SDK with a development token
Expand Down
2 changes: 1 addition & 1 deletion tutorials/self-host/generate-dev-token.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Development tokens are useful for:

Development tokens can be used either with the
- [test-client](https://github.com/powersync-ja/powersync-service/tree/main/test-client), or
- [the diagnostics app](/resources/troubleshooting#diagnostics-app)
- [Sync Diagnostics Client](/resources/troubleshooting#sync-diagnostics-client)

# Generate a Development Token
Development tokens can be generated via either
Expand Down
4 changes: 2 additions & 2 deletions usage/lifecycle-maintenance/compacting-buckets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@

You should consider defragmenting your buckets when:

1. **High Operations-to-Rows Ratio**: If you notice that the number of operations significantly exceeds the number of rows in a bucket. You can inspect this using the [Diagnostics app](https://github.com/powersync-ja/powersync-js/tree/main/tools/diagnostics-app).
1. **High Operations-to-Rows Ratio**: If you notice that the number of operations significantly exceeds the number of rows in a bucket. You can inspect this using the [Sync Diagnostics Client](https://github.com/powersync-ja/powersync-js/tree/main/tools/diagnostics-app).
2. **Frequent Updates**: Tables that are frequently updated (e.g., status fields, counters, or audit logs)
3. **Large Data Churn**: Tables where you frequently insert and delete many rows

Expand All @@ -154,7 +154,7 @@
2. **Scheduled Defragmentation**
- Set up a cron job to regularly update rows
- Recommended for frequently updated tables or tables with large churn
- Example using pg_cron:

Check warning on line 157 in usage/lifecycle-maintenance/compacting-buckets.mdx

View check run for this annotation

Mintlify / Mintlify Validation (powersync) - vale-spellcheck

usage/lifecycle-maintenance/compacting-buckets.mdx#L157

Did you really mean 'pg_cron'?
```sql
-- Daily defragmentation for high-churn tables
UPDATE audit_logs SET last_updated = now()
Expand All @@ -173,7 +173,7 @@
Key considerations:
1. **Frequency**: More frequent defragmentation means fewer operations per sync but more frequent re-syncs
2. **Scope**: Defragmenting all rows at once is more efficient but causes a larger sync cycle
3. **Monitoring**: Use the [Diagnostics app](https://github.com/powersync-ja/powersync-js/tree/main/tools/diagnostics-app) to track operations-to-rows ratio
3. **Monitoring**: Use the [Sync Diagnostics Client](https://github.com/powersync-ja/powersync-js/tree/main/tools/diagnostics-app) to track operations-to-rows ratio

## Sync Rule deployments

Expand Down
2 changes: 1 addition & 1 deletion usage/tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mode: wide
<CardGroup>
<Card title="PowerSync Dashboard" icon="clapperboard" href="/usage/tools/powersync-dashboard" horizontal/>
<Card title="CLI (Beta)" icon="terminal" href="/usage/tools/cli" horizontal/>
<Card title="Diagnostics App" icon="stethoscope" href="https://github.com/powersync-ja/powersync-js/tree/main/tools/diagnostics-app" horizontal/>
<Card title="Sync Diagnostics Client" icon="stethoscope" href="https://github.com/powersync-ja/powersync-js/tree/main/tools/diagnostics-app" horizontal/>
<Card title="Monitoring and Alerting" icon="bell" href="/usage/tools/monitoring-and-alerting" horizontal/>
<Card title="CloudCode (for MongoDB Backend Functionality)" icon="database" href="/usage/tools/cloudcode" horizontal/>
</CardGroup>
2 changes: 1 addition & 1 deletion usage/tools/diagnostic-app.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
title: Diagnostics App
title: Sync Diagnostics Client
url: https://github.com/powersync-ja/powersync-js/tree/main/tools/diagnostics-app
---