dappbooster 3.1.5 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.d.ts +6 -1
- package/dist/app.js +54 -14
- package/dist/cli.js +82 -19
- package/dist/components/Multiselect/MultiSelect.d.ts +2 -1
- package/dist/components/Multiselect/MultiSelect.js +12 -7
- package/dist/components/steps/CloneRepo/CloneRepo.d.ts +2 -0
- package/dist/components/steps/CloneRepo/CloneRepo.js +8 -5
- package/dist/components/steps/Confirmation.d.ts +8 -0
- package/dist/components/steps/Confirmation.js +26 -0
- package/dist/components/steps/FileCleanup.d.ts +2 -0
- package/dist/components/steps/FileCleanup.js +7 -4
- package/dist/components/steps/Install/Install.d.ts +2 -0
- package/dist/components/steps/Install/Install.js +6 -6
- package/dist/components/steps/InstallationMode.js +4 -4
- package/dist/components/steps/OptionalPackages.d.ts +2 -0
- package/dist/components/steps/OptionalPackages.js +29 -11
- package/dist/components/steps/PostInstall.d.ts +2 -0
- package/dist/components/steps/PostInstall.js +12 -4
- package/dist/components/steps/ProjectName.d.ts +0 -7
- package/dist/components/steps/ProjectName.js +43 -17
- package/dist/components/steps/StackSelection.d.ts +8 -0
- package/dist/components/steps/StackSelection.js +21 -0
- package/dist/constants/config.d.ts +28 -4
- package/dist/constants/config.js +151 -46
- package/dist/info.d.ts +4 -1
- package/dist/info.js +36 -11
- package/dist/nonInteractive.d.ts +1 -0
- package/dist/nonInteractive.js +29 -14
- package/dist/operations/cleanupFiles.d.ts +2 -2
- package/dist/operations/cleanupFiles.js +159 -19
- package/dist/operations/cloneRepo.d.ts +2 -1
- package/dist/operations/cloneRepo.js +35 -11
- package/dist/operations/createEnvFile.d.ts +2 -1
- package/dist/operations/createEnvFile.js +9 -2
- package/dist/operations/installGuard.d.ts +8 -0
- package/dist/operations/installGuard.js +35 -0
- package/dist/operations/installPackages.d.ts +2 -2
- package/dist/operations/installPackages.js +14 -6
- package/dist/utils/utils.d.ts +7 -3
- package/dist/utils/utils.js +62 -6
- package/package.json +1 -6
- package/readme.md +139 -77
package/readme.md
CHANGED
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
# dAppBooster installer
|
|
2
2
|
|
|
3
|
-
Agent-friendly installer
|
|
3
|
+
Agent-friendly installer that scaffolds a Web3 dApp. It supports **two stacks** — pick one per
|
|
4
|
+
run, either through the interactive wizard or with a single flag (`--evm` / `--canton`). It works
|
|
5
|
+
interactively (a React + Ink TUI) and non-interactively (flag-driven, JSON output) for CI and AI
|
|
6
|
+
agents.
|
|
7
|
+
|
|
8
|
+
- **EVM** — the original [dAppBooster](https://dappbooster.dev/) for Ethereum, Polygon, Base, and
|
|
9
|
+
other EVM chains.
|
|
10
|
+
- **Canton** — [dAppBooster for Canton](https://dappbooster-canton-landing.vercel.app/): Daml
|
|
11
|
+
ledger, Carpincho wallet, off-chain services.
|
|
12
|
+
|
|
13
|
+
## Choose your stack
|
|
14
|
+
|
|
15
|
+
```shell
|
|
16
|
+
pnpm dlx dappbooster --evm # EVM stack
|
|
17
|
+
pnpm dlx dappbooster --canton # Canton stack
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Omit the flag to be prompted for the stack in the wizard. Jump to the [EVM stack](#evm-stack) or
|
|
21
|
+
[Canton stack](#canton-stack) section for the details of each.
|
|
4
22
|
|
|
5
23
|
## Requirements
|
|
6
24
|
|
|
7
25
|
- Node >= 20
|
|
8
|
-
- pnpm
|
|
26
|
+
- pnpm (used by the installer itself; the scaffolded project uses pnpm or npm depending on the stack)
|
|
9
27
|
|
|
10
|
-
##
|
|
28
|
+
## Quick start (interactive)
|
|
11
29
|
|
|
12
30
|
<img src="./demo.svg" width="600">
|
|
13
31
|
|
|
@@ -15,71 +33,84 @@ Agent-friendly installer for [dAppBooster](https://dappbooster.dev/) that scaffo
|
|
|
15
33
|
pnpm dlx dappbooster
|
|
16
34
|
```
|
|
17
35
|
|
|
36
|
+
The wizard prompts for stack → project name → mode (full / custom) → features, then clones,
|
|
37
|
+
installs, cleans up, and prints next steps. Pass `--evm` or `--canton` to skip the stack prompt.
|
|
38
|
+
|
|
18
39
|
dAppBooster documentation: https://docs.dappbooster.dev/
|
|
19
40
|
|
|
20
|
-
##
|
|
41
|
+
## Agents & CI (non-interactive)
|
|
42
|
+
|
|
43
|
+
Non-interactive mode activates automatically when stdout is not a TTY, or explicitly with `--ni`.
|
|
44
|
+
It returns JSON on stdout and a non-zero exit code on error.
|
|
21
45
|
|
|
22
|
-
|
|
46
|
+
Discover stacks and features first, then install:
|
|
23
47
|
|
|
24
48
|
```shell
|
|
25
|
-
pnpm dlx dappbooster --info
|
|
26
|
-
pnpm dlx dappbooster --
|
|
49
|
+
pnpm dlx dappbooster --info # all stacks + features as JSON
|
|
50
|
+
pnpm dlx dappbooster --info --stack canton # filter to one stack (or --info --canton)
|
|
27
51
|
```
|
|
28
52
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
53
|
+
| Flag | Purpose |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `--canton` / `--evm` | Pick the stack (mutually exclusive shortcuts) |
|
|
56
|
+
| `--stack <evm\|canton>` | Pick the stack by name (useful when scripting) |
|
|
57
|
+
| `--name <name>` | Project directory name (`/^[a-zA-Z0-9_]+$/`) |
|
|
58
|
+
| `--mode <full\|custom>` | `full` installs every feature; `custom` needs `--features` |
|
|
59
|
+
| `--features <a,b,c>` | Comma-separated feature keys (custom mode only) |
|
|
60
|
+
| `--ni` | Force non-interactive mode |
|
|
32
61
|
|
|
33
|
-
|
|
62
|
+
Mixing flags that disagree (`--canton --evm`, or `--canton --stack evm`) is an error. Each stack
|
|
63
|
+
accepts only its own feature keys, and validation errors name the stack:
|
|
34
64
|
|
|
35
|
-
```
|
|
36
|
-
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"success": false,
|
|
68
|
+
"error": "Unknown features for stack 'canton': subgraph. Valid features: counter, e2e, carpincho, llm"
|
|
69
|
+
}
|
|
37
70
|
```
|
|
38
71
|
|
|
72
|
+
Any failure returns `{ "success": false, "error": "..." }` with exit code 1 (e.g. a missing
|
|
73
|
+
`--name`).
|
|
74
|
+
|
|
75
|
+
A successful install prints:
|
|
76
|
+
|
|
39
77
|
```json
|
|
40
78
|
{
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"default": true,
|
|
49
|
-
"postInstall": [
|
|
50
|
-
"Provide your own API key for PUBLIC_SUBGRAPHS_API_KEY in .env.local",
|
|
51
|
-
"Run pnpm subgraph-codegen from the project folder"
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
"typedoc": {
|
|
55
|
-
"description": "TypeDoc API documentation generation",
|
|
56
|
-
"default": true
|
|
57
|
-
},
|
|
58
|
-
"vocs": {
|
|
59
|
-
"description": "Vocs documentation site",
|
|
60
|
-
"default": true
|
|
61
|
-
},
|
|
62
|
-
"husky": {
|
|
63
|
-
"description": "Git hooks with Husky, lint-staged, and commitlint",
|
|
64
|
-
"default": true
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"modes": {
|
|
68
|
-
"full": "Install all features",
|
|
69
|
-
"custom": "Choose features individually"
|
|
70
|
-
}
|
|
79
|
+
"success": true,
|
|
80
|
+
"stack": "evm|canton",
|
|
81
|
+
"projectName": "...",
|
|
82
|
+
"mode": "full|custom",
|
|
83
|
+
"features": ["..."],
|
|
84
|
+
"path": "/absolute/path",
|
|
85
|
+
"postInstall": ["..."]
|
|
71
86
|
}
|
|
72
87
|
```
|
|
73
88
|
|
|
74
|
-
|
|
89
|
+
## EVM stack
|
|
90
|
+
|
|
91
|
+
```shell
|
|
92
|
+
pnpm dlx dappbooster --evm
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Interactive (skips the stack prompt) or non-interactive:
|
|
75
96
|
|
|
76
97
|
```shell
|
|
77
|
-
pnpm dlx dappbooster --ni --name my_dapp --mode full
|
|
98
|
+
pnpm dlx dappbooster --evm --ni --name my_dapp --mode full
|
|
99
|
+
pnpm dlx dappbooster --evm --ni --name my_dapp --mode custom --features demo,subgraph
|
|
78
100
|
```
|
|
79
101
|
|
|
102
|
+
| Feature | Key | Default | Description |
|
|
103
|
+
|---|---|---|---|
|
|
104
|
+
| Component Demos | `demo` | ✓ | Component demos and example pages |
|
|
105
|
+
| Subgraph support | `subgraph` | ✓ | TheGraph subgraph integration |
|
|
106
|
+
| Typedoc | `typedoc` | ✓ | TypeDoc API documentation generation |
|
|
107
|
+
| Vocs | `vocs` | ✓ | Vocs documentation site |
|
|
108
|
+
| Husky | `husky` | ✓ | Git hooks with Husky, lint-staged, and commitlint |
|
|
109
|
+
|
|
80
110
|
```json
|
|
81
111
|
{
|
|
82
112
|
"success": true,
|
|
113
|
+
"stack": "evm",
|
|
83
114
|
"projectName": "my_dapp",
|
|
84
115
|
"mode": "full",
|
|
85
116
|
"features": ["demo", "subgraph", "typedoc", "vocs", "husky"],
|
|
@@ -91,63 +122,94 @@ pnpm dlx dappbooster --ni --name my_dapp --mode full
|
|
|
91
122
|
}
|
|
92
123
|
```
|
|
93
124
|
|
|
94
|
-
|
|
125
|
+
## Canton stack
|
|
126
|
+
|
|
127
|
+
```shell
|
|
128
|
+
pnpm dlx dappbooster --canton
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Interactive (skips the stack prompt) or non-interactive:
|
|
95
132
|
|
|
96
133
|
```shell
|
|
97
|
-
pnpm dlx dappbooster --ni --name
|
|
134
|
+
pnpm dlx dappbooster --canton --ni --name my_canton_dapp --mode full
|
|
135
|
+
pnpm dlx dappbooster --canton --ni --name my_canton --mode custom --features counter,carpincho
|
|
98
136
|
```
|
|
99
137
|
|
|
138
|
+
| Feature | Key | Default | Description |
|
|
139
|
+
|---|---|---|---|
|
|
140
|
+
| Counter demo | `counter` | ✓ | Counter demo dapp (frontend + Daml + wallet-service) |
|
|
141
|
+
| E2E tests | `e2e` | ✓ | Playwright end-to-end test suite (**requires `counter`**) |
|
|
142
|
+
| Carpincho wallet | `carpincho` | ✓ | Carpincho browser-extension wallet (frontend + build tooling) |
|
|
143
|
+
| LLM & agent artifacts | `llm` | ✓ | `.claude`, `AGENTS.md`, `CLAUDE.md`, `architecture.md`, `llms.txt`, … |
|
|
144
|
+
|
|
145
|
+
`e2e` drives the counter dapp, so it **requires** `counter`: requesting `--features e2e` auto-pulls
|
|
146
|
+
`counter` in (the success JSON reports `["counter", "e2e"]`), and in the wizard, deselecting
|
|
147
|
+
`counter` also unchecks `e2e`.
|
|
148
|
+
|
|
149
|
+
The Canton scaffold uses **npm** (a property of the generated project, not this installer). After
|
|
150
|
+
install: review `canton-barebones/.env`, run `npm run canton:up` to start the local Canton stack,
|
|
151
|
+
and `npm run app:dev` to run the counter dapp frontend. When `carpincho` is included, build the
|
|
152
|
+
extension with `npm run carpincho:build:extension` and load `carpincho-wallet/dist-extension` as an
|
|
153
|
+
unpacked browser extension.
|
|
154
|
+
|
|
155
|
+
**What gets stripped:**
|
|
156
|
+
|
|
157
|
+
- **Always** (every stack and mode): CI config (`.github`) and the husky/commitlint automation
|
|
158
|
+
(`.husky`, `.lintstagedrc.mjs`, `commitlint.config.js`), plus their entries in the root
|
|
159
|
+
`package.json`.
|
|
160
|
+
- **Per feature** (custom mode): deselecting a feature removes its files and any `package.json`
|
|
161
|
+
scripts that target them — deselecting `carpincho` removes `carpincho-wallet/` and its scripts
|
|
162
|
+
(`wallet:dev`, `carpincho:build:extension`); deselecting `llm` removes the agent docs.
|
|
163
|
+
- A **full** install keeps all four features — including `carpincho-wallet/` and the agent docs.
|
|
164
|
+
|
|
100
165
|
```json
|
|
101
166
|
{
|
|
102
167
|
"success": true,
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
168
|
+
"stack": "canton",
|
|
169
|
+
"projectName": "my_canton_dapp",
|
|
170
|
+
"mode": "full",
|
|
171
|
+
"features": ["counter", "e2e", "carpincho", "llm"],
|
|
172
|
+
"path": "/absolute/path/to/my_canton_dapp",
|
|
107
173
|
"postInstall": [
|
|
108
|
-
"
|
|
109
|
-
"Run
|
|
174
|
+
"Review canton-barebones/.env (created from the example)",
|
|
175
|
+
"Run npm run canton:up to start the local Canton stack",
|
|
176
|
+
"Run npm run app:dev to start the counter dapp frontend",
|
|
177
|
+
"Build the Carpincho extension with npm run carpincho:build:extension",
|
|
178
|
+
"Load carpincho-wallet/dist-extension as an unpacked browser extension"
|
|
110
179
|
]
|
|
111
180
|
}
|
|
112
181
|
```
|
|
113
182
|
|
|
114
|
-
|
|
183
|
+
## Repo / ref overrides (env vars)
|
|
184
|
+
|
|
185
|
+
Each stack's source repository and ref can be overridden — useful for forks, or for testing a
|
|
186
|
+
feature branch before it lands on `main`.
|
|
115
187
|
|
|
116
|
-
|
|
188
|
+
| Variable | Effect |
|
|
189
|
+
|---|---|
|
|
190
|
+
| `DAPPBOOSTER_EVM_REPO_URL` | Override the EVM stack git URL |
|
|
191
|
+
| `DAPPBOOSTER_EVM_REF` | Override the EVM stack ref (still checks out the latest tag if unset) |
|
|
192
|
+
| `DAPPBOOSTER_CANTON_REPO_URL` | Override the Canton stack git URL |
|
|
193
|
+
| `DAPPBOOSTER_CANTON_REF` | Override the Canton stack branch |
|
|
117
194
|
|
|
118
195
|
```shell
|
|
119
|
-
|
|
196
|
+
DAPPBOOSTER_CANTON_REF=some-feature-branch \
|
|
197
|
+
pnpm dlx dappbooster --canton --ni --name my_canton --mode full
|
|
120
198
|
```
|
|
121
199
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"error": "Missing required flag: --name"
|
|
126
|
-
}
|
|
127
|
-
```
|
|
200
|
+
The Canton stack defaults to `BootNodeDev/cn-dappbooster` on the `main` branch. The repo has no
|
|
201
|
+
release tags yet, so it tracks `main`; once a release is tagged, switch the default to
|
|
202
|
+
`refType: 'tag-latest'` (or pin a `ref`) in `source/constants/config.ts`.
|
|
128
203
|
|
|
129
204
|
## Development
|
|
130
205
|
|
|
131
|
-
Clone the repo
|
|
132
|
-
|
|
133
206
|
```shell
|
|
134
207
|
git clone git@github.com:BootNodeDev/dAppBoosterInstallScript.git
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Move into the folder you just created and install the dependencies
|
|
138
|
-
|
|
139
|
-
```shell
|
|
140
208
|
cd dAppBoosterInstallScript
|
|
141
|
-
|
|
142
209
|
pnpm i
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
You can run the script by doing
|
|
146
|
-
|
|
147
|
-
```shell
|
|
148
|
-
node cli.js
|
|
210
|
+
node dist/cli.js
|
|
149
211
|
```
|
|
150
212
|
|
|
151
213
|
## Releasing new versions to NPM
|
|
152
214
|
|
|
153
|
-
New releases are automatically uploaded to NPM
|
|
215
|
+
New releases are automatically uploaded to NPM via GitHub Actions.
|