create-iota-dapp
v1.0.2
Published
Scaffold a Next.js Web3 boilerplate with IOTA network integration
Maintainers
Readme
create-iota-dapp
Scaffold a production-ready Next.js Web3 application with IOTA network integration and Move smart contract support.
Overview
create-iota-dapp is a CLI tool that generates a complete IOTA dApp boilerplate with automated deployment, contract integration, and AI-assisted customization capabilities. Get from zero to deployed dApp in minutes.
Quick Start
npx create-iota-dappYou'll be prompted for:
- Project name
- Network selection (testnet/devnet/mainnet)
Then:
cd <your-project-name>
npm install --legacy-peer-deps
npm run iota-deploy # Deploy your contract
npm run devFeatures
Automated Setup
- Dynamic Project Configuration: Automatically updates project name, Move contract package name, module names, and all references throughout the codebase
- Network Configuration: Sets up IOTA CLI environment for your selected network (testnet/devnet/mainnet)
- Default Network: Automatically configures Provider.tsx with the selected network
- Move Contract Setup: Updates Move.toml with correct network dependencies
Automated Deployment
The npm run iota-deploy script handles the entire deployment process:
- IOTA CLI environment setup
- Account creation and management
- Automatic token requests from faucet (using IOTA SDK)
- Contract building and publishing
- Automatic extraction of package ID from deployment output
- Automatic extraction of module name, method names, and struct fields from Move contract
- Automatic generation of TypeScript types and data extraction code
- Automatic update of configuration files
- Automatic generation of AI customization prompts
Developer Experience
- Zero Configuration: Everything works out of the box
- Type Safety: Full TypeScript support with auto-generated types
- Error Handling: Built-in error handling and loading states
- AI Integration: Automatically generates ready-to-use prompts for ChatGPT/Cursor/Gemini
- Explorer Links: Automatic generation of IOTA explorer links for addresses, packages, and transactions
What's Included
This template includes:
- Next.js 16 with TypeScript
- IOTA dApp Kit for wallet connection and network interaction
- Move Smart Contracts example (counter contract)
- Radix UI for accessible, modern components
- Tailwind CSS for styling
- Automated deployment scripts with intelligent extraction
- Beginner-friendly structure with clear separation of concerns
Project Structure
my-iota-dapp/
├── app/ # Next.js app directory
│ ├── layout.tsx # Root layout with providers
│ └── page.tsx # Main page
├── components/ # React components
│ ├── Provider.tsx # IOTA providers wrapper
│ ├── sample.tsx # Main dApp integration component
│ └── Wallet-connect.tsx # Wallet connection button
├── hooks/ # Custom React hooks
│ └── useContract.ts # Contract interaction logic
├── lib/ # Configuration and utilities
│ └── config.ts # Network configuration
└── contract/ # Move smart contracts
└── <project-name>/ # Your Move contractCustomization
Automatic Configuration
After running npm run iota-deploy, the following are automatically configured:
- Package ID: Extracted and saved to
lib/config.ts - Module Name: Extracted from Move contract
- Method Names: Extracted from Move functions
- Struct Fields: Extracted and TypeScript types generated
- Data Extraction: Code automatically generated based on your struct
- AI Prompt: Generated in
prompts/folder with current contract details
Manual Customization
Option A: AI-Assisted (Recommended)
- Check the
prompts/folder for the generated prompt file - Copy the prompt content
- Paste to ChatGPT/Cursor/Gemini with your requirements
- Get customized code back
- Replace existing files
Option B: Manual Edit
- Edit
components/sample.tsxfor UI customization - Edit
hooks/useContract.tsfor additional custom logic
Move Contract
The template includes a sample counter contract. Deploy it automatically:
npm run iota-deployThis will:
- Build your contract
- Deploy to the selected network
- Extract package ID automatically
- Configure all contract details automatically
- Generate AI customization prompt
No manual configuration needed.
Requirements
- Node.js >= 18.0.0
- IOTA CLI installed (Installation Guide)
Learn More
License
MIT
