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 install
ornpm install
it will run the following commands:Install Node.js dependencies:
-
Run
yarn install
ornpm install
For extract candid definition from canister WASM:
-
Run
yarn candid:install
ornpm run candid:install
For transforming Wasm canisters running on the Internet Computer:
-
Run
yarn ic-wasm:install
ornpm run ic-wasm:install
Running Local Internet Computer:
- Run
yarn dfx:start
ornpm run dfx:start
Deploying to the Local Internet Computer:
- Run
yarn deploy
ornpm run deploy
Running Next.js app:
- Run
yarn dev
ornpm run dev
- Open http://localhost:3000 in your browser
- Run
yarn deploy --network=ic
to deploy the canisters to the Internet Computer
- The Rust code is located in the
backend
directory - The Next.js code is located in the
src
directory - The canister configuration is located in the
dfx.json
file
- 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