cloudbase-document-database-web-sdk

Query and mutate CloudBase document database data from browsers using @cloudbase/js-sdk.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mrpersimmon/xiao-han-studio --skill cloudbase-document-database-web-sdk-mrpersimmon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudbase-document-database-web-sdk
Source: https://github.com/mrpersimmon/xiao-han-studio/tree/main/.agents/skills/cloudbase/references/no-sql-web-sdk
Command: npx skills add https://github.com/mrpersimmon/xiao-han-studio --skill cloudbase-document-database-web-sdk-mrpersimmon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Helps you build browser-side CRUD and querying logic for CloudBase document database using the Web SDK, including realtime updates, pagination, aggregation, and geolocation queries.

Core Features & Use Cases

  • Browser-side document CRUD: Create, read, update, and delete documents with @cloudbase/js-sdk.
  • Advanced querying: Use complex where() conditions, sorting, pagination controls, and field selection.
  • Analytics & realtime: Run aggregation pipelines (aggregate().group().end()) and listen to live changes via watch().
  • Location-aware data: Perform geo queries with db.Geo types and required geo indexes.
  • Security-rule aware coding: Guides correct initialization patterns, auth expectations, write verification, and common permission gotchas.

Quick Start

Use the CloudBase Web SDK with a shared cloudbase.init({ env }) instance to query and update a collection based on the user’s auth state and the collection’s security rules.

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 query and manage CloudBase document database data from a web browser?

To manage CloudBase document database data from the browser, use the @cloudbase/js-sdk to initialize a shared instance and perform CRUD operations. It handles browser-side querying, complex filtering, and data mutations directly through Web frontend scenarios.

How do I set up realtime watch listeners for NoSQL data in a web application?

Set up realtime NoSQL watch listeners in your web application by using the SDK's watch() method on a CloudBase collection. This establishes live change listeners that automatically push database updates to your browser-side application.

Can I run aggregation analytics pipelines on CloudBase data using the Web SDK?

You can run aggregation analytics on CloudBase data using the Web SDK by chaining aggregation pipeline methods. Execute the pipeline using the .end() method to process and retrieve aggregated NoSQL data results directly within your browser-side logic.

Does the CloudBase Web SDK support geolocation queries and pagination?

The CloudBase Web SDK supports both geolocation queries and pagination. Use db.Geo types with required geo indexes for location-aware data, and apply pagination controls alongside sorting and field selection for advanced NoSQL querying.

Why do my CloudBase database write operations fail in the browser?

CloudBase database write operations fail in the browser when requests do not align with collection security rule validation semantics. Correct initialization, auth-aware request handling, and verifying user auth state are required to resolve permission gotchas.

What should I check when adding documents to a CloudBase collection returns unexpected results?

When adding documents to a CloudBase collection, verify that the add method returns result._id as the unique identifier. Ensure your browser-side logic correctly handles this response structure alongside proper SDK initialization and security rule alignment.