Skip to content

docs: improve .template.env with comments and Base Sepolia RPC example#2650

Closed
schoolkamsergj wants to merge 1 commit into
coinbase:mainfrom
schoolkamsergj:fix/template-env-base-sepolia
Closed

docs: improve .template.env with comments and Base Sepolia RPC example#2650
schoolkamsergj wants to merge 1 commit into
coinbase:mainfrom
schoolkamsergj:fix/template-env-base-sepolia

Conversation

@schoolkamsergj
Copy link
Copy Markdown

Summary

Improves the .template.env file in the onchainkit-nextjs template to reduce onboarding friction for new developers.

Closes #2644

Changes

  • Added a header comment explaining how to copy the file to .env.local
  • Added inline comments describing each environment variable
  • Added a link to Coinbase Developer Platform for obtaining the API key
  • Added commented-out Base Sepolia and Base Mainnet RPC URL examples
  • Added a note recommending dedicated RPC providers for production use

Before

NEXT_PUBLIC_PROJECT_NAME="template-next-basic"
NEXT_PUBLIC_ONCHAINKIT_API_KEY=""

After

# ─────────────────────────────────────────────────────────────────
# OnchainKit Next.js Template — Environment Configuration
# Copy this file to .env.local and fill in your values:
#   cp .template.env .env.local
# ─────────────────────────────────────────────────────────────────

# Your project name (used for display purposes)
NEXT_PUBLIC_PROJECT_NAME="my-onchainkit-app"

# OnchainKit API key — get yours free at https://portal.cdp.coinbase.com
NEXT_PUBLIC_ONCHAINKIT_API_KEY=""

# ─────────────────────────────────────────────────────────────────
# Network / RPC Configuration (optional)
# ─────────────────────────────────────────────────────────────────

# Base Sepolia (testnet) — public endpoint, no key required:
# NEXT_PUBLIC_RPC_URL="https://sepolia.base.org"

# Base Mainnet — public endpoint, no key required:
# NEXT_PUBLIC_RPC_URL="https://mainnet.base.org"

# For production use a dedicated RPC from Coinbase Developer Platform,
# Alchemy, or QuickNode for better reliability and higher rate limits.

Motivation

The current template has only two bare variables with no explanation. New developers — especially those new to Base — often don't know where to get the API key, what RPC to use for testnet, or even that they need to copy this file to .env.local. These small additions significantly reduce setup friction.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

@schoolkamsergj is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@cb-heimdall
Copy link
Copy Markdown

cb-heimdall commented May 18, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@schoolkamsergj schoolkamsergj force-pushed the fix/template-env-base-sepolia branch from 6adbf9e to 71b8642 Compare May 18, 2026 07:22
@schoolkamsergj
Copy link
Copy Markdown
Author

Closing in favor of #2651 which covers onchainkit-nextjs and minikit-nextjs more comprehensively in a single PR.

My #2649 focuses exclusively on packages/playground/.env.template — which is not covered by #2651 — so the two PRs address different files with no overlap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Documentation Request: Improve template environment configuration for Base Sepolia development

2 participants