Ladera
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.
Screenshots



Problem Statement
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 FeaturesInstant Project ScaffoldingOne-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 safetyFrontend Technology StackNext.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 optimizationTailwindCSS Integration:Custom theme configuration Responsive design utilities Dark mode support out of the box Component-friendly utility classesWeb3 Integration Layer:Reown for seamless wallet connection Wagmi hooks for blockchain interactions Viem for low-level ethereum operations Type-safe smart contract interactionsSmart Contract DevelopmentFoundry Integration:Professional-grade testing framework Gas optimization tools Flexible deployment scripts Advanced debugging capabilitiesHedera Testnet ConfigurationPre-configured Hedera Testnet settings Built-in network switching capabilities Gas estimation tools Environment variable templatesTechnical Architecture Project Structure Copymy-dapp/ ├── frontend/ │ ├── components/ │ ├── hooks/ │ ├── pages/ │ └── web3/ ├── contracts/ │ ├── src/ │ ├── test/ │ └── script/ └── config/ Key IntegrationsSmart Contract Development:Foundry for testing and deployment Solidity v0.8.x support Custom deployment scripts for Hedera Automated ABI generationFrontend Development:Type-safe contract interactions Responsive UI components Web3 modal integration State management solutionsDevelopment Tools:Hot reloading TypeScript error checking Linting and formatting Testing utilitiesUse CasesDeFi ApplicationsQuick setup for DEX platforms Yield farming applications Lending/borrowing platforms Token swap interfacesNFT ProjectsNFT marketplace development NFT minting interfaces Collection management tools Gallery applicationsDAO PlatformsGovernance interfaces Proposal systems Voting mechanisms Treasury managementGetting Started bashCopy# Install the CLI globally npm install -g bitlayer-stack-cliCreate a new projectbitlayer-stack-cli create my-dappNavigate to project directorycd my-dappInstall dependenciesyarn installStart development serveryarn dev Development WorkflowSmart Contract Development: bashCopy# Run tests forge testDeploy to Hedera Testnetforge script Deploy --rpc-url hedera_testnetFrontend Development: bashCopy# Start Next.js development server yarn devBuild for productionyarn buildBenefitsDeveloper Experience:Reduced setup time from hours to minutes Consistent project structure Built-in best practices Comprehensive documentationPerformance:Optimized build configuration Efficient smart contract deployment Minimal bundle sizes Fast development environmentScalability:Production-ready architecture Easy deployment configurations Modular component structure Extensible plugin systemFuture RoadmapShort-term:Additional template options Custom plugin system Enhanced testing utilities More deployment optionsLong-term:Multi-chain support Advanced monitoring tools CI/CD integration Enterprise featuresThis 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.
Solution
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.
Hackathon
ETHGlobal Bangkok
2024
Contributors
- AllenAJ
2 contributions