This document records the setup process and choices made during the initialization of the onchain project using the community-recommended create-onchain scaffolding tool.
npx create-onchain@latest- Tool:
create-onchain@1.1.2 - Date: February 15, 2026
- Node.js: v24.13.0
- npm: 11.6.2
- yarn: 1.22.22
Question: Project name:
Choice: bitcoin-onchain-app
Reasoning: Chosen to clearly identify this as a Bitcoin-related onchain application while maintaining consistency with project naming conventions.
Question: Enter your Coinbase Developer Platform Client API Key: (optional)
Choice: Skipped (no API key provided)
Reasoning: Left blank as it's optional and can be configured later when needed for production use. The API key can be added to the .env file when available.
Question: Share anonymous usage data to help improve create-onchain?
Choice: no
Reasoning: Opted out of sharing anonymous usage data to maintain privacy and minimize external data collection.
The scaffolding tool created the following structure in /bitcoin-onchain-app/:
bitcoin-onchain-app/
├── README.md # Project documentation
├── .env # Environment variables (template)
├── .gitignore # Git ignore rules
├── .prettierrc # Prettier configuration
├── eslint.config.mjs # ESLint configuration
├── next.config.ts # Next.js configuration
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── app/ # Next.js app directory
│ ├── favicon.ico
│ ├── globals.css
│ ├── layout.tsx
│ ├── page.module.css
│ ├── page.tsx
│ └── rootProvider.tsx
└── public/ # Static assets
└── sphere.svg
The generated project includes the following integrations and frameworks:
- Base - Coinbase's Layer 2 blockchain solution
- Wagmi - React Hooks for Ethereum
- React (v19.0.0) - UI framework
- Next.js (v15.3.4) - React framework for production
- ESLint (v9) - Code linting
@coinbase/onchainkit@latest- OnchainKit library for blockchain interactions@tanstack/react-query@^5.81.5- Data fetching and state managementnext@^15.3.9- Next.js framework (upgraded for security, resolves to 15.5.12)react@^19.0.0- React libraryreact-dom@^19.0.0- React DOM rendererviem@^2.31.6- TypeScript Ethereum librarywagmi@^2.16.3- React Hooks for Ethereum
@types/node@^20- TypeScript types for Node.js@types/react@^19- TypeScript types for React@types/react-dom@^19- TypeScript types for React DOMeslint@^9- Code lintereslint-config-next@^15.3.9- ESLint configuration for Next.jstypescript@^5- TypeScript compiler
Important: The scaffolding tool initially generated the project with Next.js 15.3.4, which had critical security vulnerabilities:
- CVE-2025-66478: HTTP request deserialization DoS vulnerability
- RCE (Remote Code Execution) in React flight protocol
To address these security issues, Next.js was upgraded to ^15.3.9, which resolves to version 15.5.12 (patched and secure).
As per project conventions, dependencies were installed using yarn:
cd bitcoin-onchain-app
yarn installInstallation completed successfully in 72.86 seconds, creating:
node_modules/directory with all dependenciesyarn.lockfile for dependency version locking
The .env file was generated with the following template:
NEXT_PUBLIC_PROJECT_NAME="bitcoin-onchain-app"
NEXT_PUBLIC_ONCHAINKIT_API_KEY=""Note: The .env file is included in .gitignore by default. For production deployments, configure environment variables through your hosting platform's environment variable settings.
The following npm scripts are available:
yarn dev- Start development server (default: http://localhost:3000)yarn build- Build the application for productionyarn start- Start production serveryarn lint- Run ESLint to check code quality
To start developing:
-
Navigate to the project directory:
cd bitcoin-onchain-app -
Run the development server:
yarn dev
-
Open http://localhost:3000 in your browser
-
Edit
app/page.tsxto start building your application -
Configure the Coinbase Developer Platform API key in
.envif needed:NEXT_PUBLIC_ONCHAINKIT_API_KEY="your-api-key-here"
- The
.envfile contains sensitive configuration and is properly excluded via.gitignore - API keys should never be committed to version control
- Use environment-specific configuration for different deployment environments
- Review the OnchainKit documentation for security best practices