- Node.js (v18+)
- Wrangler CLI (
npm install -g wrangler) - Cloudflare account authenticated via
wrangler login
cd dapp
npm install
NEXT_PUBLIC_NETWORK=Mainnet npm run buildThis produces a static export in the dapp/out/ directory.
Create the Cloudflare Pages project:
npx wrangler pages project create gumball-clubcd dapp
npx wrangler pages deploy out --project-name=gumball-clubThe app is initially available at gumball-club.pages.dev. To use a custom domain (gumball.radixdlt.com):
- Go to Cloudflare Dashboard > Pages > gumball-club > Custom domains
- Add
gumball.radixdlt.com - Update DNS records as prompted
The network is set at build time via the NEXT_PUBLIC_NETWORK environment variable:
| Network | Value |
|---|---|
| Mainnet | Mainnet |
| Stokenet | Stokenet |
To deploy a Stokenet version, create a separate Pages project and build with NEXT_PUBLIC_NETWORK=Stokenet.
- The app is a Next.js static export (
output: 'export'innext.config.js) - No server-side rendering or API routes are used
- The
.well-known/radix.jsondApp definition is served as a static file frompublic/.well-known/radix.json - Images are served unoptimized (no server-side image optimization)