Docsgetting started

Getting Started & Local Setup

Learn how to install BotPay dependencies, configure environment variables, deploy smart contracts, and run the localized development server in under 10 minutes.

1. Clone & Install Dependencies

Clone the official repository and pull all Node.js dependencies. We recommend using Node.js version **v18 or higher**.

git clone https://github.com/duykhanhussh-collab/BotPay.git
cd track-4-BotPay
npm install

2. Environment Variables Configuration

Copy the template environment file into place and populate it with your keys.

cp .env.example .env
Security Notice

Never commit your `.env` file or raw `PRIVATE_KEY` to public repositories. Ensure `.env` is listed inside your `.gitignore`.

Required Parameters
  • PRIVATE_KEY: Private key of your deployer wallet used for hardhat smart contract deployments on Arc.
  • CIRCLE_API_KEY: Circle dashboard API key used to query unified balances and perform swaps.
  • CIRCLE_ENTITY_SECRET: Encryption key (hex-encoded) to authenticate developer-controlled wallets.
  • NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: Web3 connector key for AppKit frontends.
Example .env content
# Private key of the deployer wallet (do not share!)
PRIVATE_KEY=0xabc123...

# Circle Developers Credentials
CIRCLE_API_KEY=test_api_key_abc123...
CIRCLE_WALLET_SET_ID=ws_...
CIRCLE_ENTITY_SECRET=...
CIRCLE_APP_ID=...

# WalletConnect Project ID for frontend adapter
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=6b7c...

# Local Node RPC config (optional)
LOCAL_RPC_URL=http://127.0.0.1:8545

3. Compile & Deploy to Arc Testnet

Compile Solidity contracts using Hardhat and execute the deployment scripts to provision contracts on Arc Testnet.

# Compile Solidity sources
npx hardhat compile

# Deploy to Arc
node scripts/deploy.js

# Populate mock data / seed registers
node scripts/seed.js

4. Start Local Development Server

Fire up the Next.js development server. The server will run at `http://localhost:3000`.

npm run dev
Success Verification: Open your browser to `http://localhost:3000/docs` to see if the local page renders cleanly without runtime logs.