moonshotcollective / scaffold-moonshot-starter

Typescript x NestJS x NextJS x Chakra-UI scaffold-eth production ready starter kit.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scaffold-moonshot-starter

Typescript x NextJS x Chakra-UI scaffold-eth production ready starter kit.

Tech stack overview

We are using TypeScript with Next.js & Chakra UI on the front-end.

πŸ“ Folder structure

.
β”œβ”€β”€ packages # Monorepo using yarn workspaces & lerna
β”‚ β”œβ”€β”€ web # Landing page using NextJS, TypeScript, Chakra-UI
β”‚ β”œβ”€β”€ dapp # Web3, decentralized app using NextJS, TypeScript, Chakra-UI and ethers.js
β”‚ β”œβ”€β”€ ui # Theme/design system shared accross web & dapp folders
β”‚ β”œβ”€β”€ hardhat # Your contracts, using Hardhat with Typechain and ethers v5
β”‚ └── subgraph # A subgraph that gets generated on contract deploys
└── ... config ...

πŸ„β€β™‚οΈ Quick Start

Prerequisites

Setup env

In each package individually, create your .env files by copying the .example.env and fill in the empty values.

$ cd packages/[dapp, hardhat and schemas]
$ cp .example.env .env

Create API Key

Go to https://web3.storage and set the value of WEB3STORAGE_TOKEN with your web3.storage API key.

Clone the starter

$ git clone https://github.com/moonshotcollective/scaffold-moonshot-starter.git

install dependencies

$ cd scaffold-moonshot-starter && yarn install

πŸ‘·β€ Build your contracts!

run hardhat locally, get some faucet and πŸ›° deploy your contract Create a mnemonic.secret file or set one of your dev private key as the DEPLOYER_PRIVATE_KEY environment variables in packages/hardhat/.env

$ cd packages/hardhat
$ yarn chain
$ yarn faucet <YOUR_DEV_ADDRESS>

Deploying on hardhat localhost
$ yarn deploy --network localhost

Deploying on mumbai
$ yarn deploy --network mumbai

Deploying on an other testnet (make sure to edit the hardhat.config.js first)
$ yarn deploy --network mytestnet

Testnet Faucets

Dev Preview

Build the ui theme:

$ cd packages/ui
$ yarn build

Build in local

$ cd packages/hardhat-ts
$ yarn chain

Open a new terminal

$ yarn deploy

Start the πŸ“± dApp:

$ cd packages/dapp
$ yarn dev

Start the πŸ“± landing page:

(Optional, doesn't need anything else to run)

$ cd packages/web
$ yarn dev

About

Typescript x NestJS x NextJS x Chakra-UI scaffold-eth production ready starter kit.

License:GNU General Public License v3.0


Languages

Language:TypeScript 93.2%Language:JavaScript 5.7%Language:Solidity 0.5%Language:Shell 0.4%Language:HTML 0.1%Language:CSS 0.0%