|
1 | 1 | # ───────────────────────────────────────────────────────────────────────────── |
2 | 2 | # urBackend — Environment Variables |
3 | | -# Copy this file to .env and fill in your values before running docker-compose. |
4 | 3 | # ───────────────────────────────────────────────────────────────────────────── |
| 4 | +# Copy this file before editing: |
| 5 | +# Linux/macOS: cp .env.example .env |
| 6 | +# PowerShell: Copy-Item .env.example .env |
5 | 7 |
|
6 | 8 | # ── Server Ports ──────────────────────────────────────────────────────────── |
7 | 9 | PORT=1234 # For Admin Server (Dashboard) |
8 | 10 | USER_PORT=1235 # For User Server (Public API) |
9 | 11 | NODE_ENV=development |
10 | 12 |
|
11 | | - |
12 | | -# ── Database & Cache ────────────────────────────────────────────────────────── |
| 13 | +# ── Database & Cache ──────────────────────────────────────────────────────── |
13 | 14 | # When using docker-compose, these are automatically overridden to point to |
14 | 15 | # internal service names (mongo, redis). You do NOT need to change these. |
15 | 16 | MONGO_URL=mongodb://mongo:27017/urbackend |
16 | 17 | REDIS_URL=redis://redis:6379 |
17 | 18 |
|
18 | | -# ── Authentication ──────────────────────────────────────────────────────────── |
| 19 | +# ── Authentication ────────────────────────────────────────────────────────── |
| 20 | +# Generate random secrets for these values. |
| 21 | +# JWT_SECRET/API_KEY_SALT examples: |
| 22 | +# openssl rand -base64 32 |
| 23 | +# node -e "console.log(require('crypto').randomBytes(32).toString('base64'))" |
| 24 | +# |
| 25 | +# ENCRYPTION_KEY must be 64 hex chars (32 bytes), examples: |
| 26 | +# openssl rand -hex 32 |
| 27 | +# node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" |
19 | 28 | JWT_SECRET=your_super_secret_jwt_key_min_32_chars |
20 | | -ENCRYPTION_KEY=32_character_long_string_for_byod_creds |
| 29 | +ENCRYPTION_KEY=64_hex_characters_for_aes_256_gcm_key |
21 | 30 | API_KEY_SALT=your_random_api_key_salt |
22 | 31 |
|
23 | 32 | # Public API userAuth token config (optional; defaults shown) |
24 | 33 | PUBLIC_AUTH_ACCESS_TOKEN_TTL=15m |
25 | 34 | PUBLIC_AUTH_REFRESH_TOKEN_TTL_SECONDS=604800 |
26 | 35 |
|
27 | | -# ── External Storage (Supabase) ─────────────────────────────────────────────── |
| 36 | +# ── External Storage (Supabase) ───────────────────────────────────────────── |
28 | 37 | # Required for file upload/storage features. |
| 38 | +# Get from: https://app.supabase.com → Project Settings → API |
29 | 39 | SUPABASE_URL=https://your-project.supabase.co |
30 | 40 | SUPABASE_KEY=your-supabase-anon-key |
31 | 41 |
|
32 | | -# ── Email (Resend) ──────────────────────────────────────────────────────────── |
| 42 | +# ── Email (Resend) ────────────────────────────────────────────────────────── |
33 | 43 | # Required for OTP / email verification flow. |
| 44 | +# Get from: https://resend.com/api-keys |
34 | 45 | RESEND_API_KEY=re_your_resend_api_key |
35 | 46 | EMAIL_FROM=onboarding@resend.dev |
| 47 | + |
| 48 | +# Get from: https://resend.com/webhooks → Create Endpoint |
36 | 49 | RESEND_WEBHOOK_SECRET=whsec_your_resend_webhook_secret |
37 | 50 |
|
38 | | -# ── Frontend ────────────────────────────────────────────────────────────────── |
| 51 | +# ── Frontend ──────────────────────────────────────────────────────────────── |
39 | 52 | FRONTEND_URL=http://localhost:5173 |
40 | | - |
41 | 53 | PUBLIC_API_URL=https://api.ub.bitbros.in |
42 | 54 |
|
43 | | -# ── Billing (Razorpay) ─────────────────────────────────────────────────────── |
| 55 | +# ── Billing (Razorpay) ────────────────────────────────────────────────────── |
44 | 56 | # Get from: https://dashboard.razorpay.com → Settings → API Keys |
45 | 57 | RAZORPAY_KEY_ID=rzp_test_xxxxxxxxxxxx |
46 | 58 | RAZORPAY_KEY_SECRET=xxxxxxxxxxxxxxxxxxxx |
47 | 59 |
|
48 | | -# Create from: Razorpay Dashboard → Subscriptions → Plans → Create Plan |
| 60 | +# Create from: https://dashboard.razorpay.com → Subscriptions → Plans → Create Plan |
49 | 61 | RAZORPAY_PLAN_ID=plan_xxxxxxxxxxxx |
50 | 62 |
|
51 | | -# Set from: Razorpay Dashboard → Settings → Webhooks → Add Endpoint → copy secret |
52 | | -RAZORPAY_KEY_ID=rzp_testx_xxxx |
53 | | -RAZORPAY_KEY_SECRET=xxxx |
54 | | -RAZORPAY_PLAN_ID=xxxx |
55 | | -RAZORPAY_WEBHOOK_SECRET=xxxx |
| 63 | +# Get from: https://dashboard.razorpay.com → Settings → Webhooks → Add Endpoint |
| 64 | +RAZORPAY_WEBHOOK_SECRET=whsec_xxxxxxxxxxxx |
| 65 | + |
| 66 | +# ── Internal Microservices (AI & Python) ──────────────────────────────────── |
| 67 | +# Required for AI Query Builder and Python microservice communication |
| 68 | +PYTHON_SERVICE_URL=http://localhost:8000 |
| 69 | +INTERNAL_SECRET=generate_a_random_32_char_secret_here |
| 70 | +GROQ_API_KEY=gsk_your_groq_api_key_here |
0 commit comments