DocsRun the app locally

Docs/Developers

Run the app locally

Install the frontend, configure it and start the dev server.

Install#

Terminal
cd Frontend
npm install

Environment 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…
VariableRequiredNotes
NEXT_PUBLIC_BASE_RPCYesA Base RPC URL.
RELAYER_PRIVATE_KEYYesThe relayer wallet. Needs a little ETH for gas. Server-only.
PINATA_JWTFor filesServer-only. Without it, text works but uploads fail.
RELAYER_REIMBURSEMENT_WEINoRefund per message. Defaults to 50000000000000 (0.00005 ETH).
NEXT_PUBLIC_*_ADDRESSNoOverride the deployed contract addresses.
NEXT_PUBLIC_RELAYER_API_URLNoUse an external relayer instead of /api/relay.
NEXT_PUBLIC_IPFS_GATEWAYNoDefaults to the Pinata gateway.

Start#

Terminal
npm run dev
# http://localhost:3000