agentsclimarketplace

Create vechain dapp

Skill vechain/vechain-ai-skills/skills/create-vechain-dapp

Scaffold a VeChain dApp with Next.js, VeChain Kit, Chakra UI v3, and GitHub Pages deployment. Supports standalone (frontend-only) or monorepo (Turbo + Hardhat contracts) modes. Use when creating a new VeChain project, scaffolding a dApp, setting up a VeChain frontend, or bootstrapping a VeChain monorepo.From its SKILL.md

Install
npx -y skills add vechain/vechain-ai-skills --skill create-vechain-dapp

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 10 stars10 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

7.1 KB, as published. Nobody here has run it

Create VeChain dApp

Scaffold a production-ready VeChain dApp with wallet connection, dark mode, and GitHub Pages deployment.

CRITICAL RULES

  1. Read reference files FIRST. Based on the user's chosen mode, read the appropriate reference files before creating any files. Briefly mention which files you are reading so the user can confirm the skill is active.
  2. Always read shared.md — it contains the source code templates used by both modes.
  3. Replace all placeholders in every template before writing files. See Variable Substitution below.
  4. After compaction or context loss, re-read this SKILL.md to restore awareness of the reference table and operating procedure.

Stack

LayerTechnology
FrameworkNext.js 14 (App Router, static export)
UIChakra UI v3, next-themes
Wallet@vechain/vechain-kit (VeWorld + WalletConnect)
StateReact Query
ContractsHardhat + @vechain/sdk-hardhat-plugin + OpenZeppelin UUPS (monorepo only)
BuildTurborepo (monorepo only)
DeployGitHub Pages via GitHub Actions
Node20 LTS

Operating procedure

Phase 1 — Gather requirements

Ask the user (use structured questions if available):

  1. Project name — kebab-case (e.g. my-vechain-dapp)
  2. Mode — standalone (frontend only) or monorepo (Turbo + contracts)
  3. Network — test or main (default: test)
  4. Target directory — where to create the project (default: current directory)

Phase 2 — Scaffold

Read the appropriate reference files and create all files.

Standalone mode:

  1. Read references/shared.md
  2. Read references/standalone.md
  3. Create files in {{TARGET_DIR}}/{{PROJECT_NAME}}/

Monorepo mode:

  1. Read references/shared.md
  2. Read references/monorepo.md
  3. Create frontend files in {{TARGET_DIR}}/{{PROJECT_NAME}}/apps/frontend/
  4. Create other files at monorepo root and in packages/

Variable substitution

Replace these placeholders in ALL templates:

PlaceholderValue
{{PROJECT_NAME}}kebab-case project name
{{PROJECT_TITLE}}Title-case project name (for UI display)
{{NETWORK_TYPE}}test or main

Phase 3 — Install and verify

cd {{PROJECT_NAME}}
nvm use
yarn install

Standalone: yarn dev (localhost:3000), yarn build (static export → out/)

Monorepo: make solo-up (start Thor solo node, requires Docker), then yarn dev (auto-deploys contracts to solo), yarn build, yarn contracts:compile, yarn contracts:test. Stop with make solo-down, reset with make solo-clean.

Phase 4 — Git init

git init && git add . && git commit -m "Initial scaffold: VeChain dApp"

Success criteria

  • yarn dev starts without errors
  • Page renders with Navbar and wallet connect button
  • Dark/light mode toggle works
  • yarn build produces static output
  • .github/workflows/deploy.yml is present

Key patterns

Client-only VeChain Kit

VeChain Kit cannot run server-side. The entire app shell (ClientApp) is loaded via dynamic(() => ..., { ssr: false }) in layout.tsx. All VeChain Kit imports inside ClientApp children work normally since the parent is already client-only.

Static export for GitHub Pages

next.config.js uses output: "export" with configurable basePath/assetPrefix via NEXT_PUBLIC_BASE_PATH env var. GitHub Actions defaults to /${{ github.event.repository.name }} for GitHub Pages. Set to empty string for custom domains. Important: metadata.icons and raw <img src> paths do NOT auto-prepend basePath — prefix them manually.

Chakra UI version pinning

Pin @chakra-ui/react to an exact version (currently 3.30.0). VeChain Kit uses Chakra v2 internally, and newer v3 releases can break VeChain Kit's button/modal theming.

Provider chain

ChakraProvider → ColorModeProvider → QueryClientProvider → VeChainKitProvider → App

Contract architecture (monorepo only)

All contracts in the monorepo scaffold are UUPS upgradeable using OpenZeppelin's upgradeable contracts and a custom VeChainProxy.sol (ERC1967). Key files:

  • scripts/helpers/upgrades.ts — core deploy/upgrade proxy helpers. Copy as-is from the template. All deploy scripts, upgrade scripts, and tests depend on it.
  • contracts/VeChainProxy.sol — ERC1967 proxy contract. Copy as-is.
  • scripts/deploy/deploy.ts — production deployment using deployProxy from helpers.
  • scripts/upgrade/ — interactive CLI upgrade system with versioned config registry.

For contract architecture, upgrade patterns, storage safety, security, and testing — follow the smart-contract-development skill. It is the authoritative reference for all Solidity development patterns on VeChain.

Config package and auto-deployment (monorepo only)

The monorepo uses a packages/config package that centralizes contract addresses and network settings per environment. Key mechanics:

  • local.ts is git-ignored — each dev's solo deployment produces different addresses. A mock is auto-generated on first run.
  • NEXT_PUBLIC_APP_ENV controls which config file is loaded (local, testnet, mainnet).
  • yarn dev runs against solo, yarn dev:testnet against testnet, yarn dev:mainnet against mainnet.
  • Turbo pipeline ensures: generate mock config → compile contracts → check/deploy on target network → write addresses to matching config file → start frontend.
  • checkContractsDeployment.ts runs before dev for any environment — if contracts aren't deployed, it deploys them and writes addresses to the correct config file (local.ts, testnet.ts, or mainnet.ts).

VeChain Kit integration

  • VeChainKitProvider wraps the app with network config and wallet options
  • WalletButton from vechain-kit renders the connect/account button
  • useWallet, useSendTransaction, useCallClause for wallet/contract interaction
  • Refer to the vechain-kit skill for advanced patterns (hooks, theming, social login)
  • Refer to the vechain-core skill for SDK patterns (fee delegation, multi-clause)

Reference files

Read the matching files BEFORE creating any files. See Critical Rules above.

TopicFileRead when...
Shared source codereferences/shared.mdAlways — contains all component/provider templates
Standalone configreferences/standalone.mdUser chose standalone mode (frontend only)
Monorepo configreferences/monorepo.mdUser chose monorepo mode (Turbo + contracts)

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.