Repository navigation
Commit c503b95
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| |||
263 | 269 | | |
264 | 270 | | |
265 | 271 | | |
266 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
267 | 276 | | |
268 | | - | |
269 | | - | |
270 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
271 | 289 | | |
272 | 290 | | |
273 | 291 | | |
| |||
0 commit comments