BitLayer Stack CLI automates Web3 development by creating a Next.js app with TypeScript and TailwindCSS, plus Web3 essentials (Reown, wagmi, viem) for blockchain interactions. It includes Foundry for smart contract testing and deployment, all pre-configured for Hedera Testnet.
Project Overview BitLayer Stack CLI is a powerful developer toolchain that streamlines the process of building full-stack Web3 applications on the Hedera ecosystem. By combining best-in-class frameworks and tools, it provides a production-ready development environment that emphasizes type safety, performance, and developer experience. Core Features
One-command initialization of a complete full-stack dApp infrastructure Pre-configured project structure following industry best practices Automated dependency management and environment setup Built-in TypeScript configuration for maximum type safety
Next.js 14+: Leveraging the latest features including:
App Router for optimal client-side navigation Server Components for improved performance Built-in API routes for backend functionality Automatic code splitting and optimization
TailwindCSS Integration:
Custom theme configuration Responsive design utilities Dark mode support out of the box Component-friendly utility classes
Web3 Integration Layer:
Reown for seamless wallet connection Wagmi hooks for blockchain interactions Viem for low-level ethereum operations Type-safe smart contract interactions
Foundry Integration:
Professional-grade testing framework Gas optimization tools Flexible deployment scripts Advanced debugging capabilities
Pre-configured Hedera Testnet settings Built-in network switching capabilities Gas estimation tools Environment variable templates
Technical Architecture Project Structure Copymy-dapp/ ├── frontend/ │ ├── components/ │ ├── hooks/ │ ├── pages/ │ └── web3/ ├── contracts/ │ ├── src/ │ ├── test/ │ └── script/ └── config/ Key Integrations
Smart Contract Development:
Foundry for testing and deployment Solidity v0.8.x support Custom deployment scripts for Hedera Automated ABI generation
Frontend Development:
Type-safe contract interactions Responsive UI components Web3 modal integration State management solutions
Development Tools:
Hot reloading TypeScript error checking Linting and formatting Testing utilities
Use Cases
Quick setup for DEX platforms Yield farming applications Lending/borrowing platforms Token swap interfaces
NFT marketplace development NFT minting interfaces Collection management tools Gallery applications
Governance interfaces Proposal systems Voting mechanisms Treasury management
Getting Started bashCopy# Install the CLI globally npm install -g bitlayer-stack-cli
bitlayer-stack-cli create my-dapp
cd my-dapp
yarn install
yarn dev Development Workflow
Smart Contract Development: bashCopy# Run tests forge test
forge script Deploy --rpc-url hedera_testnet
Frontend Development: bashCopy# Start Next.js development server yarn dev
yarn build
Benefits
Developer Experience:
Reduced setup time from hours to minutes Consistent project structure Built-in best practices Comprehensive documentation
Performance:
Optimized build configuration Efficient smart contract deployment Minimal bundle sizes Fast development environment
Scalability:
Production-ready architecture Easy deployment configurations Modular component structure Extensible plugin system
Future Roadmap
Short-term:
Additional template options Custom plugin system Enhanced testing utilities More deployment options
Long-term:
Multi-chain support Advanced monitoring tools CI/CD integration Enterprise features
This tool significantly reduces the friction in Web3 development by providing a complete, production-ready development environment that works seamlessly with the Hedera ecosystem. Whether you're building a simple dApp or a complex DeFi platform, BitLayer Stack CLI provides the foundation you need to focus on building your application rather than setting up infrastructure.
BitLayer Stack CLI is built using Node.js and TypeScript, leveraging key packages like Commander.js for CLI interaction and Inquirer.js for interactive prompts. At its core, the tool executes a series of automated steps when you run the create command. It first initializes a new Next.js project using the create-next-app command, configuring it with TypeScript and TailwindCSS by default. Then, it sets up a Foundry environment in a contracts directory for smart contract development, installing necessary dependencies like OpenZeppelin. The tool automatically injects Web3 dependencies (Reown, wagmi, and viem) into the Next.js project's package.json and copies pre-configured template files that include ready-to-use React components for wallet connection and network switching. For Hedera integration, it adds custom configuration files and environment variables preconfigured for the Hedera Testnet. The entire process is orchestrated through a modular system of utility functions that handle file operations, dependency management, and error handling. The tool maintains a template directory structure that includes boilerplate code, components, and configurations, which are copied and customized based on user input during project creation. Each step is executed sequentially with proper error handling and user feedback through a progress spinner, making the entire process seamless and user-friendly. The result is a fully configured development environment where developers can immediately start building dApps on Hedera without dealing with complex setup procedures.