dappbooster 3.1.5 → 3.3.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 +55 -15
- package/dist/cli.js +84 -20
- 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 +11 -6
- package/dist/components/steps/Install/Install.d.ts +2 -0
- package/dist/components/steps/Install/Install.js +10 -8
- package/dist/components/steps/InstallationMode.d.ts +2 -0
- package/dist/components/steps/InstallationMode.js +12 -15
- package/dist/components/steps/OptionalPackages.d.ts +2 -0
- package/dist/components/steps/OptionalPackages.js +34 -11
- package/dist/components/steps/PostInstall.d.ts +2 -0
- package/dist/components/steps/PostInstall.js +13 -6
- 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 +32 -4
- package/dist/constants/config.js +156 -44
- package/dist/info.d.ts +4 -1
- package/dist/info.js +37 -11
- package/dist/nonInteractive.d.ts +1 -0
- package/dist/nonInteractive.js +40 -17
- package/dist/operations/cleanupFiles.d.ts +2 -2
- package/dist/operations/cleanupFiles.js +169 -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/types/types.d.ts +1 -1
- package/dist/utils/utils.d.ts +9 -3
- package/dist/utils/utils.js +78 -6
- package/package.json +2 -9
- package/readme.md +143 -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,85 @@ 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 (Canton offers default / full / custom; EVM
|
|
37
|
+
offers full / custom) → features, then clones, installs, cleans up, and prints next steps. Pass
|
|
38
|
+
`--evm` or `--canton` to skip the stack prompt.
|
|
39
|
+
|
|
18
40
|
dAppBooster documentation: https://docs.dappbooster.dev/
|
|
19
41
|
|
|
20
|
-
##
|
|
42
|
+
## Agents & CI (non-interactive)
|
|
43
|
+
|
|
44
|
+
Non-interactive mode activates automatically when stdout is not a TTY, or explicitly with `--ni`.
|
|
45
|
+
It returns JSON on stdout and a non-zero exit code on error.
|
|
21
46
|
|
|
22
|
-
|
|
47
|
+
Discover stacks and features first, then install:
|
|
23
48
|
|
|
24
49
|
```shell
|
|
25
|
-
pnpm dlx dappbooster --info
|
|
26
|
-
pnpm dlx dappbooster --
|
|
50
|
+
pnpm dlx dappbooster --info # all stacks + features as JSON
|
|
51
|
+
pnpm dlx dappbooster --info --stack canton # filter to one stack (or --info --canton)
|
|
27
52
|
```
|
|
28
53
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
54
|
+
| Flag | Purpose |
|
|
55
|
+
|---|---|
|
|
56
|
+
| `--canton` / `--evm` | Pick the stack (mutually exclusive shortcuts) |
|
|
57
|
+
| `--stack <evm\|canton>` | Pick the stack by name (useful when scripting) |
|
|
58
|
+
| `--name <name>` | Project directory name (`/^[a-zA-Z0-9_]+$/`) |
|
|
59
|
+
| `--mode <full\|default\|custom>` | `default` (Canton only) keeps the recommended set; `full` installs every feature; `custom` needs `--features` |
|
|
60
|
+
| `--features <a,b,c>` | Comma-separated feature keys (custom mode only) |
|
|
61
|
+
| `--ni` | Force non-interactive mode |
|
|
32
62
|
|
|
33
|
-
|
|
63
|
+
Mixing flags that disagree (`--canton --evm`, or `--canton --stack evm`) is an error. Each stack
|
|
64
|
+
accepts only its own feature keys, and validation errors name the stack:
|
|
34
65
|
|
|
35
|
-
```
|
|
36
|
-
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"success": false,
|
|
69
|
+
"error": "Unknown features for stack 'canton': subgraph. Valid features: github, precommit, carpincho, llm"
|
|
70
|
+
}
|
|
37
71
|
```
|
|
38
72
|
|
|
73
|
+
Any failure returns `{ "success": false, "error": "..." }` with exit code 1 (e.g. a missing
|
|
74
|
+
`--name`).
|
|
75
|
+
|
|
76
|
+
A successful install prints:
|
|
77
|
+
|
|
39
78
|
```json
|
|
40
79
|
{
|
|
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
|
-
}
|
|
80
|
+
"success": true,
|
|
81
|
+
"stack": "evm|canton",
|
|
82
|
+
"projectName": "...",
|
|
83
|
+
"mode": "full|default|custom",
|
|
84
|
+
"features": ["..."],
|
|
85
|
+
"path": "/absolute/path",
|
|
86
|
+
"postInstall": ["..."]
|
|
71
87
|
}
|
|
72
88
|
```
|
|
73
89
|
|
|
74
|
-
|
|
90
|
+
## EVM stack
|
|
91
|
+
|
|
92
|
+
```shell
|
|
93
|
+
pnpm dlx dappbooster --evm
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Interactive (skips the stack prompt) or non-interactive:
|
|
75
97
|
|
|
76
98
|
```shell
|
|
77
|
-
pnpm dlx dappbooster --ni --name my_dapp --mode full
|
|
99
|
+
pnpm dlx dappbooster --evm --ni --name my_dapp --mode full
|
|
100
|
+
pnpm dlx dappbooster --evm --ni --name my_dapp --mode custom --features demo,subgraph
|
|
78
101
|
```
|
|
79
102
|
|
|
103
|
+
| Feature | Key | Default | Description |
|
|
104
|
+
|---|---|---|---|
|
|
105
|
+
| Component Demos | `demo` | ✓ | Component demos and example pages |
|
|
106
|
+
| Subgraph support | `subgraph` | ✓ | TheGraph subgraph integration |
|
|
107
|
+
| Typedoc | `typedoc` | ✓ | TypeDoc API documentation generation |
|
|
108
|
+
| Vocs | `vocs` | ✓ | Vocs documentation site |
|
|
109
|
+
| Husky | `husky` | ✓ | Git hooks with Husky, lint-staged, and commitlint |
|
|
110
|
+
|
|
80
111
|
```json
|
|
81
112
|
{
|
|
82
113
|
"success": true,
|
|
114
|
+
"stack": "evm",
|
|
83
115
|
"projectName": "my_dapp",
|
|
84
116
|
"mode": "full",
|
|
85
117
|
"features": ["demo", "subgraph", "typedoc", "vocs", "husky"],
|
|
@@ -91,63 +123,97 @@ pnpm dlx dappbooster --ni --name my_dapp --mode full
|
|
|
91
123
|
}
|
|
92
124
|
```
|
|
93
125
|
|
|
94
|
-
|
|
126
|
+
## Canton stack
|
|
95
127
|
|
|
96
128
|
```shell
|
|
97
|
-
pnpm dlx dappbooster --
|
|
129
|
+
pnpm dlx dappbooster --canton
|
|
98
130
|
```
|
|
99
131
|
|
|
132
|
+
Interactive (skips the stack prompt) or non-interactive:
|
|
133
|
+
|
|
134
|
+
```shell
|
|
135
|
+
pnpm dlx dappbooster --canton --ni --name my_canton_dapp --mode default
|
|
136
|
+
pnpm dlx dappbooster --canton --ni --name my_canton --mode custom --features carpincho,github
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
| Feature | Key | Default | Description |
|
|
140
|
+
|---|---|---|---|
|
|
141
|
+
| GitHub templates & workflows | `github` | | GitHub issue/PR templates and workflows (`.github`) |
|
|
142
|
+
| Pre-commit hooks | `precommit` | | Husky, lint-staged, and commitlint |
|
|
143
|
+
| Carpincho wallet | `carpincho` | ✓ | Carpincho browser-extension wallet (frontend + build tooling) |
|
|
144
|
+
| LLM & agent artifacts | `llm` | ✓ | `.claude`, `AGENTS.md`, `CLAUDE.md`, `architecture.md`, `llms.txt`, … |
|
|
145
|
+
|
|
146
|
+
`default` mode (the recommended Canton install) keeps `carpincho` + `llm` and removes `github` +
|
|
147
|
+
`precommit`; `full` keeps all four; `custom` lets you pick (in the wizard `github` and `precommit`
|
|
148
|
+
start unchecked). To remove the demo features (`counter`, `sign-message`) after scaffolding, follow
|
|
149
|
+
the "Removing a feature" guide in the generated `dapp/frontend/README.md` — the installer never
|
|
150
|
+
deletes demo source itself.
|
|
151
|
+
|
|
152
|
+
The Canton scaffold uses **npm** (a property of the generated project, not this installer). After
|
|
153
|
+
install: review `canton-barebones/.env`, run `npm run canton:up` to start the local Canton stack,
|
|
154
|
+
and `npm run app:dev` to run the dapp frontend. When `carpincho` is included, build the extension
|
|
155
|
+
with `npm run carpincho:build:extension` and load `carpincho-wallet/dist-extension` as an unpacked
|
|
156
|
+
browser extension.
|
|
157
|
+
|
|
158
|
+
**What gets stripped:**
|
|
159
|
+
|
|
160
|
+
- **EVM** always removes CI config (`.github`) and the husky/commitlint automation as hygiene.
|
|
161
|
+
- **Canton** treats `.github` and pre-commit hooks as optional features: `default` mode removes
|
|
162
|
+
both; `full` keeps both; `custom` removes whichever you uncheck. Deselecting `carpincho` removes
|
|
163
|
+
`carpincho-wallet/` and its scripts (`wallet:dev`, `carpincho:build:extension`); deselecting `llm`
|
|
164
|
+
removes the agent docs. Removing `precommit` also strips the `prepare` script and the
|
|
165
|
+
husky/lint-staged/commitlint dev-dependencies from the root `package.json`.
|
|
166
|
+
- The Canton installer never deletes demo source (the `counter`/`sign-message` features) — that is
|
|
167
|
+
user-controlled via the template's `dapp/frontend/README.md`.
|
|
168
|
+
|
|
100
169
|
```json
|
|
101
170
|
{
|
|
102
171
|
"success": true,
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
172
|
+
"stack": "canton",
|
|
173
|
+
"projectName": "my_canton_dapp",
|
|
174
|
+
"mode": "default",
|
|
175
|
+
"features": ["carpincho", "llm"],
|
|
176
|
+
"path": "/absolute/path/to/my_canton_dapp",
|
|
107
177
|
"postInstall": [
|
|
108
|
-
"
|
|
109
|
-
"Run
|
|
178
|
+
"Review canton-barebones/.env (created from the example)",
|
|
179
|
+
"Run npm run canton:up to start the local Canton stack",
|
|
180
|
+
"Run npm run app:dev to start the dapp frontend",
|
|
181
|
+
"Build the Carpincho extension with npm run carpincho:build:extension",
|
|
182
|
+
"Load carpincho-wallet/dist-extension as an unpacked browser extension"
|
|
110
183
|
]
|
|
111
184
|
}
|
|
112
185
|
```
|
|
113
186
|
|
|
114
|
-
|
|
187
|
+
## Repo / ref overrides (env vars)
|
|
188
|
+
|
|
189
|
+
Each stack's source repository and ref can be overridden — useful for forks, or for testing a
|
|
190
|
+
feature branch before it lands on `main`.
|
|
115
191
|
|
|
116
|
-
|
|
192
|
+
| Variable | Effect |
|
|
193
|
+
|---|---|
|
|
194
|
+
| `DAPPBOOSTER_EVM_REPO_URL` | Override the EVM stack git URL |
|
|
195
|
+
| `DAPPBOOSTER_EVM_REF` | Override the EVM stack ref (still checks out the latest tag if unset) |
|
|
196
|
+
| `DAPPBOOSTER_CANTON_REPO_URL` | Override the Canton stack git URL |
|
|
197
|
+
| `DAPPBOOSTER_CANTON_REF` | Override the Canton stack branch |
|
|
117
198
|
|
|
118
199
|
```shell
|
|
119
|
-
|
|
200
|
+
DAPPBOOSTER_CANTON_REF=some-feature-branch \
|
|
201
|
+
pnpm dlx dappbooster --canton --ni --name my_canton --mode full
|
|
120
202
|
```
|
|
121
203
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"error": "Missing required flag: --name"
|
|
126
|
-
}
|
|
127
|
-
```
|
|
204
|
+
The Canton stack defaults to `BootNodeDev/cn-dappbooster` on the `main` branch. The repo has no
|
|
205
|
+
release tags yet, so it tracks `main`; once a release is tagged, switch the default to
|
|
206
|
+
`refType: 'tag-latest'` (or pin a `ref`) in `source/constants/config.ts`.
|
|
128
207
|
|
|
129
208
|
## Development
|
|
130
209
|
|
|
131
|
-
Clone the repo
|
|
132
|
-
|
|
133
210
|
```shell
|
|
134
211
|
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
212
|
cd dAppBoosterInstallScript
|
|
141
|
-
|
|
142
213
|
pnpm i
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
You can run the script by doing
|
|
146
|
-
|
|
147
|
-
```shell
|
|
148
|
-
node cli.js
|
|
214
|
+
node dist/cli.js
|
|
149
215
|
```
|
|
150
216
|
|
|
151
217
|
## Releasing new versions to NPM
|
|
152
218
|
|
|
153
|
-
New releases are automatically uploaded to NPM
|
|
219
|
+
New releases are automatically uploaded to NPM via GitHub Actions.
|