← 返回
开发者工具 中文

celo-composer

Scaffold Celo dApps with Celo Composer. Use when starting new Celo projects, creating MiniPay apps, or setting up development environments.
使用 Celo Composer 脚手架化 Celo dApp。适用于启动新 Celo 项目、创建 MiniPay 应用或搭建开发环境。
san-npm
开发者工具 clawhub v1.0.2010 1 版本 100000 Key: 无需
★ 0
Stars
📥 539
下载
💾 4
安装
1
版本
#latest

概述

Celo Composer

This skill covers using Celo Composer to scaffold Celo dApps with pre-configured templates.

When to Use

  • Starting a new Celo project
  • Creating a MiniPay Mini App
  • Setting up a Farcaster Miniapp
  • Need pre-configured Next.js + Web3 setup

Quick Start

Interactive Mode

npx @celo/celo-composer@latest create

Follow the prompts to select your options.

With Project Name

npx @celo/celo-composer@latest create my-celo-app

Non-Interactive (Flags)

npx @celo/celo-composer@latest create my-celo-app \
  --template basic \
  --wallet-provider rainbowkit \
  --contracts hardhat

Quick Start with Defaults

npx @celo/celo-composer@latest create my-celo-app --yes

Templates

TemplateDescriptionUse Case
---------------------------------
basicStandard Next.js 14+ dAppGeneral web3 applications
minipayMobile-first MiniPay appMiniPay Mini Apps
farcaster-miniappFarcaster SDK + FrameFarcaster integrations
ai-chatStandalone chat applicationAI-powered dApps

Create MiniPay App

npx @celo/celo-composer@latest create -t minipay

Create Farcaster Miniapp

npx @celo/celo-composer@latest create -t farcaster-miniapp

Configuration Options

Wallet Providers

ProviderDescription
-----------------------
rainbowkitPopular wallet connection UI (default)
thirdwebthirdweb Connect SDK
noneNo wallet provider

Smart Contracts

OptionDescription
---------------------
hardhatHardhat development environment (default)
foundryFoundry development environment
noneNo smart contracts

Project Structure

my-celo-app/
├── apps/
│   ├── web/              # Next.js application
│   │   ├── app/          # App router pages
│   │   ├── components/   # React components
│   │   └── ...
│   └── contracts/        # Smart contracts (if selected)
│       ├── contracts/    # Solidity files
│       ├── scripts/      # Deployment scripts
│       └── test/         # Contract tests
├── packages/
│   ├── ui/               # Shared UI components
│   └── utils/            # Shared utilities
├── pnpm-workspace.yaml   # Workspace configuration
├── turbo.json            # Turborepo configuration
└── package.json

Running the Project

cd my-celo-app

# Install dependencies
pnpm install

# Start development server
pnpm dev

# Build for production
pnpm build

Tech Stack

  • Framework: Next.js 14+ with App Router
  • Styling: Tailwind CSS
  • Components: shadcn/ui
  • Monorepo: Turborepo + PNPM workspaces
  • Language: TypeScript
  • Web3: viem + wagmi (or thirdweb)

Requirements

  • Node.js 18.0.0 or higher
  • PNPM (recommended) or npm/yarn

Working with Contracts

If you selected Hardhat or Foundry:

Hardhat

# Navigate to contracts
cd apps/contracts

# Compile
npx hardhat compile

# Test
npx hardhat test

# Deploy to Celo Sepolia
npx hardhat run scripts/deploy.ts --network celoSepolia

Foundry

# Navigate to contracts
cd apps/contracts

# Build
forge build

# Test
forge test

# Deploy to Celo Sepolia
forge script script/Deploy.s.sol --rpc-url https://forno.celo-sepolia.celo-testnet.org --broadcast

Environment Variables

Create .env.local in apps/web/:

# Required for wallet connection
NEXT_PUBLIC_WC_PROJECT_ID=your_walletconnect_project_id

# Optional: Alchemy API key
NEXT_PUBLIC_ALCHEMY_API_KEY=your_alchemy_key

Create .env in apps/contracts/:

PRIVATE_KEY=your_private_key
CELOSCAN_API_KEY=your_celoscan_api_key

Customization

Adding New Pages

Create files in apps/web/app/:

// apps/web/app/my-page/page.tsx
export default function MyPage() {
  return <div>My Custom Page</div>;
}

Adding Components

Add to apps/web/components/ or shared packages/ui/:

// apps/web/components/MyComponent.tsx
export function MyComponent() {
  return <div>My Component</div>;
}

Additional Resources

版本历史

共 1 个版本

  • v1.0.2010 当前
    2026-03-29 22:33 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 65 📥 179,825
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 920 📥 185,723
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 666 📥 323,776