create-vechain-dapp
Skill15 starsChanged 9 months agoMITView on GitHub
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.
In this repository17 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- auto-voting-relayersSkill
- frontendSkill
- grill-meSkill
- indexer-coreSkill
- monkeySkill
- secure-github-actionsSkill
- smart-contract-developmentSkill
- stargateSkill
- thorSkill
- translateSkill
- vebetterdao-navigatorsSkill
- vebetterdaoSkill
- vechain-coreSkill
- vechain-kitSkill
- vechain-react-native-devSkill
- x-2-earn-appsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 39
Ask the user (use structured questions if available):
- Distinctive: line 48
Read the appropriate reference files and create all files.
- Very specific: line 54
Create files in {{TARGET_DIR}}/{{PROJECT_NAME}}/
- Very specific: line 60
Create frontend files in {{TARGET_DIR}}/{{PROJECT_NAME}}/apps/frontend/
- Very specific: line 61
Create other files at monorepo root and in packages/
- Very specific: line 119
All contracts in the monorepo scaffold are UUPS upgradeable using OpenZeppelin's upgradeable contracts and a custom VeChainProxy.sol …
- Distinctive: line 148
Read the matching files BEFORE creating any files.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create VeChain dApp
Scaffold a production-ready VeChain dApp with wallet connection, dark mode, and GitHub Pages deployment.
CRITICAL RULES
- 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.
- Always read
shared.md— it contains the source code templates used by both modes. - Replace all placeholders in every template before writing files. See Variable Substitution below.
- After compaction or context loss, re-read this SKILL.md to restore awareness of the reference table and operating procedure.
Stack
| Layer | Technology |
| Framework | Next.js 14 (App Router, static export) |
| UI | Chakra UI v3, next-themes |
| Wallet | @vechain/vechain-kit (VeWorld + WalletConnect) |
| State | React Query |
| Contracts | Hardhat + @vechain/sdk-hardhat-plugin + OpenZeppelin UUPS (monorepo only) |
| Build | Turborepo (monorepo only) |
| Deploy | GitHub Pages via GitHub Actions |
| Node | 20 LTS |
Operating procedure
Phase 1 — Gather requirements
Ask the user (use structured questions if available):
- Project name — kebab-case (e.g.
my-vechain-dapp) - Mode —
standalone(frontend only) ormonorepo(Turbo + contracts) - Network —
testormain(default:test) - Target directory — where to create the project (default: current directory)
Phase 2 — Scaffold
Read the appropriate reference files and create all files.
Standalone mode:
- Read references/shared.md
- Read references/standalone.md
- Create files in
{{TARGET_DIR}}/{{PROJECT_NAME}}/
Monorepo mode:
- Read references/shared.md
- Read references/monorepo.md
- Create frontend files in
{{TARGET_DIR}}/{{PROJECT_NAME}}/apps/frontend/ - Create other files at monorepo root and in
packages/
Variable substitution
Replace these placeholders in ALL templates:
| Placeholder | Value |
{{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 installStandalone: 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 devstarts without errors- Page renders with Navbar and wallet connect button
- Dark/light mode toggle works
yarn buildproduces static output.github/workflows/deploy.ymlis 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 usingdeployProxyfrom 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.tsis git-ignored — each dev's solo deployment produces different addresses. A mock is auto-generated on first run.NEXT_PUBLIC_APP_ENVcontrols which config file is loaded (local,testnet,mainnet).yarn devruns against solo,yarn dev:testnetagainst testnet,yarn dev:mainnetagainst mainnet.- Turbo pipeline ensures: generate mock config → compile contracts → check/deploy on target network → write addresses to matching config file → start frontend.
checkContractsDeployment.tsruns 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, ormainnet.ts).
VeChain Kit integration
VeChainKitProviderwraps the app with network config and wallet optionsWalletButtonfrom vechain-kit renders the connect/account buttonuseWallet,useSendTransaction,useCallClausefor wallet/contract interaction- Refer to the
vechain-kitskill for advanced patterns (hooks, theming, social login) - Refer to the
vechain-coreskill for SDK patterns (fee delegation, multi-clause)
Reference files
Read the matching files BEFORE creating any files. See Critical Rules above.
| Topic | File | Read when... |
| Shared source code | references/shared.md | Always — contains all component/provider templates |
| Standalone config | references/standalone.md | User chose standalone mode (frontend only) |
| Monorepo config | references/monorepo.md | User chose monorepo mode (Turbo + contracts) |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

