Add the hello example as the default starter - #222
Merged
Merged
Conversation
A two-table schema newcomers can migrate without the ClickBench load. The examples manifest default is hello; clickbench stays selectable. Co-authored-by: Marc Höffl <marc.hoeffl@gmail.com>
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.
What shipped
examples/hellois a two-table ClickHouse schema (usersandevents) with one generated migration and no dataset load.examples/manifest.jsonlistshelloand sets it as the default. Getting Started, the with-an-example page, the agent instructions, and the root README point athello.clickbenchstays available as--example clickbench.No product package source was edited.
create-chkitreadsdefaultfromexamples/manifest.jsonand copies that file into the published package at build time (packages/create-chkit/scripts/copy-manifest.ts).How to run
Scaffold, then claim a free ObsessionDB dev instance in the connect prompt (or set
CLICKHOUSE_URLfor local ClickHouse):Or clone the folder:
cd examples/hello bun install bunx chkit obsessiondb signup bunx chkit obsessiondb service claim bun run migrateLocal ClickHouse instead of the claim:
export CLICKHOUSE_URL=http://localhost:8123 bun run migrateClickBench remains
bun create chkit@latest my-app --example clickbench.What I verified
bun installin a copy ofexamples/hello(and again inside the repo). Installedchkit,@chkit/core, and@chkit/plugin-obsessiondbat0.1.2-beta.7. The exampleoverridesresolved@orpc/clientand@orpc/contractto1.15.4.chkit generate --name create_hello_schemawrote the migration and snapshot (2 definitions, 3 safe operations). A second generate reported an empty plan and did not add a migration. That no-op rewritessnapshot.jsongeneratedAt; the committed snapshot is from the generation that wrote the SQL.tsc --noEmit --strictonsrc/db/schema/hello.tsandclickhouse.config.tspassed. The example has notypecheckorgeneratescript; those matchexamples/clickbench.scripts/check-examples-manifest.tspassed (2 examples).packages/create-chkit/src/examples.tsfrom source returnsdefault: "hello"and both example entries.packages/create-chkitunit tests passed (18).apps/docsproduction build succeeded (48 raw markdown pages). The sitemap description for Start with an example is the new hello summary. Built HTML includes--example helloand--example clickbench.bun verifywas not run:doppleris not installed here, and there is no ClickHouse service.Residual blockers
localhost:8123, and noCLICKHOUSE_*environment variables are set.bun run migratewas not applied.chkit obsessiondb signup, thenchkit obsessiondb service claim). That was not run.create-chkit default
The repository default is
helloviaexamples/manifest.json. Nopackages/create-chkitsource edit was required.create-chkit default flip needs engineer packet only to republish
create-chkitso the interactive prompt's bundled manifest includeshelloand highlights it. Until that publish,bun create chkit@latestwith no--examplestill prompts from the previously published manifest (default: clickbench, nohelloentry).--example hellodoes not consult that list: it downloadsgithub:obsessiondb/chkit/examples/hello#mainand works once this merges.packages/create-chkit/README.mdstill documents onlyclickbenchand was left unchanged.No changeset. This diff is examples, docs, and a root README line. A
create-chkitversion bump belongs with that republish.examples/hellois not a workspace package (unlikeexamples/clickbench), so the root lockfile is unchanged.bun installinside the folder installs it as its own project and writes a localbun.lock, which is not committed.