feat: add Canton stack support#4
Merged
Merged
Conversation
pnpm 11 (the version that runs on Node 24) deprecates the package.json "pnpm" field in favor of pnpm-workspace.yaml, and replaces onlyBuiltDependencies with allowBuilds (supported since pnpm 10.26). - .nvmrc: 20 -> 24 - move the @biomejs/biome build allowance into pnpm-workspace.yaml as allowBuilds; drop the now-empty "pnpm" field from package.json
The installer now scaffolds from two stacks. EVM (the existing dAppBooster) stays the default; Canton clones BootNodeDev/cn-dappbooster and drops the Carpincho wallet, which ships separately as an extension. - A `Stack` config (source/constants/config.ts) holds each stack's repo, ref strategy (latest tag or branch), package manager, env files, clone-time removals, and features. DAPPBOOSTER_<STACK>_REPO_URL / _REF env vars override repo and ref for forks and feature-branch testing. - Operations take the stack as their first argument: cloneRepo handles both tag and branch refs, installPackages uses the stack's package manager, createEnvFile copies each stack's env files, and cleanupFiles dispatches per stack. Canton script cleanup strips scripts by the directory they target, so it tracks removals instead of script names. - CLI gains --canton / --evm / --stack (non-interactive defaults to evm). The TUI adds a stack selection step; completed selection steps collapse to a static summary so only the active step shows a live menu; and the project-name step rejects an already-existing directory (parity with the non-interactive guard) instead of failing later during clone.
Add data-driven `paths` to each Canton feature and a single cleanup loop that removes a deselected feature's paths and strips its package.json scripts. Adds two new optional features (both default-on, so a full install is unchanged): - carpincho: the Carpincho browser-extension wallet (no longer force-removed at clone time; its env file and build/load post-install steps are feature-gated) - llm: agent/LLM artifacts (.claude, AGENTS.md, CLAUDE.md, architecture.md, …) Repository hygiene is now split: both stacks always drop .github + husky/ commitlint automation, EVM additionally always drops its own agent metadata, and Canton keeps that metadata under the `llm` feature.
Rewrite readme.md around the two stacks (Choose your stack, per-stack sections with feature tables and sample JSON, Agents & CI). Update architecture.md to describe the split repository hygiene (CI + automation always; EVM metadata always; Canton metadata under the `llm` feature) and the data-driven Canton feature cleanup via `paths`.
Add a one-directional, transitively-resolved `requires` field to FeatureDefinition; `e2e` declares `requires: ['counter']` because the suite drives the counter dapp. Resolution lives in pure helpers in utils.ts: - resolveSelectedFeatures expands a selection with its transitive requirements (non-interactive: --features e2e yields [counter, e2e]) - applyFeatureToggle keeps the interactive multiselect consistent — selecting pulls requirements in, deselecting cascades dependents out --info surfaces each feature's `requires` so agents can resolve dependencies themselves, and --help documents the auto-resolution.
architecture.md becomes a short index (intro, tech stack, project structure, a 'read this when…' link table) so agents load only the sub-doc they need: - docs/architecture/abstractions.md — Stack/config, FeatureDefinition, operations, shell, security - docs/architecture/data-flow.md — non-interactive + interactive flows - docs/architecture/extending.md — add a stack / feature / operation Design specs at docs/ root stay local-only; these reference docs are committed.
Reorder the interactive flow so every question (stack, project name, mode, features) is answered before any operation runs — clone/install/cleanup now happen only at the end, mirroring the non-interactive path. Abandoning the wizard while answering therefore leaves nothing on disk. Add a Confirmation step that shows a one-line plan summary (describeInstallPlan) as the last side-effect-free moment. Choosing 'No' loops back to re-answer the questions from the top; 'Yes' starts the operations.
Add installGuard: beginInstall records the project directory the moment disk work starts and registers SIGINT/SIGTERM handlers; completeInstall clears it once the scaffold is done (so Ctrl+C on the finished project is safe). On interrupt while a scaffold is in progress, the partial directory is removed. It only ever removes a directory the installer created this run — both paths reject a pre-existing directory up front — so user data is never touched. Wired into the interactive path (CloneRepo begin, FileCleanup complete) and the non-interactive path (around its operation block).
Update docs/architecture/data-flow.md for the questions-before-operations order and the Confirmation step, document installGuard under abstractions, and list it in the architecture index's project structure.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the Canton stack alongside EVM via a config-driven stack abstraction.
--canton/--evm/--stack, plus the interactive wizard;--infoexposes stacks, features, and dependencies.counter,e2e,carpincho,llm), all default-on, data-driven cleanup;e2erequirescounter(auto-resolved, both paths).llmfeature (EVM unchanged).architecture.mdsplit into a lean index +docs/architecture/.Testing
BootNodeDev/cn-dappbooster: full + all 16 custom combos, plus a real interrupt (partial dir removed).Closes #3
🤖 Generated with Claude Code