Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 185 additions & 0 deletions .env.production.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# ========================================
# CASTQUEST V3 - Production Environment Template
# ========================================
# Copy this file to .env.production and fill in actual values
# NEVER commit .env.production with real secrets!

# ========================================
# Blockchain RPC Endpoints
# ========================================
# Ethereum Mainnet
RPC_URL_MAINNET=https://eth-mainnet.alchemyapi.io/v2/YOUR_ALCHEMY_KEY
# Base Mainnet
RPC_URL_BASE=https://base-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY
# Arbitrum One
RPC_URL_ARBITRUM=https://arb-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY
# Optimism Mainnet
RPC_URL_OPTIMISM=https://opt-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY
# Polygon Mainnet
RPC_URL_POLYGON=https://polygon-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY
# Solana Mainnet
RPC_URL_SOLANA=https://api.mainnet-beta.solana.com

# ========================================
# Contract Deployment
# ========================================
# CRITICAL: Keep this secure! Use hardware wallet or KMS in production
PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000000
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PRIVATE_KEY in the template is all zeros (0x00...00), which is actually a valid private key format that could theoretically be used. For a template, use a more obviously invalid placeholder like 'your-private-key-here' or add a validation check to prevent deployment with this key.

Suggested change
PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000000
PRIVATE_KEY=your-private-key-here

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2bbf937. Changed PRIVATE_KEY placeholder from all zeros to your-private-key-here to make it obviously invalid and prevent accidental use.

DEPLOYER_ADDRESS=0x0000000000000000000000000000000000000000

# Chain IDs
CHAIN_ID_MAINNET=1
CHAIN_ID_BASE=8453
CHAIN_ID_ARBITRUM=42161
CHAIN_ID_OPTIMISM=10
CHAIN_ID_POLYGON=137

# ========================================
# Database
# ========================================
DATABASE_URL=postgresql://username:password@localhost:5432/castquest_prod
DATABASE_POOL_SIZE=20
DATABASE_SSL=true

# Redis
REDIS_URL=redis://localhost:6379
REDIS_TLS_ENABLED=true

# ========================================
# Next.js Public Variables
# ========================================
NEXT_PUBLIC_APP_URL=https://castquest.io
NEXT_PUBLIC_API_URL=https://api.castquest.io
NEXT_PUBLIC_WS_URL=wss://ws.castquest.io

# Contract Addresses (update after deployment)
NEXT_PUBLIC_CAST_TOKEN_ADDRESS=
NEXT_PUBLIC_QUEST_TOKEN_ADDRESS=
NEXT_PUBLIC_MARKETPLACE_ADDRESS=
NEXT_PUBLIC_AUCTION_HOUSE_ADDRESS=

# Network Configuration
NEXT_PUBLIC_DEFAULT_CHAIN_ID=8453
NEXT_PUBLIC_SUPPORTED_CHAINS=1,8453,42161,10,137

# ========================================
# AI Provider Keys
# ========================================
# OpenAI
OPENAI_API_KEY=sk-proj-xxxxxxxxxxxxxxxxxxxxxxxxxxxx
OPENAI_ORG_ID=org-xxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Anthropic Claude
ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Hugging Face (for local models)
HUGGINGFACE_API_KEY=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

# ========================================
# Storage & CDN
# ========================================
# AWS S3
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=AKIAXXXXXXXXXXXX
AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AWS_S3_BUCKET_NAME=castquest-prod-assets
AWS_CLOUDFRONT_DISTRIBUTION_ID=E1234567890ABC

# IPFS/Pinata
PINATA_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxx
PINATA_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
IPFS_GATEWAY_URL=https://gateway.pinata.cloud

# ========================================
# Authentication & Security
# ========================================
# NextAuth
NEXTAUTH_URL=https://castquest.io
NEXTAUTH_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# JWT
JWT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
JWT_EXPIRY=7d

# Rate Limiting
RATE_LIMIT_MAX_REQUESTS=100
RATE_LIMIT_WINDOW_MS=900000

# ========================================
# External APIs
# ========================================
# Farcaster
FARCASTER_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
FARCASTER_HUB_URL=https://hub.farcaster.xyz

# Wallet Connect
WALLETCONNECT_PROJECT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Alchemy
ALCHEMY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Etherscan (for verification)
ETHERSCAN_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
BASESCAN_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
ARBISCAN_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxx

# ========================================
# Monitoring & Telemetry
# ========================================
# Sentry
SENTRY_DSN=https://xxxxxxxxxxxxxxxxxxxxxxxxxxxx@sentry.io/1234567
SENTRY_ENV=production
SENTRY_TRACES_SAMPLE_RATE=0.1

# Datadog
DD_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
DD_APP_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
DD_SITE=datadoghq.com

# Prometheus/Grafana
METRICS_ENABLED=true
METRICS_PORT=9090

# ========================================
# Email & Notifications
# ========================================
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=587
SMTP_USER=apikey
SMTP_PASSWORD=SG.xxxxxxxxxxxxxxxxxxxxxxxxxxxx
EMAIL_FROM=noreply@castquest.io

# Slack Webhooks (for alerts)
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxx/yyy/zzz

# ========================================
# Feature Flags
# ========================================
ENABLE_L3_FEATURES=true
ENABLE_SOLANA_INTEGRATION=true
ENABLE_AUCTION_HOUSE=true
ENABLE_SOCIAL_AUTOMATION=true

# ========================================
# Performance & Scaling
# ========================================
NODE_ENV=production
LOG_LEVEL=info
MAX_WORKERS=4
CACHE_TTL=3600

# ========================================
# Infrastructure
# ========================================
# Kubernetes
K8S_NAMESPACE=castquest-prod
K8S_CLUSTER_NAME=castquest-prod-cluster

# Docker Registry
DOCKER_REGISTRY=ghcr.io/castquest
DOCKER_IMAGE_TAG=latest

# Terraform State
TF_STATE_BUCKET=castquest-terraform-state
TF_STATE_KEY=prod/terraform.tfstate
TF_STATE_REGION=us-east-1
29 changes: 29 additions & 0 deletions .eslintrc.security.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"extends": ["eslint:recommended"],
"env": {
"node": true,
"es2020": true
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["security"],
"rules": {
"security/detect-object-injection": "warn",
"security/detect-non-literal-regexp": "warn",
"security/detect-non-literal-require": "warn",
"security/detect-unsafe-regex": "error",
"security/detect-buffer-noassert": "error",
"security/detect-child-process": "warn",
"security/detect-disable-mustache-escape": "error",
"security/detect-eval-with-expression": "error",
"security/detect-no-csrf-before-method-override": "error",
"security/detect-non-literal-fs-filename": "warn",
"security/detect-pseudoRandomBytes": "error",
"security/detect-possible-timing-attacks": "warn",
"no-eval": "error",
"no-implied-eval": "error",
"no-new-func": "error"
}
}
Loading
Loading