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 Sepolia RPC, used for reads and by the relayer
NEXT_PUBLIC_BASE_RPC=https://sepolia.base.org
# Relayer (server only, never prefix with NEXT_PUBLIC_)
RELAYER_PRIVATE_KEY=0xYourRelayerKey
RELAYER_REIMBURSEMENT_WEI=50000000000000
# IPFS uploads through Pinata
NEXT_PUBLIC_PINATA_API_KEY=yourPinataKey
NEXT_PUBLIC_PINATA_SECRET_KEY=yourPinataSecret
NEXT_PUBLIC_IPFS_GATEWAY=https://gateway.pinata.cloud/ipfs
# Optional: only to use your own 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 Sepolia RPC URL. |
RELAYER_PRIVATE_KEY | Yes | The relayer wallet. Needs a little ETH for gas. Server-only. |
NEXT_PUBLIC_PINATA_API_KEY / _SECRET_KEY | For files | Without them, 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