Skip to content

Commit 15f93b7

Browse files
docs: sync CLAUDE.md and architecture.md with the branch
Claims that this branch made wrong: - stacks were said to declare a "ref strategy (tag-latest vs branch)". refType is gone; a stack declares an optional ref and is cloned at its newest tag without one - the interactive step order read "install then cleanup". It is clone, cleanup, install, post-install - installPackages was said to use pnpm or npm. It is pnpm only - Confirmation was said to show a one-line summary. It shows one line per setting Also adds ink-spinner to the styling row, CantonPostInstall.tsx to the structure tree, and the stack badge to the MainTitle description.
1 parent b39c470 commit 15f93b7

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎CLAUDE.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
A CLI installer tool for dAppBooster projects. It supports two **stacks** and two **modes**:
1212

13-
- **Stacks:** `evm` (the original dAppBooster for EVM chains) and `canton` (dAppBooster for Canton: Daml ledger, off-chain services). Each stack declares its own source repository, ref strategy (tag-latest vs branch), package manager, env files, an optional `prepare` step, and features. Only EVM has features; Canton has none, so it takes neither `--mode` nor `--features`, and the wizard asks it nothing but the project name.
14-
- **Interactive** (default): React + Ink TUI that prompts for the project name first, then the stack, then — for a stack that has features — the installation mode, the optional packages and a review step, then install → cleanup → post-install. The stack prompt is skipped when `--canton`, `--evm`, or `--stack` is supplied.
13+
- **Stacks:** `evm` (the original dAppBooster for EVM chains) and `canton` (dAppBooster for Canton: Daml ledger, off-chain services). Each stack declares its own source repository, an optional `ref` to clone (without it the newest tag wins), package manager, env files, an optional `prepare` step, and features. Only EVM has features; Canton has none, so it takes neither `--mode` nor `--features`, and the wizard asks it nothing but the project name.
14+
- **Interactive** (default): React + Ink TUI that prompts for the project name first, then the stack, then — for a stack that has features — the installation mode, the optional packages and a review step, then clone → cleanup → install → post-install. The stack prompt is skipped when `--canton`, `--evm`, or `--stack` is supplied.
1515
- **Non-interactive**: Flag-driven (`--ni` or auto-detected when not a TTY) for AI agents and CI. Outputs JSON to stdout. Run `--info` for stack + feature discovery, then `--canton`/`--evm` (or `--stack`) + `--name`, plus `--mode` [+ `--features`] when the stack's `modes` list is not empty. Omitting a stack flag in non-interactive mode defaults to `evm` for backward compatibility.
1616

1717
## Stack & Conventions

‎architecture.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Architecture guide for the dAppBooster installer.
99
| Framework | React + Ink | Terminal UI for interactive mode |
1010
| Language | TypeScript (strict mode) | Extends `@sindresorhus/tsconfig`. `tsconfig.json` builds `source/`; `tsconfig.tests.json` typechecks the tests |
1111
| Arg parsing | meow | CLI flag parsing, non-interactive mode |
12-
| Styling | Ink primitives | `<Box>`, `<Text>`, ink-gradient, ink-big-text |
12+
| Styling | Ink primitives | `<Box>`, `<Text>`, ink-gradient, ink-big-text, ink-spinner |
1313
| Testing | Vitest + @vitest/coverage-v8 | |
1414
| Lint + format | Biome 2 | `biome.json`; one tool for both |
1515
| Dead code | knip | `knip.json`; entry points are `cli.tsx` and the test files |
@@ -29,9 +29,9 @@ source/
2929
index.ts stackDefinitions, stackNames, and the config/feature accessors
3030
operations/
3131
exec.ts exec (shell) and execFile (no shell) helpers
32-
cloneRepo.ts Check stack.minNodeVersion, clone (tag-latest OR branch), rm .git, git init
32+
cloneRepo.ts Check stack.minNodeVersion, clone at the newest tag or at stack.ref, rm .git, git init
3333
createEnvFile.ts Copy each stack's envFiles
34-
installPackages.ts Stack-aware: uses stack.packageManager (pnpm or npm)
34+
installPackages.ts Stack-aware: uses stack.packageManager (pnpm)
3535
cleanupFiles.ts Applies stack.prepare, removes deselected features, patches package.json — all before the install
3636
createInitialCommit.ts Commits the finished scaffold (stacks that ask for it)
3737
installGuard.ts Removes the partial project dir if interrupted mid-scaffold
@@ -48,9 +48,10 @@ source/
4848
StepProgress.tsx Shared runner for the operation steps: progress, errors, guard
4949
PostInstall.tsx Renders the stack's postInstallComponent, or its postInstall lines
5050
EvmPostInstall.tsx The EVM closing screen, including the subgraph warning
51+
CantonPostInstall.tsx The Canton closing screen, including the dev-stack steps
5152
Ask.tsx Text input with validation
5253
Divider.tsx Section divider
53-
MainTitle.tsx Gradient title banner
54+
MainTitle.tsx Gradient title banner, with a badge for the chosen stack
5455
Multiselect/ Checkbox multiselect component
5556
types/
5657
types.ts Shared TypeScript types
@@ -240,7 +241,7 @@ The last bracketed group is dropped for a stack whose `getInstallationModes` lis
240241
241242
Each operation step renders through the shared `StepProgress` component, which owns the step list, the running/done/error display and the failure path (`abortInstall`), so every step reports a failure the same way. `Install` covers env files, the package install and the baseline commit, and calls `completeInstall` when the scaffold is finished.
242243
243-
`Confirmation` shows a one-line plan summary (`describeInstallPlan`) and is the last side-effect-free step. **Yes** starts the operations; **No** loops back to the first question (state is reset and the question steps are re-keyed so they re-mount fresh). When `cli.tsx` resolves a stack flag, it passes `preselectedStack` to `<App>`, which skips the `StackSelection` step.
244+
`Confirmation` shows the plan as one line per setting (`describeInstallPlan`), each value highlighted, and is the last side-effect-free step. **Yes** starts the operations; **No** loops back to the first question (state is reset and the question steps are re-keyed so they re-mount fresh). When `cli.tsx` resolves a stack flag, it passes `preselectedStack` to `<App>`, which skips the `StackSelection` step.
244245
245246
Nothing is lost by dropping `Confirmation` for a featureless stack: the project name is validated as it is typed, and an interrupt or a failure during the operations removes the partial directory (see installGuard below).
246247

0 commit comments

Comments
 (0)