Skip to content

Commit c503b95

Browse files
docs(your-first-project): name the SQLite file, say the starter has no Console app, scope the npm 10 note (#29084)
<!-- claude-projects-attribution: {"github_login":"marchtian"} --> _Requested by **田騏** · [project thread](https://claude.ai/code/project/chan_01VmuUhXU9SSUzqJYyXSmYSi?thread=cmsg_01VmuUhXU9SSUzqJYyXSmYSi9paTx1Lu8ENYwwssthfK3h)_ Fixes #28958 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:官网「Your First Project」一页改三处——默认模板的数据存在项目内的 SQLite 文件 `.objectstack/data/objectstack.db`(不是内存);说明起步对象没有 app、所以 Console 导航里看不到它,并给出 `npx os generate app notes` 的补法;npm 10 警告收窄为「若仍遇到 edgesOut 再升级」。 - 为什么改:新手照官网跑完打开 Console 看到 "Your apps 0"、找不到自己的对象,会以为装坏了;页面还让每个 npm 10 用户无谓升级 npm。 - 风险与回滚:仅一页文档,不发布任何包;回滚即 revert 本 PR。 - 先看:`content/docs/getting-started/your-first-project.mdx` 的 Run it 段新增 callout(Console 导航说明),其次 Prerequisites 段的 npm 10 callout。 - 两分钟验证:`npm create objectstack@latest my-app && cd my-app && npm run dev`,预期启动横幅打印 `.objectstack/data/objectstack.db` 与 Console 链接;再跑 `npx os generate app notes`,重建后 Console 出现 Notes 导航。 - 需要你做的:无,席位落地。 ## What changes One file, `content/docs/getting-started/your-first-project.mdx` (+29 / -11): 1. **Prerequisites** — "the default template runs on an in-memory driver" becomes: data is stored in the SQLite file `.objectstack/data/objectstack.db` inside the project (git-ignored); records survive a restart; to start empty, stop the server and delete `.objectstack/data/`, or run `npx os dev --fresh`. 2. **npm 10 callout** — was a `warn` telling every npm 10 reader the CLI cannot be installed. It is now an `info` scoped to readers who actually see the `edgesOut` error: it names the versions the failure was measured on (10.9.4, 10.9.9), the cause (vitest 4's newest release had no matching `@vitest/browser-webdriverio`), that the matching release 4.1.12 is now published and npm 10.9.9 installs the CLI again (measured on 18.2.0), and keeps the npm 11 / pnpm / Troubleshooting remedies for anyone who still hits it. 3. **Run it** — the `npx os dev --ui` block is replaced: `npm run dev` already serves the Console at `/_console/` and prints its link and the database file on boot. A new callout says the starter ships no app, so `my_app_note` is in no Console navigation; that this is intended, not a broken install; that an object appears in navigation only when an app lists it; and that `npx os generate app notes` (or a coding agent, linking Build with Claude Code) adds one. Every statement is read off the source at the head: | Claim | Backed by | |:---|:---| | Default database is SQLite at `.objectstack/data/objectstack.db` in the project | `packages/runtime/src/resolve-project-database.ts` (`resolveDatabaseStateDir` → `projectRoot/.objectstack`; `UNIFIED_DEFAULT_DB_FILENAME = 'objectstack.db'`); `packages/cli/src/commands/dev.ts` `resolveDevDatabase` doc (in-memory engine no longer a boot store) | | Git-ignored | `packages/create-objectstack/src/templates/blank/_gitignore` lists `.objectstack/` | | `--fresh` gives a throwaway database | `packages/cli/src/commands/dev.ts` `fresh` flag description | | Banner prints the database and the Console link | `dev.ts` `printKV('Database', …)`; `packages/cli/src/utils/format.ts` `Console:` row | | `npm run dev` serves the Console without `--ui` | `packages/cli/src/commands/serve.ts` `ui` flag `default: true`; `packages/core/src/stack-auth.ts` `STACK_TIER_PRESETS.default` includes `ui` | | Starter ships no app; an object appears in navigation only when an app lists it | `packages/create-objectstack/src/templates/blank/README.md` "The Console — this starter ships no app" | | `os generate app NAME` binds the stack's only object and writes the barrel export line | `packages/cli/src/commands/generate.ts` `app` generator (`binds: { object: 'flag' }`, nav entry `objectName`), barrel write to `index.ts`; app names are not namespace-judged (same file, header note) | | npm 10 failure measured on 10.9.4 and 10.9.9 | card #23849 body (the npm 10 docs card this callout came from) | | `@vitest/browser-webdriverio` 4.1.12 now published; npm 10.9.9 installs the CLI | `npm view @vitest/browser-webdriverio@4.1.12 peerDependencies` → `vitest ^4.1.12` (published 2026-10-30); npm 10.9.9 dry-run installs of `@objectstack/cli@18.2.0` and `@objectstack/plugin-auth@18.2.0` exit 0, zero `edgesOut` lines | ## Tests Docs-only diff, no package touched, so no build closure or package test is owed. The gate families `dispatch-gates.mjs --commands` derives for this path were run on head `60a6d8170c`. ## Acceptance notes - `content/docs/deployment/troubleshooting.mdx` states its own removal condition for the npm 10 notes: `@vitest/browser-webdriverio` publishes the version `npm view vitest dist-tags` lists as `V4` (4.1.12 — now true), **and** a plain npm 10 install of `@objectstack/plugin-auth` passes (measured exit 0 on npm 10.9.9 above). Both now hold. The sibling notes in `content/docs/getting-started/index.mdx` (Prerequisites), `troubleshooting.mdx` and `self-hosting.mdx` are outside this card's one-file scope and still say npm 10 fails; this PR narrowed rather than deleted this page's note, per the order. - No changeset: `content/docs/` ships in no package's `files[]`; label `skip-changeset`. ## Verification <details><summary>Gate run on 60a6d81 — 43 derived, 43 run, 0 NOT-MEASURED</summary> `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILE` → `Run reconciliation — 43 derived, 43 run, 0 NOT-MEASURED, 0 UNRUN` (all 43 with recorded exit 0). Four gates first exited 3 (PREREQUISITE NOT MET: `@objectstack/lint`, `@objectstack/formula`, `@objectstack/client-react` unbuilt) and were re-run green after building those closures under the verify lock: `check:doc-formula-expressions`, `check:doc-security-posture`, `check:skill-examples` (280 prose examples type-check), `check:docs-transcript-drift` (4 declared values across 475 pages). `check:doc-anchors`, `check:doc-authoring`, `check:docs-redirects`, `check:nul-bytes` and the rest exited 0. CI's Build Docs job is not run locally. </details> --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent ceef714 commit c503b95

1 file changed

Lines changed: 29 additions & 11 deletions

File tree

‎content/docs/getting-started/your-first-project.mdx‎

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,20 @@ The two paths produce identical projects.
2525
| A package manager | npm 9+ / pnpm 10.15+ / yarn / bun | `npm --version` |
2626

2727
That's all. A standalone project does **not** need pnpm, TypeScript pre-installed,
28-
or a database server — the default template runs on an in-memory driver, and
29-
TypeScript comes in as a dev dependency.
28+
or a database server — the default template stores its data in a SQLite file,
29+
`.objectstack/data/objectstack.db` inside the project (git-ignored), and
30+
TypeScript comes in as a dev dependency. Records survive a restart; to start
31+
from an empty database, stop the server and delete `.objectstack/data/`, or run
32+
`npx os dev --fresh` for a throwaway one.
3033

31-
<Callout type="warn">
32-
**npm 10 cannot install the CLI right now.** npm 10, the npm that Node 22 ships,
33-
fails with `Cannot read properties of null (reading 'edgesOut')`. Upgrade npm
34-
first with `npm install -g npm@11` (npm 11 needs Node 22.9+), or use pnpm.
35-
Already scaffolded? Upgrade, then run `npm install` in the project.
34+
<Callout type="info">
35+
**`Cannot read properties of null (reading 'edgesOut')` from npm 10?** npm 10,
36+
the npm that Node 22 ships, crashed this way installing the CLI (measured on
37+
10.9.4 and 10.9.9) while vitest 4's newest release had no matching
38+
`@vitest/browser-webdriverio`. That release, 4.1.12, is now published, and npm
39+
10.9.9 installs `@objectstack/cli` again (measured on 18.2.0). If you still hit
40+
it, upgrade with `npm install -g npm@11` (npm 11 needs Node 22.9+) or use pnpm,
41+
then run `npm install` in the project.
3642
[Troubleshooting](/docs/deployment/troubleshooting#cannot-read-properties-of-null-reading-edgesout-from-npm-install)
3743
has the other fix.
3844
</Callout>
@@ -263,11 +269,23 @@ is refused. No code changes either way — see [Drivers](/docs/data-modeling/dri
263269
npm run dev # objectstack dev — rebuild + server restart on change
264270
```
265271

266-
Or with the visual Console (data browser, metadata explorer, API docs):
272+
The dev server prints the database file and the Console link on boot. The
273+
Console — data browser, metadata explorer, API docs — is served at
274+
`http://localhost:3000/_console/`; sign in as the dev admin
275+
(`admin@objectos.ai` / `admin123`).
267276

268-
```bash
269-
npx os dev --ui # then open http://localhost:3000/_console/
270-
```
277+
<Callout type="info">
278+
**The starter has no app, so `my_app_note` is in no Console navigation.** You
279+
will see the platform's own apps and not the note object: this template ships
280+
objects only, with no app and no views. That is the intended starting point,
281+
not a broken install — the object is live, and the REST calls in step 4 read
282+
and write it. **An object appears in Console navigation only when an app lists
283+
it.** `npx os generate app notes` writes one under `src/apps/`, with a
284+
navigation entry for the starter's only object and its export line in
285+
`src/apps/index.ts`; the Console shows it after the dev server rebuilds. Or
286+
describe the app you want to your coding agent —
287+
[Build with Claude Code](/docs/getting-started/build-with-claude-code).
288+
</Callout>
271289

272290
## 4. Call your API
273291

0 commit comments

Comments
 (0)