Add Authentication to a UniApp Project with CloudBase
Use @cloudbase/adapter-uni-app in a UniApp project to integrate CloudBase Auth. One codebase runs across H5, WeChat Mini Program, Alipay Mini Program, Douyin Mini Program, iOS, and Android with shared login state.
Add Authentication to a Web React Project with CloudBase SDK
Use @cloudbase/js-sdk in a Vite + React 18 project to integrate CloudBase Authentication. Covers SMS Verification Code, email verification code, and WeChat QR Login, with persistent login state and a Route Guard.
Add CloudBase AI (DeepSeek / Hunyuan) to a WeChat Mini Program
Use wx.cloud.extend.AI to call DeepSeek / Hunyuan and other CloudBase platform models directly from a Mini Program frontend, consume textStream with for-await for streaming output, no self-hosted LLM gateway required.
Add CloudBase AI (DeepSeek / Hunyuan) to Next.js
Use @cloudbase/node-sdk in a Next.js Route Handler to call CloudBase AI streamText, convert AsyncIterable to ReadableStream for the frontend, and consume the streaming response in a Client Component with fetch + getReader.
Add CloudBase Authentication to Next.js
Use @cloudbase/js-sdk in a Next.js 14+ App Router project to integrate anonymous/SMS/WeChat QR Login, store login state in cookies, read identity in Server Components via cookies(), and intercept unauthenticated requests with middleware.
Add CloudBase Authentication to WeChat Mini Programs
Use @cloudbase/js-sdk@2.27.3 + @cloudbase/adapter-wx_mp@1.3.1 to let a WeChat Mini Program log in to a standalone CloudBase Environment using a ticket issued by a Cloud Function.
Build RAG with CloudBase PostgreSQL + pgvector
Enable the pgvector extension on CloudBase PostgreSQL, write a pair of ingest / retrieve Cloud Functions, and run the complete RAG pipeline: document chunking → embeddings → vector search → prompt assembly → LLM answer.
Call a CloudBase Cloud Function in WeChat Mini Program
Use wx.cloud.callFunction to call a Cloud Function directly from a Mini Program. The Cloud Function side uses wx-server-sdk to automatically obtain the OPENID — no auth token required, BaaS-style calls.
Deploy a React SPA to CloudBase Hosting
Run vite build to generate dist, upload to CloudBase static website Hosting via tcb hosting deploy, get automatic CDN acceleration + HTTPS; configure index.html as the error page fallback in the Console to resolve React Router refresh 404s.
Deploy a Vue SPA to CloudBase Hosting
Run vite build to generate dist, upload to CloudBase static website Hosting via tcb hosting deploy, get automatic CDN acceleration + HTTPS; configure index.html as the error page fallback for Vue Router history mode.
File Upload in WeChat Mini Program with CloudBase Cloud Storage
Use wx.chooseMedia to select media, upload to Cloud Storage via @cloudbase/js-sdk's uploadFile, store the fileID in the database, and render with getTempFileURL. Covers cloudPath naming, Temporary URL caching, and Security Rules.
Parameterized Sharing and Conversion Funnel in WeChat Mini Program
Use onShareAppMessage / onShareTimeline to embed inviter and other parameters in share links, store incoming data to CloudBase Database on the receiving end, and generate parameterized wxacode posters via Cloud Functions.
Read and Write CloudBase Database in Next.js Server Components
Use @cloudbase/node-sdk to directly await the database in a Next.js App Router Server Component, write data via Server Action, refresh the cache with revalidatePath, and let Client Components receive results through Server Actions.
Read and Write CloudBase Database in WeChat Mini Program
After login, use the db API from @cloudbase/js-sdk to perform collection CRUD, conditional queries, and real-time watch subscriptions in a WeChat Mini Program frontend, including Permission Mode selection and unsubscribe considerations.
Realtime Notifications with CloudBase Database watch
In a WeChat Mini Program with authentication already integrated, use db.collection().watch() to push order status updates, message alerts, and online presence sync. Covers the initial snapshot, docChanges increments, connection management, and when to call close().
Run Cron Jobs with CloudBase Cloud Function Timer Triggers
Configure a timer trigger in cloudbaserc.json to run daily reports, data cleanup, and cache warming. Covers the 7-field cron format, idempotency for duplicate-run prevention, and failure alerts via WeCom webhook.
Send WeChat Mini Program Subscribe Messages via Cloud Function
The Mini Program frontend obtains user authorization via wx.requestSubscribeMessage, the server uses cloud.openapi.subscribeMessage.send to deliver messages, covering differences between one-time and long-term subscriptions and handling of 43101/47003 errors.
Streaming Chatbot on CloudBase: Three Implementation Paths
Use the official cloudbase-agent-ui component, hand-written SSE + Cloud Function, or Vercel AI SDK to build a streaming chat interface on CloudBase — pick the path that fits your team, frontend, and complexity.