Skip to content

sdk: use lumibase as the default client in standalone examples and Next.js tutorial #334

Description

@khuepm

Execution hiện hành — A03 Ready

🔎 Reviewer — Handoff exact-file và acceptance: #334 (comment). #332 đã Completed sau PR #468; lane A chờ session ACK, được bắt đầu scope A03. B02 độc lập. Quy tắc Git hiện tại: không tạo nhánh, tích hợp main tuần tự. Phần dependency/grant cũ bên dưới được thay bằng handoff này.

Parent: #331. Approved scope — 2026-09-06.

Outcome / acceptance

  • New consumer/example/tutorial default is SDK imports from lumibase, installed as a runtime dependency; keep @lumibase/sdk compatibility and its explicit typegen override.
  • examples/nextjs-blog runs independently of the monorepo, without workspace:* or undocumented setup. Audit apps/consumer before changing it; do not invent a second starter.
  • Use existing SDK commands/createLumiClient; raw fetch is an optional alternative, not the primary onboarding path.
  • Document backend/Studio prerequisite, site selection and safe public/least-privilege credentials; no admin token in browser bundles.
  • At least one verified example demonstrates lumibase types --check in CI where typegen applies.
  • Real install and published-content read evidence, plus compatible @lumibase/sdk coverage, feed v1 RC: validate unified npm packages and scaffolder compatibility #448. EN/VI Next.js tutorial changes land together after the contract is fixed, coordinated with docs: clarify create-lumibase starter vs full CMS vs lumibase CLI onboarding #333.

Dependencies: #450 then accepted #332 consumer contract. Lane A, not dispatched; exact file grants later. SDK changes only when needed for acceptance. Shared docs/manifests/workflows are coordinator-reserved.

Previous @lumibase/sdk-default proposal — superseded

Parent: #331

Problem

Tutorials still present raw fetch as an equal alternative to @lumibase/sdk. That weakens the “every consumer project installs the SDK” install surface and skips typegen / typed commands.

Proposed work

  • Make @lumibase/sdk the default client path in docs/en/tutorials/nextjs-quickstart.md (and VI).
  • Keep raw fetch only as a short “without the SDK” footnote if needed.
  • Ensure examples (examples/nextjs-blog, apps/consumer) document install of @lumibase/sdk and show a CI snippet for lumibase types --check where typegen applies.

Acceptance

  • Primary code samples use createLumiClient / SDK commands.
  • Examples’ README (or docs) tell readers to install @lumibase/sdk.
  • At least one example or tutorial shows lumibase types --check in CI.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions