Repository navigation
Rework the SDK guide: example app, localhost development, generated API reference - #100
Merged
Merged
Conversation
…a generated API reference Add a Worklog example app under examples/worklog and rewrite the tutorial around it. New pages cover developing on localhost, sign-in and collections, work before connecting, React, the UI components and the developer kit. The overview now says why to build on mdbase, how an app is published, and where to ask for help. The API reference is generated from the SDK's type declarations, and CI checks the example builds and the reference is current.
Contributor
Author
|
The server and SDK change this guide depends on: mdbase-dev/mdbase-connect#1381. Keep this draft until an |
callumalpass
marked this pull request as ready for review
November 10, 2026 11:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reworks the SDK guide so an outside developer can go from an empty folder to a deployed, signed-in app.
Developing on
http://localhostneeds an@mdbase-dev/sdkrelease that contains mdbase-dev/mdbase-connect#1381; the tutorial says so. After that release: bump the SDK pin inexamples/worklog/package.json, runnpm installthere, runpnpm build:sdk-api, and replace "a release after 0.1.0-beta.168" in the tutorial with the version.What changes
examples/worklog/is a small Vite + React app (a type pack, a manifest script, sign-in, live queries, writes, work before connecting). The tutorial at/sdk/connect-quickstart/is now "Build an app" and imports its code blocks from those files, so the page cannot drift from code that builds./sdk/local-development/): what is accepted, the development manifest, what the user sees on the approval screen, what the redirect URI is for, and a table of common problems./sdk/lifecycle/: phases,addCollection,reauthorize,requestAccess, setup, sign-out, problems, sign-in outside a popup), Work before connecting (/sdk/unsynced/), React (/sdk/react/), UI components (/sdk/ui/), Developer kit (/sdk/connect-dev/).scripts/build-sdk-api.mjsreads the SDK's declarations with the TypeScript compiler and writessrc/data/sdk-api.json(531 exports, 15 error codes). The page renders that file.pnpm check:sdk-apifails if it is out of date.pnpm check:sdk-api.Decisions to review
AppSwitcheris documented as listing only mdbase's own three apps.src/data/sdk-api.jsonis committed, so the site build does not need the example installed.Checks
pnpm check: 0 errorspnpm build: 66 pages;pnpm index:site;pnpm check:links: no broken local linksnode --test scripts/*.test.mjs: 26 passpnpm check:sdk-api: currentexamples/worklog:npm run checkandnpm run buildpassNot checked:
pnpm import:specneeds a siblingmdbase-specbuild that the worktree does not have. Sign-in fromhttp://localhostagainst production cannot be exercised until the server change is deployed and an SDK is published; the example was run locally in the unsynced phase and against the SDK's own checks.