krpeacock / vite-react-motoko

Starter project for Vite + React + TypeScript + Motoko

Home Page:https://gitpod.io/#https://github.com/rvanasa/vite-react-motoko

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vite + React + Motoko

Get started directly in your browser:

Open in Gitpod

This project template gives you everything you need to build a Web3 application on the Internet Computer.

For an example of a real-world dapp built using this template, check out the source code for DFINITY's Developer Experience Feedback Board.

Create a New Project

Make sure that Node.js >= 16.x and dfx >= 0.12.x are installed on your system.

Run the following commands in a new, empty project directory:

npx degit krpeacock/vite-react-motoko # 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 server

When ready, run dfx deploy to build and deploy your application.

Technology Stack

  • 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
  • Motoko: a safe and simple programming language for the Internet Computer
  • mo-dev: a live reload development server for Motoko
  • MOPS: an on-chain community package manager for Motoko

Documentation

Tips and Tricks

  • Customize your project's code style by editing the .prettierrc file and then running npm run format.
  • Reduce the latency of update calls by passing the --emulator flag to dfx start.
  • Install a Motoko package by running npx ic-mops add <package-name>. Here is a list of available packages.
  • Split your frontend and backend console output by running npm run frontend and npm run backend in separate terminals.

About

Starter project for Vite + React + TypeScript + Motoko

https://gitpod.io/#https://github.com/rvanasa/vite-react-motoko


Languages

Language:TypeScript 69.5%Language:SCSS 12.1%Language:HTML 9.9%Language:Motoko 6.0%Language:Shell 2.5%