dragon1227 / autodox-notes

Dfx + Rust + Typescript + React + Vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maintenance build status License: MIT


ReactJS Typescript Rust Boilerplate + Authentication


Node version: v16.14.0 Updated for dfx 0.14.0 and @dfinity packages: 0.14.0

About The Project

Boilerplate ReactJS/Typescript with authentication to a local II

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Installation

  1. Install NPM packages

    yarn
  2. Start dfx

    dfx start
  3. Update .env with the II canister id eg: Installing code for canister internet_identity, with the canister_id from internet-identity/.dfx/local/canister_ids.json -> local: eg: rwlgt-iiaaa-aaaaa-aaaaa-cai

  4. Deploy

    dfx deploy
  5. Manual Deploy (replaces point 4)

dfx canister create --all
dfx generate
dfx build
dfx canister install --all

Usage

Copy front-end canister id from .dfx/local/canister_ids.json and replace in the url below

Navigate to http://<frontend_canister_id>.localhost:8000/

Or navigate to http://localhost:5173 after yarn start command

License

Distributed under the MIT License. See LICENSE for more information.

Get started

  1. $sudo yarn add tsc -g
  2. $yarn install
  3. $yarn run build
  4. dfx start --backgroun --clean
    1. If you already have a dfx running run $kill -INT $(lsof -t -i :4943) then re-run dfx start --backgroun --clean
  5. $dfx deploy

About

Dfx + Rust + Typescript + React + Vite


Languages

Language:TypeScript 34.1%Language:JavaScript 33.9%Language:HTML 12.5%Language:Dockerfile 8.9%Language:CSS 7.6%Language:Shell 2.4%Language:Rust 0.6%