0xcracka / turbo-pack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

📦 turborepo-web3-starter-kit

⚡ Dev.to Post

This boilerplate is based on Turborepo. It uses Yarn as a package manager. It includes the following packages/apps:

Apps and Packages

  • web: A Next.js based app with typescript,wagmi,rainbowkit,ether.js
  • contracts: hardhat,typescript,chai,ethers
  • storybook: storybook
  • api: basic skeleton back-end structure with typescript
  • ui: a custom shared ui component library
  • lib: sdk library for core instances
  • config: lint and common config configurations
  • tsconfig: tsconfig.jsons used throughout the monorepo
  • husky: lint staged pre-commit check

Stack

This starter kit contains:

NOTE:

I recommend the following extension to make it easy to switch among packages in your mono repo, as well as open multiple under a single workspace. It makes mono repos work well with the test explorer extension.

link: https://marketplace.visualstudio.com/items?itemName=folke.vscode-monorepo-workspace

Get started

git clone https://github.com/memoriaXII/turborepo-web3-starter-kit.git
cd turborepo-web3-starter-kit
yarn install

Front-end

yarn dev

Smart Contracts

yarn hardhat:compile
yarn hardhat:node
yarn hardhat:test

Story Book

yarn storybook
yarn build-storybook

Docker

This repo is configured to be built with Docker, and Docker compose. To build all apps in this repo:

# Create a network, which allows containers to communicate
# with each other, by using their container name as a hostname
docker network create app_network

# Build prod using new BuildKit engine
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose -f docker-compose.yml build --parallel

# Start prod in detached mode
docker-compose -f docker-compose.yml up -d

Open http://localhost:3000.

To shutdown all running containers:

# Stop all running containers
docker kill $(docker ps -q) && docker rm $(docker ps -a -q)

About


Languages

Language:TypeScript 65.4%Language:Solidity 29.8%Language:Dockerfile 3.6%Language:Shell 1.3%