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 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.
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.
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.
Fix Common CloudBase Authentication Errors in WeChat Mini Programs
The 10 most common errors when integrating CloudBase Custom Login in WeChat Mini Programs: symptoms, root causes, and fixes with code.
Migrate from WeChat-native Cloud Development to Standalone CloudBase
Progressively replace wx.cloud calls in a WeChat Mini Program with @cloudbase/js-sdk, switching to a standalone CloudBase Environment for multi-platform reuse.
Optimize Cold Start Performance for WeChat Mini Program Cloud Functions
Four actionable techniques to reduce CloudBase Cloud Function cold start latency: move initialization out of the handler, trim dependencies, tune memory, and enable Per-instance Concurrency. Full code included.
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 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().
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.