Docs/Developers
Run the app locally
Install the frontend, configure it and start the dev server.
Install#
Terminal
cd Frontend
npm installEnvironment variables#
Copy the template, then fill in your keys:
Terminal
cp .env.example .env.local.env.local
# Base network
NEXT_PUBLIC_NETWORK=base
# RPC for that same network, used for reads and by the relayer
NEXT_PUBLIC_BASE_RPC=https://mainnet.base.org
# Login (Privy app ID from dashboard.privy.io)
NEXT_PUBLIC_PRIVY_APP_ID=yourPrivyAppId
# Relayer (server only, never prefix with NEXT_PUBLIC_)
RELAYER_PRIVATE_KEY=0xYourRelayerKey
RELAYER_REIMBURSEMENT_WEI=50000000000000
# IPFS uploads through Pinata (server only, never prefix with NEXT_PUBLIC_)
PINATA_JWT=yourPinataJwt
NEXT_PUBLIC_IPFS_GATEWAY=https://gateway.pinata.cloud/ipfs
# Your contracts
# NEXT_PUBLIC_SCARF_ADDRESS=0x…
# NEXT_PUBLIC_FORWARDER_ADDRESS=0x…
# NEXT_PUBLIC_PAYMASTER_ADDRESS=0x…| Variable | Required | Notes |
|---|---|---|
NEXT_PUBLIC_BASE_RPC | Yes | A Base RPC URL. |
RELAYER_PRIVATE_KEY | Yes | The relayer wallet. Needs a little ETH for gas. Server-only. |
PINATA_JWT | For files | Server-only. Without it, text works but uploads fail. |
RELAYER_REIMBURSEMENT_WEI | No | Refund per message. Defaults to 50000000000000 (0.00005 ETH). |
NEXT_PUBLIC_*_ADDRESS | No | Override the deployed contract addresses. |
NEXT_PUBLIC_RELAYER_API_URL | No | Use an external relayer instead of /api/relay. |
NEXT_PUBLIC_IPFS_GATEWAY | No | Defaults to the Pinata gateway. |
Start#
Terminal
npm run dev
# http://localhost:3000