Frontend Release Management
The Solana dApp is half the product: Next.js releases carry RPC URLs, program IDs, feature flags, and wallet adapter versions. Mismatched frontend deploys cause more user pain than many on-chain bugs.
Search across all documentation pages
The Solana dApp is half the product: Next.js releases carry RPC URLs, program IDs, feature flags, and wallet adapter versions. Mismatched frontend deploys cause more user pain than many on-chain bugs.
Quick-reference recipe card - copy-paste ready.
# .env.production
NEXT_PUBLIC_CLUSTER=mainnet-beta
NEXT_PUBLIC_RPC_URL=https://your-mainnet-rpc.example
NEXT_PUBLIC_PROGRAM_ID=Hx7k...
NEXT_PUBLIC_IDL_VERSION=2.4.0import { createSolanaRpc } from "@solana/kit";
const rpc = createSolanaRpc(process.env.NEXT_PUBLIC_RPC_URL!);When to reach for this:
// lib/solana-config.ts - validate at module load
const cluster = process.env.NEXT_PUBLIC_CLUSTER;
const programId = process.env.NEXT_PUBLIC_PROGRAM_ID;
const rpcUrl = process.env.NEXT_PUBLIC_RPC_URL;
if (!cluster || !programId || !rpcUrl) {
throw new Error("Missing Solana env vars");
}
if (process.env.VERCEL_ENV === "preview" && cluster === "mainnet-beta") {
throw new Error("Preview builds cannot target mainnet");
}
export const solanaConfig = { cluster, programId, rpcUrl };What this demonstrates:
@solana/kit 7.0.0 clientmain -> staging deploy (devnet RPC)dapp-v1.2.3 linked to IDL_VERSION| Path | RPC tier | Notes |
|---|---|---|
| Browser reads | Public or dedicated read | Cache short TTL |
| API route sends | Premium write + SWQoS | Keys server-side only |
| SSR balance | Server read RPC | Watch rate limits |
| Alternative | Use When | Don't Use When |
|---|---|---|
| Mobile app release | Solana Mobile MWA | Web-only product |
| Edge middleware routing | Multi-region RPC | Simple single RPC |
| Blue/green Vercel | Zero-downtime cutover | Tiny team overhead |
Independent of program; many teams ship daily with flags.
Hard-block mainnet env on preview; use devnet program IDs only.
Env per environment; rotate via hosting provider secrets without rebuild if using runtime config.
Same change window for IDL-breaking releases; frontend can lead with flags.
Revert deploy in hosting UI; purge CDN cache; announce if user-facing.
Show IDL_VERSION in footer for support correlation.
SSR for reads only; signing stays client-side.
Playwright against staging with devnet wallet fixture.
Config map per program; validate all at build.
Status page links to deployed version and known-good prior version.
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.
Reviewed by Chris St. John·Last updated Jul 16, 2026