relational-database-web-cloudbase

Initialize a shared CloudBase Relational Database client for browser apps.

Updated Dec 24, 2025
One-click install
npx skills add https://github.com/baiyongping/cowork-platform --skill relational-database-web-cloudbase-baiyongping
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: relational-database-web-cloudbase
Source: https://github.com/baiyongping/cowork-platform/tree/main/.claude/skills/relational-database-web
Command: npx skills add https://github.com/baiyongping/cowork-platform --skill relational-database-web-cloudbase-baiyongping

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Frontend web apps often struggle to securely initialize and share a CloudBase Relational Database client; this Skill standardizes an initialization pattern so browsers can perform Supabase-like queries via the CloudBase SDK.

Core Features & Use Cases

  • Canonical frontend init: create a single, reusable db client via cloudbase.init and app.rdb().
  • Supabase-style querying in the browser: use db.from(...) with familiar methods to read and mutate data.
  • Cross-app client sharing: ensure a single shared db instance across React, Vue, or vanilla JS apps.

Quick Start

Initialize CloudBase with your env and export a single db client for reuse.

Frequently Asked Questions about relational-database-web-cloudbase

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

FAQPage Schema
How do I initialize a CloudBase relational database in a web app?

Initialize a CloudBase relational database by calling cloudbase.init with your env, then access the db client via app.rdb(). This creates a single, reusable instance for browser-based queries.

Can I perform Supabase-style queries using the CloudBase JavaScript SDK?

Yes, you can perform Supabase-style queries using the CloudBase JavaScript SDK. After initialization, use the db.from(...) method with familiar query functions to read and mutate data directly in the browser.

What is the best way to share a single CloudBase db client across React or Vue?

The best way to share a CloudBase db client across React or Vue is synchronous initialization. Export the initialized app.rdb() instance from a single module to ensure cross-app reuse without reinitialization.

Do I need to reinitialize the CloudBase db client for every query in a frontend app?

No, you do not need to reinitialize the CloudBase db client for every query. The canonical frontend initialization pattern creates a single shared db instance that remains reusable across your web application.

Does the CloudBase web SDK support relational database queries in the browser?

Yes, the @cloudbase/js-sdk supports relational database queries in the browser. It provides a standard initialization pattern enabling web apps to execute Supabase-style data operations directly on the client side.

Why does my CloudBase app.rdb() initialization fail in a vanilla JavaScript app?

CloudBase app.rdb() initialization fails if cloudbase.init is not called synchronously with a valid env first. Ensure you follow the canonical pattern to properly establish the shared db client before querying.