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@latest

This 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)

Copy frontend/.env.example to .env.local, then add:

(Get your ID from WalletConnect Cloud.)

2. Smart Contracts (contracts/hardhat/.env & contracts/foundry/.env)

In each contracts subfolder, copy .env.example β†’ .env and add:

Development Workflow

  1. Create Project

  1. Install Dependencies & Set Up Envs

  1. Foundry Setup

  1. Hardhat Setup

  1. (Optional) Add Submodules

Running Commands

Frontend

Hardhat

Foundry

Last updated

Was this helpful?