Skip to content

ruff27/next-dapp

Repository files navigation

⚡ Next Dapp – Web3 Counter on Sepolia

A simple decentralized application (dApp) built with Next.js 15, RainbowKit, Wagmi, and Hardhat, deployed on the Sepolia Testnet.
The app demonstrates wallet connection, smart contract interaction (increment/decrement counter), live transaction feed, and data visualization.


✨ Features

  • 🔐 Wallet connection with MetaMask, Rainbow, Coinbase Wallet, WalletConnect via RainbowKit.
  • 🔄 Smart contract interaction – increment & decrement a counter stored on-chain.
  • 🧾 Transaction feed – view recent transactions and confirmations.
  • 📊 Counter chart – see counter values plotted over time.
  • 🌗 Dark/Light mode toggle.
  • 🎨 Clean, responsive UI styled with TailwindCSS.

🖼️ Screenshots

Wallet Connection

Wallet Connection

Sending Transaction

Submitting Transaction

Confirmed on Sepolia

Etherscan Confirmation

Dark Mode UI

Dark Mode

Light Mode UI

Light Mode

(All screenshots from local development connected to Sepolia Testnet)


⚙️ Dependencies

Frontend

Smart Contracts

  • Hardhat – development & testing framework
  • Ethers.js – contract deployment/interactions
  • Solidity (Counter.sol)

📦 Installation

Clone the repo and install dependencies:

git clone https://github.com/your-username/next-dapp.git
cd next-dapp
npm install

🔑 Environment Setup

Create a .env file in the root:

ALCHEMY_SEPOLIA_URL=https://eth-sepolia.g.alchemy.com/v2/yourAlchemyKey
PRIVATE_KEY=0xyourPrivateKey
NEXT_PUBLIC_COUNTER_ADDRESS=0xDeployedContractAddress
NEXT_PUBLIC_ALCHEMY_SEPOLIA_URL=https://eth-sepolia.g.alchemy.com/v2/yourAlchemyKey
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=yourWalletConnectId
NEXT_PUBLIC_DEFAULT_CHAIN_ID=11155111

🛠️ Compile & Deploy Contract
npx hardhat compile
npx hardhat run scripts/deploy.ts --network sepolia

🚀 Run the App
npm run dev

App runs at http://localhost:3000

## ✅ Usage

Connect your wallet (MetaMask/Rainbow/CoinBaseWallet/WalletConnect).

Choose Increment or Decrement to update the counter on-chain.

Watch transaction status update in the UI and on Etherscan.

Toggle Dark/Light mode as you prefer.

About

Blockchain based web application using Next.js, TailwindCSS and Solidity

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published