From 76bebe23fce03e86fe44d3df7fc5bae619f71cc3 Mon Sep 17 00:00:00 2001 From: udaycodespace Date: Tue, 26 May 2026 11:17:03 +0530 Subject: [PATCH 1/2] fix(dx): clean up duplicate env entries in .env.example --- .env.example | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index 7b1ba7ae..a0e0bf0b 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,9 @@ # ───────────────────────────────────────────────────────────────────────────── # urBackend — Environment Variables -# Copy this file to .env and fill in your values before running docker-compose. # ───────────────────────────────────────────────────────────────────────────── +# Copy this file before editing: +# Linux/macOS: cp .env.example .env +# PowerShell: Copy-Item .env.example .env # ── Server Ports ──────────────────────────────────────────────────────────── PORT=1234 # For Admin Server (Dashboard) @@ -16,6 +18,7 @@ MONGO_URL=mongodb://mongo:27017/urbackend REDIS_URL=redis://redis:6379 # ── Authentication ──────────────────────────────────────────────────────────── +# Generate random strings for these values (e.g., `openssl rand -base64 32`) JWT_SECRET=your_super_secret_jwt_key_min_32_chars ENCRYPTION_KEY=32_character_long_string_for_byod_creds API_KEY_SALT=your_random_api_key_salt @@ -26,18 +29,21 @@ PUBLIC_AUTH_REFRESH_TOKEN_TTL_SECONDS=604800 # ── External Storage (Supabase) ─────────────────────────────────────────────── # Required for file upload/storage features. +# Get from: https://app.supabase.com → Project Settings → API SUPABASE_URL=https://your-project.supabase.co SUPABASE_KEY=your-supabase-anon-key # ── Email (Resend) ──────────────────────────────────────────────────────────── # Required for OTP / email verification flow. +# Get from: https://resend.com/api-keys RESEND_API_KEY=re_your_resend_api_key EMAIL_FROM=onboarding@resend.dev + +# Get from: https://resend.com/webhooks → Create Endpoint RESEND_WEBHOOK_SECRET=whsec_your_resend_webhook_secret # ── Frontend ────────────────────────────────────────────────────────────────── FRONTEND_URL=http://localhost:5173 - PUBLIC_API_URL=https://api.ub.bitbros.in # ── Billing (Razorpay) ─────────────────────────────────────────────────────── @@ -45,11 +51,8 @@ PUBLIC_API_URL=https://api.ub.bitbros.in RAZORPAY_KEY_ID=rzp_test_xxxxxxxxxxxx RAZORPAY_KEY_SECRET=xxxxxxxxxxxxxxxxxxxx -# Create from: Razorpay Dashboard → Subscriptions → Plans → Create Plan +# Create from: https://dashboard.razorpay.com → Subscriptions → Plans → Create Plan RAZORPAY_PLAN_ID=plan_xxxxxxxxxxxx -# Set from: Razorpay Dashboard → Settings → Webhooks → Add Endpoint → copy secret -RAZORPAY_KEY_ID=rzp_testx_xxxx -RAZORPAY_KEY_SECRET=xxxx -RAZORPAY_PLAN_ID=xxxx -RAZORPAY_WEBHOOK_SECRET=xxxx +# Get from: https://dashboard.razorpay.com → Settings → Webhooks → Add Endpoint +RAZORPAY_WEBHOOK_SECRET=whsec_xxxxxxxxxxxx \ No newline at end of file From ff0d7aa080203a0032b02fed8f0fa393dad38783 Mon Sep 17 00:00:00 2001 From: SOMAPURAM UDAY Date: Tue, 26 May 2026 17:35:10 +0530 Subject: [PATCH 2/2] fix(dx): add Node.js secret generation examples Updated examples for JWT_SECRET and ENCRYPTION_KEY in .env.example. --- .env.example | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index c3875638..277c0f80 100644 --- a/.env.example +++ b/.env.example @@ -18,8 +18,13 @@ REDIS_URL=redis://redis:6379 # ── Authentication ────────────────────────────────────────────────────────── # Generate random secrets for these values. -# JWT_SECRET/API_KEY_SALT example: `openssl rand -base64 32` -# ENCRYPTION_KEY must be 64 hex chars (32 bytes), example: `openssl rand -hex 32` +# JWT_SECRET/API_KEY_SALT examples: +# openssl rand -base64 32 +# node -e "console.log(require('crypto').randomBytes(32).toString('base64'))" +# +# ENCRYPTION_KEY must be 64 hex chars (32 bytes), examples: +# openssl rand -hex 32 +# node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" JWT_SECRET=your_super_secret_jwt_key_min_32_chars ENCRYPTION_KEY=64_hex_characters_for_aes_256_gcm_key API_KEY_SALT=your_random_api_key_salt @@ -62,4 +67,4 @@ RAZORPAY_WEBHOOK_SECRET=whsec_xxxxxxxxxxxx # Required for AI Query Builder and Python microservice communication PYTHON_SERVICE_URL=http://localhost:8000 INTERNAL_SECRET=generate_a_random_32_char_secret_here -GROQ_API_KEY=gsk_your_groq_api_key_here \ No newline at end of file +GROQ_API_KEY=gsk_your_groq_api_key_here