create-datadao
Launch a DataDAO on Vana in minutes. This CLI tool automates the entire DataDAO creation workflow—from smart contracts to data validation.
Quick Start
Setup Modes
Quick Setup (5 minutes):
create-datadao create my-datadao
- Auto-generates wallet and uses smart defaults
- Minimal prompts with automated flow
- Perfect for development and testing
- Skips external service setup initially
Full Setup (30-45 minutes):
create-datadao create my-datadao
- Complete configuration with explanations
- Step-by-step guidance with confirmations
- Sets up all external services (Pinata, Google OAuth)
- Production-ready deployment
Both modes execute the same underlying deployment steps - the difference is in user interaction. Quick mode automates decisions while Normal mode explains and asks for confirmation at each step.
Basic Usage
npx create-datadao my-first-dao
Follow the prompts. You'll have a DataDAO deployed in ~15 minutes.
What This Tool Does
- Deploys smart contracts - Token, liquidity pool, and vesting contracts on Vana testnet
- Registers your DataDAO - Makes it discoverable on the network
- Sets up data validation - Configures proof-of-contribution and data refinement
- Creates a UI - Deploys a contribution interface for your users
Prerequisites
Required:
Installation
npm install -g create-datadao
npx create-datadao
Commands
Create a New DataDAO
create-datadao my-datadao
Options:
--config <path> - Use a JSON configuration file
--quick - Skip optional features for faster setup
Check Status
create-datadao status
create-datadao status my-dao
Deploy Individual Components
create-datadao deploy:contracts [project-path]
create-datadao register [project-path]
create-datadao ui [project-path]
Configuration
Interactive Mode (Default)
The CLI guides you through setup:
? DataDAO name: Weather Data Collective
? Token name: Weather Token
? Token symbol: WEATHER
? Private key (or press enter to generate):
Config File Mode
Create a config file for automated deployment:
{
"projectName": "weather-dao",
"privateKey": "0x...",
"dlpName": "Weather Data Collective",
"dlpToken": "WEATHER",
"tokenName": "Weather Token",
"tokenSymbol": "WEATHER",
"githubUsername": "your-username",
"googleClientId": "your-client-id",
"googleClientSecret": "your-secret",
"pinataApiKey": "your-key",
"pinataApiSecret": "your-secret"
}
Deploy with:
create-datadao --config weather-config.json
Project Structure
After creation, your project contains:
my-datadao/
├── contracts/ # Smart contract code
├── proof/ # Data validation logic
├── refiner/ # Data transformation pipeline
├── ui/ # Contribution interface
├── scripts/ # Deployment scripts
└── deployment.json # Deployment state
Deployment Flow
-
Contract Deployment (~3 minutes)
- Deploys token contract
- Deploys DataLiquidityPool proxy
- Sets up vesting wallet
-
DataDAO Registration (~1 minute)
- Registers with Vana network
- Requires 1 VANA fee
- Returns unique dlpId
-
Proof & Refiner Setup (~5 minutes)
- Creates GitHub repositories
- Configures validation rules
- Sets up data pipeline
-
UI Deployment (~5 minutes)
- Deploys to Vercel
- Configures authentication
- Enables data contributions
Common Issues
Insufficient Funds
Error: Insufficient funds for transaction
Fix: Get testnet VANA from https://faucet.vana.org
Registration Failed
Error: Transaction reverted
Fix: Ensure contracts deployed successfully. Run create-datadao status to check.
GitHub Repository Exists
Warning: Repository already exists
Fix: The tool continues with existing repos. No action needed.
Recovery
If deployment fails midway:
create-datadao status my-dao
npm run deploy:contracts
All progress is saved in deployment.json.
Advanced Usage
Custom Templates
Fork template repositories before creation:
Manual Deployment
Each step can be run independently:
cd my-datadao
npm run deploy:contracts
npm run register:datadao
npm run deploy:proof
npm run deploy:refiner
npm run deploy:ui
State Management
View deployment state:
cat deployment.json | jq
Key fields:
tokenAddress - Your DataDAO token
proxyAddress - DataLiquidityPool address
dlpId - Network registration ID
state - Deployment progress
Environment Variables
Optional configuration via .env:
PRIVATE_KEY=0x...
GITHUB_USERNAME=your-username
PINATA_API_KEY=your-key
PINATA_API_SECRET=your-secret
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-secret
Network Information
Vana Moksha Testnet
Key Contracts
- DataRegistry:
0xd0fD0cFA96a01bEc1F3c26d9D0Eb0F20fc2BB30C
Support
Contributing
We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, your help makes this project better.
Getting Started
Prerequisites for Development
- Node.js 18+ and npm
- Git and GitHub account
- GitHub CLI (recommended):
brew install gh or npm install -g @github/cli
- Basic familiarity with CLI tools and Node.js
Development Setup
Project Structure
create-datadao/
├── bin/
│ └── create-datadao.js # CLI entry point
├── lib/
│ ├── generator.js # Project template generation
│ ├── config.js # Configuration management
│ ├── wallet.js # Blockchain wallet utilities
│ ├── validation.js # Input validation
│ └── formatting.js # String formatting helpers
├── src/
│ ├── index.js # Core generator logic
│ └── templates/ # Script templates for generated projects
├── __tests__/
│ ├── lib/ # Unit tests
│ ├── integration/ # Integration tests
│ └── production/ # End-to-end tests
└── package.json
Testing
We use Jest for testing with multiple test suites:
npm test
npm run test:unit
npm run test:integration
npm run test:production
npm run test:watch
npm run test:coverage
Testing Your Changes
-
Unit Tests: Test individual functions in isolation
npm run test:unit
-
Integration Tests: Test CLI commands end-to-end
npm run test:integration
-
Manual Testing: Test the full user experience
create-datadao create test-dao
create-datadao status test-dao
Making Changes
Code Style
- Use consistent formatting (we recommend Prettier)
- Follow existing naming conventions
- Add JSDoc comments for public functions
- Keep functions focused and testable
Adding Features
-
Create a branch
git checkout -b feature/your-feature-name
-
Write tests first (TDD approach recommended)
-
Implement the feature
- Follow existing patterns in the codebase
- Update CLI help text if adding commands
- Update README if user-facing
-
Test thoroughly
npm test
npm run test:coverage
Bug Fixes
- Reproduce the bug with a test case
- Fix the issue while keeping tests passing
- Add regression tests to prevent future occurrences
Submitting Changes
Pull Request Process
-
Ensure tests pass
npm test
-
Update documentation if needed
- README.md for user-facing changes
- JSDoc comments for code changes
- Add examples for new features
-
Create Pull Request
- Use a clear, descriptive title
- Reference any related issues
- Describe what changed and why
- Include testing instructions
-
PR Template
## What Changed
Brief description of your changes
## Why
Explanation of the problem this solves
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manually tested with: `create-datadao create test-project`
## Checklist
- [ ] Documentation updated
- [ ] Tests added/updated
- [ ] No breaking changes (or clearly marked)
Reporting Issues
Bug Reports
Include:
- Steps to reproduce
- Expected vs actual behavior
- Environment details (Node version, OS)
- CLI command and output
- Error logs if any
Feature Requests
Include:
- Use case description
- Proposed solution
- Alternative approaches considered
- Willingness to implement
Development Tips
Testing Changes Locally
npm link
create-datadao create test-project
create-datadao status test-project
rm -rf test-project
npm unlink -g create-datadao
Debugging
console.log(chalk.gray('DEBUG:'), 'variable value:', variable);
DEBUG=* create-datadao create test-project
Common Gotchas
- File paths: Use
path.join() for cross-platform compatibility
- Async operations: Always handle Promise rejections
- User input: Validate and sanitize all inputs
- Error messages: Make them actionable and user-friendly
Release Process
We use semantic-release for automated releases:
- fix: Patch version (0.0.1)
- feat: Minor version (0.1.0)
- BREAKING CHANGE: Major version (1.0.0)
Use conventional commits:
git commit -m "feat: add support for custom templates"
git commit -m "fix: resolve Windows path issues"
git commit -m "docs: update installation instructions"
Need Help?
- Questions: Open a discussion on GitHub
- Chat: Join our Discord community
- Issues: Search existing issues before creating new ones
Thank you for contributing to create-datadao! 🚀
License
MIT