Create dApps
Overview
Create BlockDAG dApp is a lightweight CLI tool that scaffolds a full-featured BlockDAG decentralized application in seconds. It generates a βbatteries-includedβ project with a modern frontend, dual smart-contract environments, and Web3 integration, bootstrapping everythingβfrom Git initialization to basic wallet connectionβfor you.
Quick Start
Install and run the generator with a single command:
// npx create-blockdag-dapp@latestThis will prompt you for a project name, clone the starter kit, and install all initial dependencies automatically.
Features
Streamlined Setup: One command creates a complete BlockDAG app foundation.
Modern Stack: Next.js 14+ frontend with TypeScript and Tailwind CSS.
Dual Smart Contract Environments: Includes both Hardhat (JS/TS) and Foundry (Solidity) setups.
Web3 Integration: Out-of-the-box wallet connection UI.
Clean Start: Initializes a fresh Git repository.
Project Structure
The scaffolded project follows this layout:
your-app/ βββ frontend/ β βββ src/ # React components & pages β βββ public/ # Static assets β βββ tailwind.config.ts # Tailwind CSS config β βββ package.json # Frontend dependencies & scripts βββ contracts/ βββ hardhat/ β βββ contracts/ # Solidity contracts β βββ scripts/ # Deployment scripts β βββ test/ # Contract tests β βββ hardhat.config.ts βββ foundry/ βββ src/ # Solidity contracts βββ test/ # Contract tests βββ script/ # Deployment scripts βββ foundry.toml
Environment Setup
After scaffold completes, configure environment variables:
1. Frontend (frontend/.env.local)
frontend/.env.local)Copy frontend/.env.example to .env.local, then add:
(Get your ID from WalletConnect Cloud.)
2. Smart Contracts (contracts/hardhat/.env & contracts/foundry/.env)
contracts/hardhat/.env & contracts/foundry/.env)In each contracts subfolder, copy .env.example β .env and add:
Development Workflow
Create Project
Install Dependencies & Set Up Envs
Foundry Setup
Hardhat Setup
(Optional) Add Submodules
Running Commands
Frontend
Hardhat
Foundry
Links
Last updated
Was this helpful?