Part of the architecture guide. Read this when adding a stack, a feature, or an operation.
source/constants/config.ts— add aStackunion member and astackDefinitionsentry:label,description,repoUrl,refType, optionalref,packageManager,removeAfterClone,envFiles,features.source/operations/cleanupFiles.ts— add acleanupXxxFilesfunction and route to it from the top-levelcleanupFilesdispatcher.source/components/steps/PostInstall.tsx— add stack-specific post-install JSX.source/cli.tsx— add a shortcut flag (e.g.--myStack) and extendresolveStackFlag; update--helptext.- Tests — add per-stack assertions to
nonInteractive.test.ts,info.test.ts,cloneRepo.test.ts,installPackages.test.ts,cleanupFiles.test.ts,createEnvFile.test.ts. - Verify —
pnpm build && pnpm lint && pnpm test. Smoke-test withDAPPBOOSTER_<STACK>_REPO_URL=file:///path/to/local/clone.
source/constants/config.ts— add an entry to the stack'sfeaturesmap. Thedefaultflag governs both the custom-mode pre-check anddefault-mode membership: setdefault: truefor "kept by the recommended install",default: falsefor "removed by default / opt-in" (Canton'sgithubandprecommit). For Canton, also list the feature'spaths: cleanup is data-driven, so no cleanup code is needed and scripts that target a removed directory are stripped automatically. If it ships an env file, add anifFeature-gatedenvFilesentry. If it depends on another feature, addrequires— resolution is automatic in both the interactive and non-interactive paths.source/operations/cleanupFiles.ts— EVM only: add a cleanup function for the feature and call it fromcleanupEvmFileswhen deselected; if it has scripts, add removal topatchPackageJsonEvm. Canton needs no change here.source/components/steps/PostInstall.tsx— extend stack-specific instructions if needed.source/cli.tsx— update the--helptext.- Tests — add assertions in the relevant test files. nonInteractive, info, installPackages, and utils tests pick up new features automatically through
stackDefinitions. - Verify —
pnpm build && pnpm lint && pnpm test.
- Create
source/operations/newOperation.ts— export an async function. UseexecFilefor commands with user input,execonly when shell features are needed. If behavior depends on the stack, takestack: Stackas the first argument. - Export from
source/operations/index.ts. - Call from
source/nonInteractive.ts(in the execution sequence) and from the relevant TUI component. - Add tests in
source/__tests__/operations/newOperation.test.ts— mockexec/execFileto verify correct commands.