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.
Deploy a Next.js 14+ App Router Application to CloudBase Run
Use standalone output + a multi-stage Dockerfile + tcb cloudrun deploy to deploy a Next.js application to CloudBase Run in one shot, with SSR, streaming, custom domains, and environment variables.
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.