1.0.0 • Published 4 months ago

sila-scaffold-rootstock v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

RootStock Scaffold CLI Tool

License Node Version NPM Version

A powerful CLI tool to scaffold Rootstock dApps with ease. Quickly set up a full-stack dApp with a customizable stack, including smart contracts, frontend frameworks, and blockchain interaction tools.

šŸ“‹ Table of Contents

✨ Features

  • Scaffold a Full-Stack dApp: Quickly generate a dApp project with a customizable stack
  • Frontend Frameworks: Choose between Next.js or React.js for your frontend
  • Programming Languages: Use TypeScript or JavaScript for your project
  • Smart Contracts: Automatically generate and deploy an ERC-20 token contract on Rootstock
  • Blockchain Interaction: Integrated with Wagmi and RainbowKit for seamless wallet connection
  • Tailwind CSS: Pre-configured with Tailwind CSS for rapid UI development
  • Hardhat Integration: Built-in Hardhat configuration for smart contract development and testing

šŸš€ Installation

To use the RootStock Scaffold CLI tool, you need to have Node.js (>= 14.x) and npm (>= 6.x) installed on your machine.

Install Globally via npm

npm install -g sila-scaffold-rootstock

Install Locally

  1. Clone the repository:

    git clone https://github.com/web3normad/RootStock-Scaffold.git
    cd RootStock-Scaffold
  2. Install dependencies:

    npm install
  3. Link the package globally (for local development):

    npm link

šŸ› ļø Usage

Once installed, you can use the CLI tool to scaffold a new Rootstock dApp project.

Scaffold a New Project

Run the following command and follow the prompts:

create-rootstock-dapp

CLI Prompts

  • Project Name: Enter the name of your project
  • Frontend Framework: Choose between Next.js or React.js
  • Programming Language: Choose between TypeScript or JavaScript
  • Install Dependencies: Choose whether to install dependencies automatically

Running the Project

After scaffolding, navigate to your project directory and follow these steps:

  1. Start the local blockchain:

    npm run blockchain
  2. Deploy your smart contracts:

    npm run deploy
  3. Start the frontend:

    npm run frontend

šŸ“ Project Structure

The scaffolded project will have the following structure:

my-rootstock-dapp/
ā”œā”€ā”€ blockchain/               # Smart contract development
│   ā”œā”€ā”€ contracts/            # Solidity contracts
│   ā”œā”€ā”€ scripts/              # Deployment scripts
│   ā”œā”€ā”€ test/                 # Smart contract tests
│   └── hardhat.config.js     # Hardhat configuration
ā”œā”€ā”€ frontend/                 # Frontend application
│   ā”œā”€ā”€ public/               # Static assets
│   ā”œā”€ā”€ src/                  # Application source code
│   └── tailwind.config.js    # Tailwind CSS configuration
ā”œā”€ā”€ package.json              # Project dependencies and scripts
└── README.md                 # Project documentation

šŸ”§ Technologies Used

  • Frontend: Next.js, React.js, Tailwind CSS
  • Blockchain: Rootstock, Hardhat, Solidity
  • Wallet Integration: Wagmi, RainbowKit
  • CLI Tools: Commander, Inquirer, Chalk, ShellJS

šŸ‘„ Contributing

We welcome contributions! If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository
  2. Create a new branch:
    git checkout -b feature/your-feature-name
  3. Make your changes and commit them:
    git commit -m "Add your feature"
  4. Push to the branch:
    git push origin feature/your-feature-name
  5. Open a pull request

Please ensure your code follows the project's coding standards and includes appropriate tests.

šŸ“„ License

This project is licensed under the ISC License. See the LICENSE file for details.

šŸ¤ Support

If you encounter any issues or have questions, feel free to:

  • Open an issue on GitHub
  • Reach out to the maintainer at dojiemma@gmail.com

šŸ™ Acknowledgments

  • Inspired by Scaffold-ETH
  • Built with ā¤ļø by Emmanuel Doji