Observed since 20 Oct, 22:43 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
@0xbojack/create-fhevm-dapp
Create FHEVM dApps with framework templates
Scaffold FHEVM dApps with your favorite framework in seconds.

npx @0xbojack/create-fhevm-dapp
npx @0xbojack/create-fhevm-dapp
The CLI will guide you through:
npx @0xbojack/create-fhevm-dapp [framework] [name] [options]
Examples:
# Create a Vue app
npx @0xbojack/create-fhevm-dapp vue my-dapp
# Create a Next.js app
npx @0xbojack/create-fhevm-dapp nextjs my-dapp
# Create a React app
npx @0xbojack/create-fhevm-dapp react my-dapp
# Use specific package manager
npx @0xbojack/create-fhevm-dapp nextjs my-dapp --package-manager npm
# Force overwrite existing directory
npx @0xbojack/create-fhevm-dapp nextjs my-dapp --force
| Flag | Alias | Description | Default |
|---|---|---|---|
--framework <type> | -f | Framework choice (nextjs|react|vue) | Interactive prompt |
--name <name> | -n | App name | Interactive prompt |
--package-manager <pm> | -p | Package manager (pnpm|npm|yarn) | Auto-detect |
--force | - | Overwrite existing directory | false |
--help | -h | Show help message | - |
--version | -v | Show version | - |
| Framework | Status | Package |
|---|---|---|
| Next.js | ✅ Available | @0xbojack/fhevm-nextjs |
| React | ✅ Available | @0xbojack/fhevm-react |
| Vue 3 | ✅ Available | @0xbojack/fhevm-vue |
Each generated dApp is a pnpm workspace with two packages: a framework-specific frontend and a Hardhat project. Out of the box you get:
@fhevm/* SDKsmy-dapp/
├── package.json # Root scripts (pnpm workspace)
├── pnpm-workspace.yaml
└── packages/
├── frontend/ # Framework app (Next.js / React / Vue)
│ ├── contracts/
│ │ └── deployedContracts.ts # Auto-generated contract map
│ ├── components/ # Demo UI + hooks usage
│ └── ... # Framework-specific sources and config
└── hardhat/ # Smart contracts workspace
├── contracts/FHECounter.sol
├── deploy/deploy.ts
├── scripts/generateTsAbis.ts
└── ... # Hardhat config, tasks, tests
packages/frontend/**/contracts/deployedContracts.tsis regenerated automatically after every deploy. Runpnpm generate:abisif you need to refresh it manually.
After generating your dApp, you can run:
# Start frontend dev server
pnpm dev
# Build frontend for production
pnpm build
# Start local Hardhat node
pnpm chain
# Compile smart contracts
pnpm compile
# Deploy to local chain
pnpm deploy:localhost
# Deploy to Sepolia testnet (updates ABI map on success)
pnpm deploy:sepolia
# Regenerate contract map without redeploying
pnpm generate:abis
npx @0xbojack/create-fhevm-dapp vue my-dapp
cd my-dapp
pnpm install
Terminal 1: Start Local Chain
pnpm chain
Terminal 2: Deploy Contracts
pnpm deploy:localhost
This step also refreshes the frontend ABI map. To regenerate manually later run pnpm generate:abis.
Terminal 3: Start Frontend
pnpm dev
Your dApp is now running at http://localhost:5173!
# 1. Create dApp
$ npx @0xbojack/create-fhevm-dapp vue my-encrypted-counter
✔ Framework · Vue
✔ App name · my-encrypted-counter
✔ Package manager · pnpm
Creating FHEVM dApp...
✔ Monorepo structure created
✔ Vue frontend copied
✔ Hardhat contracts copied
✔ package.json files updated
🎉 Success! Created my-encrypted-counter
# 2. Start development
$ cd my-encrypted-counter
$ pnpm install
$ pnpm chain # Terminal 1
$ pnpm deploy:localhost # Terminal 2 (refreshes ABI map)
$ pnpm generate:abis # Optional: regenerate ABI map manually
$ pnpm dev # Terminal 3
The generated FHECounter.sol demonstrates:
euint32 for encrypted counterincrement() and decrement() with encrypted inputsgetCount() returns encrypted value for client-side decryptionrequestDecryptCount() for asynchronous on-chain decryptionCopy .env.example to .env and configure:
# For Sepolia deployment
VITE_SEPOLIA_RPC_URL=your_sepolia_rpc_url
VITE_CONTRACT_ADDRESS=deployed_contract_address
If you see "Template not found", run from the monorepo root:
pnpm copy-templates
pnpm cli:build
Make sure you have your chosen package manager installed:
# pnpm
npm install -g pnpm
# yarn
npm install -g yarn
If port 5173 (frontend) or 8545 (Hardhat) is in use:
# Kill process on port
npx kill-port 5173
npx kill-port 8545
/examples in the SDK repoContributions are welcome! Please check the main repository for guidelines.
BSD-3-Clause-Clear
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
commanderEnvironment{
"local_name": "commander",
"alias": false,
"peer_metadata": null
} | ^12.0.0 | runtime |
promptsEnvironment{
"local_name": "prompts",
"alias": false,
"peer_metadata": null
} | ^2.4.2 | runtime |
chalkEnvironment{
"local_name": "chalk",
"alias": false,
"peer_metadata": null
} | ^5.3.0 | runtime |
oraEnvironment{
"local_name": "ora",
"alias": false,
"peer_metadata": null
} | ^8.0.1 | runtime |
fs-extraEnvironment{
"local_name": "fs-extra",
"alias": false,
"peer_metadata": null
} | ^11.2.0 | runtime |
validate-npm-package-nameEnvironment{
"local_name": "validate-npm-package-name",
"alias": false,
"peer_metadata": null
} | ^6.0.0 | runtime |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^22.7.5 | development |
@types/promptsEnvironment{
"local_name": "@types/prompts",
"alias": false,
"peer_metadata": null
} | ^2.4.9 | development |
@types/fs-extraEnvironment{
"local_name": "@types/fs-extra",
"alias": false,
"peer_metadata": null
} | ^11.0.4 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^5.9.2 | development |
tsupEnvironment{
"local_name": "tsup",
"alias": false,
"peer_metadata": null
} | ^8.5.0 | development |
tsxEnvironment{
"local_name": "tsx",
"alias": false,
"peer_metadata": null
} | ^4.19.2 | development |
vitestEnvironment{
"local_name": "vitest",
"alias": false,
"peer_metadata": null
} | ~2.1.9 | development |
Source distribution
{
"integrity": "sha512-EaWMV4ztO0YwtgXbX2pWmgSxLP1yQa/EK4pedPK7H5hBX0G0/4F5wfef/iUVQclfKf0oKe32kOesNXPRODPWBA==",
"shasum": "ef3e90b4a72812f229997707fbfc9473e90ced7e",
"tarball": "https://registry.npmjs.org/@0xbojack/create-fhevm-dapp/-/create-fhevm-dapp-0.1.9.tgz",
"fileCount": 123,
"unpackedSize": 326041,
"signatures": [
{
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
"sig": "MEUCIQD1Ft9tzc4tUmsM+wXZv53dNCPlM4aP5nkKLHINYH2MSwIgOv+9gU7SLpsgHF0a/1TYxOVrr3eOCShmFzJLQLOqxBI="
}
]
}Observed since 20 Oct, 22:43 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:a34f7a8076d47dba80f48e368cbed56562aa0c5cfc3966992d2cf15da40943da