Skip to content

feat!: remove the canton stack - #17

Merged
gabitoesmiapodo merged 15 commits into
mainfrom
refactor/remove-canton
Oct 15, 2026
Merged

gabitoesmiapodo merged 15 commits into
mainfrom
refactor/remove-canton

Conversation

@gabitoesmiapodo

Copy link
Copy Markdown
Collaborator

Summary

No related issue.

Canton now has its own installer, create-canton-dappbooster, so this one goes back to EVM only.

Changes

  • Removes the Canton stack, the stack prompt and the --canton, --evm and --stack flags
  • Removes what only Canton used: the default mode, feature requires, the Node check and the initial commit
  • One config module replaces the stack layer
  • Unknown flags fail with a JSON error
  • --features constructor no longer passes validation
  • A template with no postinstall script no longer fails the install
  • The wizard's subgraph steps come from the same config lines as the JSON output
  • The docs and the demo show the EVM-only flow

Deviations

Acceptance criteria

  • pnpm dlx dappbooster scaffolds an EVM project with no stack prompt
  • --canton and other unknown flags fail with a JSON error
  • --info prints only features and modes
  • Custom mode removes the files, scripts and packages of the features left out

Test plan

Automated tests

  1. Run pnpm install
  2. Run pnpm lint && pnpm typecheck && pnpm test && pnpm knip
  3. Expect 139 passing tests and no lint or knip findings

Manual verification

  1. Check out this branch and run pnpm build
  2. From an empty folder, run node <repo>/dist/cli.js --info
  3. Expect JSON with only features and modes
  4. Run node <repo>/dist/cli.js --ni --name demo_app --mode custom --features demo,typedoc
  5. Expect "success": true, and no src/subgraphs, docs or .husky in demo_app
  6. Run node <repo>/dist/cli.js --canton --ni
  7. Expect "error": "Unknown flags: --canton"

Breaking changes

  • Breaks: the stack flags, the stacks key in --info, the stack field in the success JSON, --mode default and the DAPPBOOSTER_EVM_* env vars
  • Migration: drop the stack flags, read features at the top of --info, and rename the env vars to DAPPBOOSTER_REPO_URL and DAPPBOOSTER_REF. Canton users move to create-canton-dappbooster

Checklist

  • Self-reviewed my own diff
  • Tests added or updated
  • Docs updated (if applicable)
  • No unrelated changes bundled in

Screenshots

None.

Canton now has its own installer, canton-create in the
canton-dappbooster repo. This installer goes back to scaffolding
dAppBooster for EVM only.

- Removed the canton stack config, its post-install screen and the
  stack selection step
- Removed the --canton, --evm and --stack flags
- --info prints { features, modes } again, with no stacks key
- The success JSON no longer has a stack field
- The override env vars are now DAPPBOOSTER_REPO_URL and DAPPBOOSTER_REF
- The review step and the title no longer show the stack
- EvmPostInstall is now PostInstall
- Removed what only Canton used: the Node version check, the initial
  commit, the stack-level post-install lines, and the prepare step's
  scripts and devDependencies

BREAKING CHANGE: the stack flags are gone, and --info and the success
JSON no longer carry stack data.
These code paths existed for Canton features and the Canton template.
The EVM stack never reaches them.

- Removed the default installation mode. It needs a feature that is off
  by default, and every EVM feature is on by default, so EVM never
  offered it. --mode default now fails like any other unknown mode
- Removed the feature requires field, the toggle logic that enforced it,
  and the transformSelection prop it added to MultiSelect
- installPackages runs the postinstall script again without checking
  that it exists. dAppBooster always ships one
- cleanupFiles no longer strips scripts that run a removed directory.
  Each EVM feature already lists its own scripts
With one template left, the stack layer only added indirection. Nothing
changes for users.

- source/stacks/ is now source/config.ts. It holds the feature map, the
  prepare and staging paths, and getRepo(), which reads the
  DAPPBOOSTER_REPO_URL and DAPPBOOSTER_REF overrides
- Operations, helpers and step components no longer take a stack
  argument
- Removed the Stack, StackConfig, PackageManager and EnvFile types
- pnpm and the .env.example to .env.local copy are now written where
  they are used
The readme, CLAUDE.md and architecture.md still explained stacks, the
stack flags and the Canton template.

- The readme drops the stack flags and the Canton examples, and points
  Canton users at create-canton-dappbooster
- CLAUDE.md says source/config.ts holds the feature metadata, and names
  the DAPPBOOSTER_REPO_URL and DAPPBOOSTER_REF overrides
- architecture.md describes config.ts, the full and custom modes, and
  the operations without a stack argument. The guide for adding a stack
  is gone
The wizard no longer asks for a stack, so record-demo.py stopped waiting
for that prompt, and demo.svg is a fresh recording of the current flow.
meow accepts unknown flags by default and ignores them. After the stack
flags were removed, `dappbooster --canton --ni --name x --mode full`
scaffolded an EVM project and exited 0.

The CLI now sets allowUnknownFlags to false, so an unknown flag stops
the run with exit code 2 before anything touches the disk.
isFeatureNameValid used the `in` operator, which also matches keys
inherited from Object.prototype. `--features constructor` passed
validation and produced a project with every feature removed.

It now uses Object.hasOwn, and a test covers the case.
After `pnpm remove`, installPackages ran `pnpm run postinstall`, which
fails when the cloned template has no such script, for example a fork
set through DAPPBOOSTER_REPO_URL. The failure removed the finished
project.

It now runs `pnpm run --if-present postinstall`, which runs the script
when it exists and does nothing otherwise.
allowUnknownFlags made meow print to stderr and exit 2 on its own, so a
non-interactive run with an old flag such as --canton returned no JSON
for agents to parse.

The flags are now declared once in a constant. After parsing, any flag
not in it goes through reportFailure, which prints the usual
{ success: false, error } envelope and sets exit code 1.
cleanupFiles and installPackages took both the mode and the kept
features. Every caller passes the resolved features, and full mode
always means every feature, so the mode added nothing: with every
feature kept, both already do no feature work.

- Both now take only the project folder, the features and onProgress
- FileCleanup and Install no longer take a mode prop
- The tests for full mode and for "all features selected" were the
  same case, so they are merged
Small cleanups in code this branch already touched. Nothing changes for
users.

- cleanupFiles: removeKeys had one caller left, so patchPackageJson
  removes the scripts itself
- info.ts: JSON.stringify already drops undefined values, so the
  conditional spread for postInstall is gone
- Removed the CleanupGroup type. TypeScript infers prepare and staging
- cloneRepo runs one git clone, then branches only for the checkout
- resolveModeFeatures uses isFeatureSelected
- InstallationMode builds its list from MODE_LABELS, so a new mode
  shows up in the wizard without a second edit
- The default mode test was a copy of the invalid mode test, so the
  two are merged
The wizard's subgraph warning wrote out its own copy of the two setup
steps, while the JSON output read them from
featureDefinitions.subgraph.postInstall. The two had already drifted
apart.

- PostInstall now prints the steps from the config
- The config text gains The Graph Studio URL, so agents get it too
- The step text in the wizard is no longer gray
cloneRepo and installPackages wrote 'pnpm' five times between them.
config.ts now exports packageManager, and both operations read it.
MultiSelect handed back its selection in click order, so
OptionalPackages sorted it back into config order before using it.

MultiSelect now submits the selected items in the order of its items
list, which is what a checkbox list shows. OptionalPackages passes the
selection on as it is.
The docs missed the latest changes, and Vale and an AI-tells pass
flagged their wording.

- architecture.md lists packageManager, the JSON error for unknown
  flags, and the subgraph steps PostInstall reads from the config
- CLAUDE.md says config.ts holds the features, the cleanup paths, the
  repository and the package manager
- Headings use sentence case. Dashes and arrows in prose became plain
  sentences, and passive phrases became active where the actor is known
- The CI order in CLAUDE.md is now a numbered list, and "gates" became
  "checks"
- The readme keeps its layout. Only a few phrases changed
@gabitoesmiapodo gabitoesmiapodo self-assigned this Oct 15, 2026
@gabitoesmiapodo
gabitoesmiapodo merged commit 84fc92d into main Oct 15, 2026
8 checks passed
@gabitoesmiapodo
gabitoesmiapodo deleted the refactor/remove-canton branch October 15, 2026 22:33
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Canton - dAppBooster (#390) Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant