Skip to content

Commit 9e49835

Browse files
authored
Merge pull request #127 from sqlitecloud/tiziano/update-dashboard-screenshot
Update dashboard docs
2 parents 6f06a18 + be417b0 commit 9e49835

File tree

11 files changed

+252
-55
lines changed

11 files changed

+252
-55
lines changed

sqlite-cloud/connect-cluster.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ SQLite databases in SQLite Cloud are distributed across a cluster of nodes. Each
1010

1111
Click "Connect" in the bottom left-hand corner of your dashboard to get your connection string to use with a SQLite Cloud client library.
1212

13+
14+
---
15+
16+
1317
## Connecting with JavaScript
1418
Here's an example of how you can connect to your cluster using the `@sqlitecloud/drivers` JavaScript client library:
1519

@@ -33,6 +37,8 @@ fetchAlbums().then((albums) => console.log(albums));
3337
// [{ Title: 'For Those About To Rock We Salute You', ... }, ...]
3438
```
3539

40+
---
41+
3642
## Connecting with Python
3743
Install the Python client library:
3844

@@ -59,6 +65,8 @@ conn.close()
5965
# (1, 'For Those About To Rock We Salute You', 1)
6066
```
6167

68+
---
69+
6270
## Next Steps
6371
- [Creating a database](/docs/create-database)
6472
- [Writing data](/docs/write-data)

sqlite-cloud/create-database.mdx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ status: publish
66
slug: create-database
77
---
88

9+
import VideoPlayer from '@commons-components/Video/VideoPlayer.astro';
10+
import uploadDb from '@docs-website-assets/introduction/video/dashboard_upload_db.mp4';
11+
import createDb from '@docs-website-assets/introduction/video/dashboard_create_db.mp4';
12+
913
You can import an existing SQLite databases, or create new databases using the SQLite Cloud UI, API, or client libraries.
1014

15+
---
16+
1117
## Uploading an existing SQLite Database
1218
### Via HTTP API
1319
You can upload an existing SQLite database to your cluster using the SQLite Cloud UI or the Weblite API.
@@ -26,17 +32,21 @@ To upload a local SQLite database via the SQLite Cloud UI, navigate to the Datab
2632

2733
### Via Dashboard UI
2834
To import a database from the UI, navigate to the Databases tab and click the "Upload Database" button.
29-
![Dashbord Upload Database](@docs-website-assets/introduction/dashboard_upload_db.png)
3035

3136
Select the database file you want to upload, and click "Upload Database". The database will be available in your cluster within a few minutes.
3237

38+
<VideoPlayer src={uploadDb} />
39+
40+
---
41+
3342
## Creating a new database
3443
### From the Dashboard
3544

3645
To create a new database from the SQLite Cloud UI, navigate to the Databases tab and click the "Create Database" button.
37-
![Dashboard Create Database](@docs-website-assets/introduction/dashboard_create_database.png)
3846

3947
The default encoding is set to UTF-8, and the default page size is 4096KB.
48+
<VideoPlayer src={createDb} />
49+
4050

4151
### From the API
4252
To create a new database or upload an existing database via [Weblite](/docs/weblite), our REST API, you can make a request with the following parameters:

sqlite-cloud/platform/analyzer.mdx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,32 @@ category: platform
55
status: publish
66
slug: analyzer
77
---
8+
import VideoPlayer from '@commons-components/Video/VideoPlayer.astro';
9+
import enableAnalyzer from '@docs-website-assets/introduction/video/dashboard_enable_query_analyzer.mp4';
10+
import applyAnalyzer from '@docs-website-assets/introduction/video/dashboard_analyzer_apply_suggestion.mp4';
11+
812

913
The Analyzer panel is a powerful tool that collects and categorizes all the queries executed on your cluster based on their execution time. It allows for intelligent and proactive analysis, and provides recommendations on which indexes to use to optimize frequently used queries.
1014

11-
![Dashboard Empty Analyzer](@docs-website-assets/introduction/dashboard_analyzer_empty.png)
15+
---
16+
17+
## Getting Started
1218

1319
By default, the Analyzer is turned off to avoid a small performance penalty. However, you can enable it by accessing the Settings button and setting the `query_analyzer_enabled` flag to 1, then pressing Save. You can also adjust the `query_analyzer_threshold` flag to set the minimum threshold query time (in milliseconds) that triggers a query to be included in the Analyzer. If the default value is too low, it's recommended to increase it to avoid having too many queries included in the panel.
20+
<VideoPlayer src={enableAnalyzer} />
21+
1422

15-
![Dashboard Analyzer Settings](@docs-website-assets/introduction/dashboard_analyzer_settings.png)
23+
----
24+
## Testing the Analyzer
25+
To test the Analyzer, we can go to the `Studio -> chinook.sqlite -> SQL Console` section and perform a query that filters the non-indexed Composer column of the Track table with the following statement: `SELECT * FROM Tracks WHERE Composer = 'AC/DC'`;
26+
<VideoPlayer src={applyAnalyzer} />
1627

17-
To test the Analyzer, we can go to the `Databases -> Chinook.sqlite -> Console` section and perform a query that filters the non-indexed Composer column of the Track table with the following statement: `SELECT * FROM Tracks WHERE Composer = 'AC/DC'`;
1828

19-
![Dashboard Analyzer Console](@docs-website-assets/introduction/dashboard_analyzer_console.png)
2029

21-
Once we have executed this query, we can go back to the Analyzer panel and see that it has been successfully analyzed by the **nemtfenosk** node.
30+
Once we have executed this query, we can go back to the Analyzer panel and see that it has been successfully analyzed by the **nxidiwbuhz** node.
2231

23-
![Dashboard Analyzer Query](@docs-website-assets/introduction/dashboard_analyzer_query.png)
2432

2533
By selecting **Details** and **Plan**, we can get more in-depth information about the execution of this query over time. However, what we're most interested in is the intelligent recommendation, which can be found by selecting **Suggest**. In the Indexes field, we can find the optimal index to apply to our database, which will speed up all queries on the Track table filtered by the Composer column.
2634

27-
![Dashboard Analyzer Suggestion](@docs-website-assets/introduction/dashboard_analyzer_suggest.png)
2835

2936
To apply the recommended index(es), simply select **Apply** and they will be automatically written and distributed in the `Chinook.sqlite` database.

sqlite-cloud/platform/apikey.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ To create an API key for a user, click on the **Create API KEY** button.
1616

1717
![Dashboard Create APIKEY](@docs-website-assets/introduction/dashboard_create_apikey.png)
1818

19-
The resulting table will display all the API keys associated with each user, along with their name and restrictions.
19+
The resulting table will display all the API keys associated with each user, along with their name.
2020
![Dashboard List APIKEY](@docs-website-assets/introduction/dashboard_list_apikey.png)

sqlite-cloud/platform/backups.mdx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@ status: publish
66
slug: backups
77
---
88

9-
## Overview
10-
Backups provide a robust solution for mitigating data loss and resolving data corruption issues. Backups are available for databases in all [Pro and Scale](https://www.sqlitecloud.io/pricing) projects.
9+
import VideoPlayer from '@commons-components/Video/VideoPlayer.astro';
10+
import enableDisableBackup from '@docs-website-assets/introduction/video/dashboard_enable_disable_backup.mp4';
11+
import restoreBackup from '@docs-website-assets/introduction/video/dashboard_restore_backup.mp4';
12+
13+
Backups provide a robust solution for mitigating data loss and resolving data corruption issues. Backups are available for databases in all [Dev, Pro and Startup](https://www.sqlitecloud.io/pricing) projects.
1114

1215
SQLite Cloud creates a full snapshot backup of your data once a day, and stores incremental changes once per second, on commodity object storage.
1316

17+
----
18+
1419
## Features
1520

1621
#### Automated Backups
@@ -20,21 +25,17 @@ SQLite Cloud creates a full snapshot backup of your data once a day, and stores
2025
- **Easy Restoration Process**: Restoring from a backup automatically overwrites the existing database, seamlessly reverting it to the desired state without additional configuration.
2126
- **Consistency and Reliability**: After restoration, the database functions as it did at the chosen point in time, ensuring operational continuity.
2227

23-
## Getting Started
24-
Setting up and managing backups in SQLite Cloud is designed to be straightforward, allowing you to implement robust data protection strategies effortlessly.
25-
26-
First, navigate to the backups section.
2728

28-
![Backup Empty](@docs-website-assets/introduction/backup_empty.png)
29+
---
2930

30-
Then, click on settings to see a list of your databases. From here, you can enable backups for each database.
31-
![Backup Modal](@docs-website-assets/introduction/backup_modal.png)
31+
## Getting Started
32+
Setting up and managing backups in SQLite Cloud is designed to be straightforward, allowing you to implement robust data protection strategies effortlessly.
3233

33-
Click save, and your database backups will appear below.
34-
![Backup Items](@docs-website-assets/introduction/backup_items.png)
34+
<VideoPlayer src={enableDisableBackup} />
3535

36-
### Restoring from a Backup
36+
---
37+
## Restoring from a Backup
3738

3839
Click on a backup to begin the restore process. Select Yes to confirm the restoration, and your database will be restored to the selected point in time.
3940

40-
![Restore Backup](@docs-website-assets/introduction/restore_backup.png)
41+
<VideoPlayer src={restoreBackup} />

sqlite-cloud/platform/edge-functions.mdx

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ category: platform
55
status: publish
66
slug: edge-functions
77
---
8+
import VideoPlayer from '@commons-components/Video/VideoPlayer.astro';
9+
import edgeFunctions from '@docs-website-assets/introduction/video/dashboard_edge_functions.mp4';
10+
11+
import Callout from "@commons-components/Information/Callout.astro";
812

913
Edge functions let you define custom logic to run on the same nodes as your database files for ultra-fast performance.
1014

@@ -14,12 +18,16 @@ Edge functions can be called remotely over HTTP or Websockets via API, or trigge
1418

1519
Turning on linearizable reads ensures strong consistency, but may introduce some latency. When eventual consistency is sufficient, we recommend leaving linearizable reads off.
1620

21+
---
22+
1723
## Getting Started
18-
1. Navigate to the Edge Functions page from your dashboard.
19-
2. Under "Development", select "Edge Function", then click the "Create" button.
20-
3. Write and test your function.
21-
1. Select the database you want to access and an API key if necessary
22-
2. When you're finished, click deploy.
24+
25+
Use the **Edge Functions panel** to effortlessly create, deploy, and test Edge Functions directly in the SQLite Cloud dashboard.
26+
The editor allows you to choose the language of your function — **JavaScript**, **TypeScript**, or **SQL** — and connect it to the database of your choice.
27+
28+
Once deployed, the function can be tested immediately in the dashboard or invoked externally through its Function URL.
29+
30+
<VideoPlayer src={edgeFunctions} />
2331

2432
#### Note:
2533
Functions should return a JSON-serializable object with a data field:
@@ -31,23 +39,37 @@ return {
3139
}
3240
```
3341

42+
43+
44+
<Callout type="note">
45+
Enabling **linearizable reads** guarantees strong consistency but may introduce additional latency.
46+
For most cases, we recommend keeping it disabled to benefit from lower response times.
47+
</Callout>
48+
49+
50+
### Function Details
51+
52+
In the **Details** tab you will find key information about your function, including:
53+
54+
- The **last deployment date and time**
55+
- The **Function URL**, which you can use to call the function from external applications
56+
57+
![Edge Function Details](@docs-website-assets/introduction/dahsboard-edge-function-details.png)
58+
59+
60+
3461
### Authorization
35-
Edge functions that access your SQLite databases must be authorized via API key. You can automatically authorize an edge function on every call by assigning it an API key via the "API KEY" dropdown.
62+
Edge functions that access your SQLite databases must be authorized via API key.
3663

37-
If no API key is assigned, an API key must be sent in the request url as a query parameter (`?apikey=YOUR_API_KEY`) or as an attribute in the request body (`{ apikey: YOUR_API_KEY }`).
64+
An API key must be sent in the request url as a query parameter (`?apikey=YOUR_API_KEY`) or as an attribute in the request body (`{ apikey: YOUR_API_KEY }`).
3865

3966
### Execution
4067

4168
Edge functions can be called via HTTP GET and POST methods. You can pass additional values to your edge function in two ways:
4269
- Query parameters: Accessible via `request.params`
4370
- Request body: Accessible via `request.data`
4471

45-
### Testing
46-
You may test the execution of edge functions by clicking the "Test" command.
47-
48-
You are not required to supply an API key when testing your edge function in the console. The function will run using the dashboard user privileges.
49-
50-
72+
---
5173

5274
## Guides
5375
### Interacting with your Database
@@ -83,6 +105,9 @@ You can also add environment variables in the UI by navigating to the "Environme
83105
### Handling Errors
84106
In case of error we return an HTTP error code and a JSON with the error message. Manually throwing an error in your code results in a 500 response. You may also return an error.
85107

108+
109+
---
110+
86111
## Examples
87112

88113
### Assigning and Notifying a Support Rep on User Sign up

sqlite-cloud/platform/offsync.mdx

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@ status: publish
66
slug: offsync
77
---
88

9+
import VideoPlayer from '@commons-components/Video/VideoPlayer.astro';
10+
import enableSync from '@docs-website-assets/introduction/video/dashboard_sqlite_sync_enabling.mp4';
11+
import connectionUrlSync from '@docs-website-assets/introduction/video/dashboard_sync_connection_url.mp4';
12+
import devicesSync from '@docs-website-assets/introduction/video/dashboard_sync_devices.mp4';
13+
914
import Callout from "@commons-components/Information/Callout.astro";
1015

1116
OffSync is a powerful SQLite Cloud feature that enables true **local-first** data synchronization for your applications. Powered by the [SQLite Sync](https://github.com/sqliteai/sqlite-sync) extension, it allows you to build robust, offline-capable applications where data is stored and processed on edge devices and seamlessly synchronized with a central SQLite Cloud database.
1217

1318
This architecture is ideal for mobile apps, IoT devices, and any application requiring high availability and low latency, even with intermittent network connectivity. By leveraging Conflict-free Replicated Data Types (CRDTs), OffSync ensures that changes made offline are merged automatically and without conflicts when the device reconnects.
1419

20+
21+
---
22+
1523
## How It Works
1624

1725
OffSync extends standard SQLite tables with built-in support for offline work and automatic synchronization. This allows multiple devices to operate independently and then seamlessly merge their changes.
@@ -22,18 +30,33 @@ OffSync extends standard SQLite tables with built-in support for offline work an
2230

2331
When combined with [Row-Level Security (RLS)](/docs/rls), OffSync allows you to build secure, multi-tenant applications where each user's data is safely isolated, both on the edge and in the cloud.
2432

33+
34+
---
35+
2536
## Configuring OffSync
2637

27-
You can enable and manage OffSync for your databases directly from the SQLite Cloud dashboard.
38+
You can enable and manage OffSync for your databases directly from the SQLite Cloud dashboard.
39+
Below are the main steps:
40+
41+
### Enable Tables for Synchronization
42+
From the **Sync Tables** tab, select which tables in your database you want to keep synchronized.
43+
Once enabled, all changes to those tables will automatically sync with connected devices.
44+
45+
<VideoPlayer src={enableSync} />
46+
47+
48+
### Get the Connection String
49+
In the **Configuration** tab, copy the connection string.
50+
Use this in your application to initialize OffSync and connect your local SQLite database with SQLite Cloud.
2851

29-
1. **Navigate to the Databases Page**: From the main dashboard, go to the "Databases" page.
30-
2. **Select the Offsync Column**: In the list of your databases, click on the button in the "Offsync" column for the desired database.
52+
<VideoPlayer src={connectionUrlSync} />
3153

32-
![Dashboard Databases Page](@docs-website-assets/introduction/offsync-1.png)
3354

34-
3. **Enable Tables for Synchronization**: On the Offsync settings page, you will see a list of all tables in your database. Toggle the switch next to each table you want to enable for synchronization.
55+
### Manage Connected Devices
56+
In the **Devices** tab, you can view all devices currently connected to your database.
57+
Here you can check their sync status and remove devices if needed.
3558

36-
![Dashboard Offsync Settings Page](@docs-website-assets/introduction/offsync-2.png)
59+
<VideoPlayer src={devicesSync} />
3760

3861
<Callout type="note" title="Matching Schemas and Tables">
3962
For OffSync to work correctly, the list of tables configured for synchronization—and their corresponding schemas—must be identical in both your local SQLite database and your SQLite Cloud database.

0 commit comments

Comments
 (0)