From 2e41156046e3d97db24f2a53ca643e823b53d83c Mon Sep 17 00:00:00 2001 From: hobokenchicken Date: Tue, 14 Apr 2026 11:14:37 -0400 Subject: [PATCH] chore: add .env.example template files Add environment variable templates for: - Root .env.example (all services) - backend/.env.example (API configuration) - frontend/.env.local.example (client config) Copy to .env and fill in your secrets before running. --- .env.example | 73 +++++++++++++++++++++++++++++++++++++ backend/.env.example | 35 ++++++++++-------- frontend/.env.local.example | 7 +++- 3 files changed, 97 insertions(+), 18 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..407909f --- /dev/null +++ b/.env.example @@ -0,0 +1,73 @@ +# ========================================== +# CoopCredits Environment Configuration +# Copy to .env and fill in your values +# ========================================== + +# Database +DATABASE_URL="postgresql://coop:CHANGE_PASSWORD@localhost:5432/coop_credits?schema=public" +POSTGRES_PASSWORD="CHANGE_THIS_PASSWORD" + +# Server +PORT=3001 +NODE_ENV=development +API_URL=http://localhost:3001 +FRONTEND_URL=http://localhost:3000 + +# JWT Secret (generate with: openssl rand -hex 32) +JWT_SECRET="" + +# ========================================== +# Plex OAuth +# Get from: https://plex.tv/claim or Plex account settings +# ========================================== +PLEX_CLIENT_ID="" +PLEX_CLIENT_SECRET="" +PLEX_REDIRECT_URI=http://localhost:3000/auth/callback + +# ========================================== +# Tautulli (Watch Analytics) +# ========================================== +# Your Tautulli instance URL +TAUTULLI_URL=http://172.20.1.255:8181 +# Get API key from: Tautulli Settings > Web Interface > API +TAUTULLI_API_KEY="" +# Optional: Secret for webhook signature verification +TAUTULLI_WEBHOOK_SECRET="" + +# ========================================== +# Overseer (Content Requests) +# ========================================== +# Your Overseer instance URL +OVERSEER_URL=http://172.20.1.225:5055 +# Get API key from: Overseer Settings > General +OVERSEER_API_KEY="" + +# ========================================== +# Solana (Devnet for testing) +# ========================================== +SOLANA_RPC_URL=https://api.devnet.solana.com +SOLANA_PROGRAM_ID=CoopCredits111111111111111111111111111111111 +# Generate keypair with: npm run setup:solana +SOLANA_MINT_AUTHORITY_KEYPAIR="" +SOLANA_TOKEN_DECIMALS=6 + +# ========================================== +# Redis (optional caching) +# ========================================== +REDIS_URL=redis://localhost:6379 +REDIS_PASSWORD="" + +# ========================================== +# Encryption (generate with: openssl rand -base64 32) +# Used for encrypting wallet private keys +# ========================================== +ENCRYPTION_KEY="" + +# ========================================== +# Frontend Public Variables +# ========================================== +NEXT_PUBLIC_API_URL=http://localhost:3001 +NEXT_PUBLIC_SOLANA_NETWORK=devnet +NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com +NEXT_PUBLIC_APP_NAME=CoopCredits +NEXT_PUBLIC_APP_URL=http://localhost:3000 diff --git a/backend/.env.example b/backend/.env.example index b8a5d48..59e0651 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -1,5 +1,8 @@ +# Backend Environment Variables +# Copy to .env and fill in your values + # Database -DATABASE_URL="postgresql://coop:coop_password@localhost:5432/coop_credits?schema=public" +DATABASE_URL="postgresql://coop:password@localhost:5432/coop_credits?schema=public" # Server PORT=3001 @@ -7,32 +10,32 @@ NODE_ENV=development API_URL=http://localhost:3001 FRONTEND_URL=http://localhost:3000 -# JWT -JWT_SECRET=your-super-secret-jwt-key-change-this-in-production -JWT_EXPIRES_IN=7d +# JWT (generate: openssl rand -hex 32) +JWT_SECRET="" # Plex OAuth -PLEX_CLIENT_ID=your-plex-client-id -PLEX_CLIENT_SECRET=your-plex-client-secret +PLEX_CLIENT_ID="" +PLEX_CLIENT_SECRET="" PLEX_REDIRECT_URI=http://localhost:3000/auth/callback # Tautulli -TAUTULLI_URL=http://localhost:8181 -TAUTULLI_API_KEY=your-tautulli-api-key -TAUTULLI_WEBHOOK_SECRET=your-webhook-secret +TAUTULLI_URL=http://172.20.1.255:8181 +TAUTULLI_API_KEY="" +TAUTULLI_WEBHOOK_SECRET="" # Overseer -OVERSEER_URL=http://localhost:5055 -OVERSEER_API_KEY=your-overseer-api-key +OVERSEER_URL=http://172.20.1.225:5055 +OVERSEER_API_KEY="" # Solana SOLANA_RPC_URL=https://api.devnet.solana.com SOLANA_PROGRAM_ID=CoopCredits111111111111111111111111111111111 -SOLANA_MINT_AUTHORITY_KEYPAIR=your-base58-encoded-keypair-for-minting +SOLANA_MINT_AUTHORITY_KEYPAIR="" SOLANA_TOKEN_DECIMALS=6 -# Redis (optional - for caching and pub/sub) -REDIS_URL=redis://localhost:6379 +# Security +ENCRYPTION_KEY="" +TRUST_PROXY=false -# Encryption (for wallet private keys) -ENCRYPTION_KEY=your-32-char-encryption-key!! +# Redis (optional) +REDIS_URL=redis://localhost:6379 diff --git a/frontend/.env.local.example b/frontend/.env.local.example index 400b819..a4e8d04 100644 --- a/frontend/.env.local.example +++ b/frontend/.env.local.example @@ -1,10 +1,13 @@ -# API +# Frontend Environment Variables +# Copy to .env.local and fill in your values + +# API URL NEXT_PUBLIC_API_URL=http://localhost:3001 # Solana NEXT_PUBLIC_SOLANA_NETWORK=devnet NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com -# App +# App Info NEXT_PUBLIC_APP_NAME=CoopCredits NEXT_PUBLIC_APP_URL=http://localhost:3000