This project template gives you everything you need to build a Web3 application on the Internet Computer.
Check out Vite + React + Motoko for a beginner-friendly starter project with a Motoko backend.
Make sure that Node.js >= 16.x, dfx >= 0.12.x, and Rust are installed on your system.
After installing Rust, run these commands to configure your system for IC canister development:
rustup target add wasm32-unknown-unknown # Required for building IC canisters
cargo install cargo-watch # Optional; used for live reloading in `npm start`Next, run the following commands in a new, empty project directory:
npx degit rvanasa/vite-react-ic-rust # Download this starter project
dfx start --clean --background # Run dfx in the background
npm run setup # Install packages, deploy canisters, and generate type bindings
npm start # Start the development serverWhen ready, run dfx deploy to build and deploy your application.
- Vite: high-performance tooling for front-end web development
- React: a component-based UI library
- TypeScript: JavaScript extended with syntax for types
- Sass: an extended syntax for CSS stylesheets
- Prettier: code formatting for a wide range of supported languages
- Rust: a fast, safe programming language for writing Internet Computer canisters
- Vite developer docs
- React quick start guide
- Internet Computer docs
- Rust developer docs
dfx.jsonreference schema
- Customize your project's code style by editing the
.prettierrcfile and then runningnpm run format. - Reduce the latency of update calls by passing the
--emulatorflag todfx start. - Split your frontend and backend console output by running
npm run frontendandnpm run backendin separate terminals.
For a considerably faster setup time, check out the Vite + React + Motoko starter project.