npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

create-core-dapp

v0.1.7

Published

A lightweight, developer-friendly full-stack starter kit for building DApps on Core. Preconfigured with Hardhat, Next.js, and RainbowKit,

Readme

create-core-dapp

A lightweight, developer-friendly full-stack starter kit for building DApps on Core. Preconfigured with Hardhat, Next.js, and RainbowKit, it offers a seamless developer experience from testing and deploying smart contracts to frontend connectivity.

npm version npm downloads

🚀 Quick Start

Spin up your DApp with just one command:

# Full-stack DApp (Next.js + Hardhat)
npx create-core-dapp your-dapp-name

# Hardhat-only project
npx create-core-dapp your-dapp-name --hardhat

✨ Features

  • Next.js 15 –Fast, flexible frontend with server-side rendering.
  • 🎛️ Wagmi + Viem - Modern React hooks and utilities for blockchain interaction.
  • 🌈 RainbowKit – Pre-integrated with RainbowKit for hassle-free wallet login.
  • Hardhat – preconfigured for Core Mainnet and Testnet environments
  • 🔔 React Toastify – Built-in, minimal toast notifications for better UX
  • 📦 Auto-synced ABIs – No manual copying—just compile and integrate it in frontend

📋 Prerequisites

  • Node.js: Version 20.x or higher is recommended. You can check your version with:
    node --version
    Download from nodejs.org.

📦 Installation

Using npm (Recommended)

# Full-stack DApp
npx create-core-dapp@latest your-dapp-name

# Hardhat-only project
npx create-core-dapp@latest your-dapp-name --hardhat

Using yarn

# Full-stack DApp
yarn create-core-dapp your-dapp-name

# Hardhat-only project
yarn create-core-dapp your-dapp-name --hardhat

Clone manually:

You can also clone the repository and run it locally:

# Clone the repository
git clone https://github.com/your-username/create-core-dapp.git

# Navigate to the project directory
cd create-core-dapp

# Install dependencies
npm install
# or
yarn install

📋 Project Types

Full-Stack DApp (Default)

Creates a complete DApp with both frontend and smart contract development capabilities:

  • Next.js frontend with RainbowKit wallet integration
  • Hardhat for smart contract development
  • Pre-configured for Core Mainnet and Testnet
  • Auto-synced ABIs between contracts and frontend

Hardhat-Only Project

Creates a minimal project focused solely on smart contract development:

  • Hardhat configuration for Core networks
  • Smart contract templates and deployment scripts
  • No frontend dependencies
  • Perfect for contract-only development or when you want to use a different frontend framework

▶️ Usage

For Full-Stack Projects

# Navigate to the created dApp folder
cd your-dapp-name

# Install dependencies
npm install

# Start development server
npm run dev
# or
yarn dev

For Hardhat-Only Projects

# Navigate to the created project folder
cd your-dapp-name

# Install dependencies
npm install

# Copy environment template
cp .env.example .env

# Compile contracts
npm run compile

🔧 Configuration

For Full-Stack Projects

Create a .env.local file in the root directory:

NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id_here
PRIVETKEY=your_private_key

For Hardhat-Only Projects

Copy the .env.example file to .env and fill in your values:

PRIVATEKEY=your_private_key_here
CORE_TEST2_SCAN_KEY=your_api_key
CORE_MAIN_SCAN_KEY=your_api_key

🗂️ Project Structure

create-dapp-template/
├── artifacts/           # Hardhat compiled contract artifacts
├── cache/              # Hardhat cache
├── contracts/          # Smart contracts
├── scripts/            # Hardhat deployment scripts
├── src/
│   ├── abi/           # Auto-synced ABIsfor frontend usage
│   ├── pages/         # Next.js pages
│   ├── styles/        # CSS styles
│   └── wagmi.ts       # Wallet configuration
├── test/              # Test files
├── package.json       # Project dependencies
├── tsconfig.json      # TypeScript configuration
└── hardhat.config.js  # Hardhat configuration

🛠️ Compile Contracts

Place them in the contracts/ folder

Example: Replace Lock.sol with your custom .sol file

npx hardhat compile

✅ Run Tests

Place them in the test/ folder

Format: <contract-name>.test.js

npx hardhat test

🚀 Deploy Contracts

Place your deployment scripts inside the scripts/ directory (e.g., deploy.js).

Ensure your wallet's private key is added to the .env file, and that the wallet has sufficient funds on the target network.

npx hardhat run scripts/deploy.js --network <network_name>

Replace <network_name> with the network you want to deploy to (e.g., core_testnet2)

🔌 Wallet Setup

// src/wagmi.ts
import { getDefaultConfig } from "@rainbow-me/rainbowkit";
import { coreDao, coreTestnet2 } from "wagmi/chains";

export const config = getDefaultConfig({
  appName: "Core Quickstart",
  projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID!,
  chains: [coreDao, coreTestnet2],
  ssr: true,
});

🌐 Run the Frontend

After setting up your contracts and installing dependencies, you can start the Next.js frontend development server with:

npm run dev

or

yarn dev

This will start the application at http://localhost:3000 by default.

📁 ABI Usage

After compiling your smart contracts with Hardhat, the ABI (Application Binary Interface) will be automatically copied to the src/abi directory by a custom Hardhat task.

To use the ABI in your frontend:

  1. Import the ABI in your component:
    Use a default import to bring the ABI into your TypeScript/React component:

    // Example usage in a React component
    import YourContractABI from '../abi/YourContract.json';
    import { useReadContract } from 'wagmi';
    
    export function YourComponent() {
      const { data } = useReadContract({
        address: 'YOUR_CONTRACT_ADDRESS',
        abi: YourContractABI,
        functionName: 'yourFunction',
      });
    
      return (
        // Your component JSX
      );
    }

    Note: If you encounter a TypeScript error when importing the JSON file, ensure your tsconfig.json includes "resolveJsonModule": true under compilerOptions.

  2. Keep ABIs up to date:
    Whenever you update and recompile your contracts, the ABI in src/abi will be updated automatically.