chore: migrate motoko/superheroes to icp-cli#1387
Draft
marc0olo wants to merge 1 commit into
Draft
Conversation
- Replace dfx.json with icp.yaml (backend + frontend asset canister) - Move src/superheroes/Main.mo → backend/app.mo; rename actor to remove redundant `persistent` keyword (covered by --default-persistent-actors) - Replace webpack/dfx-declarations frontend with Vite + @icp-sdk/bindgen + React 18 - Move src/www/ → frontend/ with modern functional React components - Add backend/backend.did Candid interface - Update mops.toml: moc 1.9.0, core 2.5.0, --default-persistent-actors - Rewrite Makefile with icp canister call tests for all four CRUD methods - Update README with icp-cli deploy instructions - Add .github/workflows/superheroes.yml (Motoko CI only) - Delete BUILD.md, dfx.json, tsconfig.json, webpack.config.js, .devcontainer/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Migrates
motoko/superheroesfrom dfx to icp-cli, following the canonical full-stack pattern frommotoko/hello_world.Changes
icp.yaml: Replacesdfx.json; definesbackend(Motoko) andfrontend(asset canister) with Vite build stepsbackend/app.mo: Moved fromsrc/superheroes/Main.mo; removed redundantpersistentkeyword (covered by--default-persistent-actorsin mops.toml)backend/backend.did: Added Candid interface for the four CRUD methodsfrontend/: Replacessrc/www/; webpack + old dfx declarations replaced with Vite +@icp-sdk/bindgen+ React 18 functional componentsmops.toml: Updated to moc 1.9.0, core 2.5.0, added--default-persistent-actorsMakefile: Rewritten withicp canister calltests for all four public functions (create, read, update, delete), including state-assertion testsREADME.md: Updated with icp-cli deploy instructions and Candid regeneration command.github/workflows/superheroes.yml: New CI workflow (Motoko only — Rust not yet migrated).gitignore: Added, ignoringfrontend/dist/,frontend/src/bindings/,node_modules/,.icp/cache/dfx.json,BUILD.md,tsconfig.json,webpack.config.js,.devcontainer/,src/Test plan
motoko-superheroesjob)icp network start -d && icp deploysucceeds locallymake testpasses: all 7 CRUD test cases (create, read, update, read-after-update, delete, delete-nonexistent, read-after-delete)🤖 Generated with Claude Code