cloudbase-document-database-web-sdk

Perform CloudBase document database CRUD and advanced queries from browsers via @cloudbase/js-sdk.

Updated May 14, 2026
One-click install
npx skills add https://github.com/williamwang25/ams-admin --skill cloudbase-document-database-web-sdk-williamwang25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudbase-document-database-web-sdk
Source: https://github.com/williamwang25/ams-admin/tree/main/.windsurf/skills/cloudbase/references/no-sql-web-sdk
Command: npx skills add https://github.com/williamwang25/ams-admin --skill cloudbase-document-database-web-sdk-williamwang25

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps you reliably use the CloudBase document database Web SDK to perform CRUD operations and advanced queries from a browser while avoiding common initialization, permission, and result-shape pitfalls.

Core Features & Use Cases

  • Web SDK CRUD: Query, create, update, and delete documents via @cloudbase/js-sdk in a browser app.
  • Advanced querying: Support complex filters, sorting, field selection, pagination, and aggregation pipelines.
  • Realtime listeners & geo queries: Use .watch() for realtime updates and perform geolocation searches with required geo indexing.
  • Security-rules awareness: Apply correct permission patterns (including CUSTOM rules) and handle rule propagation/caching delays.

Quick Start

Use this skill when you need a browser-side page or component to read and write CloudBase document database data through app.database() and db.collection() using the Web SDK.

Frequently Asked Questions about cloudbase-document-database-web-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform CRUD operations on a CloudBase document database from a web browser?

To perform CloudBase document database CRUD operations in a web browser, initialize the @cloudbase/js-sdk, authenticate, and use app.database() with db.collection() to query, create, update, and delete documents.

How do I set up realtime listeners for CloudBase database queries using the Web SDK?

To set up realtime listeners for CloudBase database queries, use the .watch() method provided by the Web SDK. This enables your browser-side application to receive live, realtime updates whenever watched documents change.

Can I run geolocation queries and pagination with the CloudBase Web SDK?

Yes, you can run geolocation queries and pagination with the CloudBase Web SDK. Geolocation searches require proper geo indexing, while pagination and complex where filters are natively supported for advanced querying.

Why are my CloudBase database queries failing due to permission errors in the browser?

CloudBase database queries fail due to permission errors when usage is not aligned with security rules. Ensure correct authentication handling and apply proper permission patterns, including CUSTOM rules, while accounting for rule propagation and caching delays.

How do I capture the correct document ID after creating a CloudBase database record?

To capture the correct document ID after creating a CloudBase database record, extract the unique identifier from the result shape using result._id. Accurate result ID capture is required for subsequent updates or deletion.

Does the CloudBase Web SDK support aggregation pipelines for NoSQL database operations?

Yes, the CloudBase Web SDK supports aggregation pipelines for NoSQL database operations. You can process complex data transformations directly in the browser alongside field selection, sorting, and advanced where filters.