This is a template for creating a Next.js app with a Rust backend that can be deployed to the Internet Computer.
- Install the DFINITY Canister SDK
- Install Node.js
- Install Rust
Installing dependencies:
-
Run
yarn installornpm installit will run the following commands:Install Node.js dependencies:
-
Run
yarn installornpm installFor extract candid definition from canister WASM:
-
Run
yarn candid:installornpm run candid:installFor transforming Wasm canisters running on the Internet Computer:
-
Run
yarn ic-wasm:installornpm run ic-wasm:install
Running Local Internet Computer:
- Run
yarn dfx:startornpm run dfx:start
Deploying to the Local Internet Computer:
- Run
yarn deployornpm run deploy
Running Next.js app:
- Run
yarn devornpm run dev - Open http://localhost:3000 in your browser
- Run
yarn deploy --network=icto deploy the canisters to the Internet Computer
- The Rust code is located in the
backenddirectory - The Next.js code is located in the
srcdirectory - The canister configuration is located in the
dfx.jsonfile
- Motoko + Next.js Template: motoko
- Todo Motoko + Next.js Template: motoko_todo
- RadixUI + Rust + Next.js Template: radix-ui
- Stable Memory + Rust + Next.js Template: stable_memory




