|
5 | 5 | # Linux/macOS: cp .env.example .env |
6 | 6 | # PowerShell: Copy-Item .env.example .env |
7 | 7 |
|
8 | | -# ── Server Ports ──────────────────────────────────────────────────────────── |
9 | | -PORT=1234 # For Admin Server (Dashboard) |
10 | | -USER_PORT=1235 # For User Server (Public API) |
| 8 | +# ============================================================================== |
| 9 | +# [REQUIRED] CORE SETTINGS (Needed to run urBackend locally) |
| 10 | +# ============================================================================== |
| 11 | + |
| 12 | +# ── Server Ports ── |
| 13 | +PORT=1234 # Admin Server (Dashboard) |
| 14 | +USER_PORT=1235 # User Server (Public API) |
11 | 15 | NODE_ENV=development |
12 | 16 |
|
13 | | -# ── Database & Cache ──────────────────────────────────────────────────────── |
14 | | -# When using docker-compose, these are automatically overridden to point to |
15 | | -# internal service names (mongo, redis). You do NOT need to change these. |
| 17 | +# ── Database & Cache ── |
| 18 | +# When using docker-compose, these point to internal service names. |
| 19 | +# No need to change these for local testing. |
16 | 20 | MONGO_URL=mongodb://mongo:27017/urbackend |
17 | 21 | REDIS_URL=redis://redis:6379 |
18 | 22 |
|
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'))" |
28 | | -JWT_SECRET=your_super_secret_jwt_key_min_32_chars |
29 | | -ENCRYPTION_KEY=64_hex_characters_for_aes_256_gcm_key |
30 | | -API_KEY_SALT=your_random_api_key_salt |
| 23 | +# ── Authentication Secrets ── |
| 24 | +# Any random 32+ character strings will work for local dev. |
| 25 | +JWT_SECRET=super_secret_jwt_key_for_local_dev_only |
| 26 | +ENCRYPTION_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef |
| 27 | +API_KEY_SALT=super_secret_api_key_salt_for_dev |
| 28 | + |
| 29 | +# ── Frontend & Public API ── |
| 30 | +FRONTEND_URL=http://localhost:5173 |
| 31 | +PUBLIC_API_URL=http://localhost:1235 |
| 32 | + |
| 33 | + |
| 34 | +# ============================================================================== |
| 35 | +# [OPTIONAL] CLOUD & 3RD-PARTY INTEGRATIONS (For Production / Full Features) |
| 36 | +# ============================================================================== |
31 | 37 |
|
32 | | -# Public API userAuth token config (optional; defaults shown) |
| 38 | +# ── Authentication Token TTLs ── |
33 | 39 | PUBLIC_AUTH_ACCESS_TOKEN_TTL=15m |
34 | 40 | PUBLIC_AUTH_REFRESH_TOKEN_TTL_SECONDS=604800 |
35 | 41 |
|
36 | | -# ── External Storage (Supabase) ───────────────────────────────────────────── |
| 42 | +# ── External Storage (Supabase) ── |
37 | 43 | # Required for file upload/storage features. |
38 | 44 | # Get from: https://app.supabase.com → Project Settings → API |
39 | | -SUPABASE_URL=https://your-project.supabase.co |
40 | | -SUPABASE_KEY=your-supabase-anon-key |
| 45 | +SUPABASE_URL= |
| 46 | +SUPABASE_KEY= |
41 | 47 |
|
42 | | -# ── Email (Resend) ────────────────────────────────────────────────────────── |
| 48 | +# ── Email (Resend) ── |
43 | 49 | # Required for OTP / email verification flow. |
44 | 50 | # Get from: https://resend.com/api-keys |
45 | | -RESEND_API_KEY=re_your_resend_api_key |
| 51 | +RESEND_API_KEY= |
46 | 52 | EMAIL_FROM=onboarding@resend.dev |
| 53 | +RESEND_WEBHOOK_SECRET= |
47 | 54 |
|
48 | | -# Get from: https://resend.com/webhooks → Create Endpoint |
49 | | -RESEND_WEBHOOK_SECRET=whsec_your_resend_webhook_secret |
50 | | - |
51 | | -# ── Frontend ──────────────────────────────────────────────────────────────── |
52 | | -FRONTEND_URL=http://localhost:5173 |
53 | | -PUBLIC_API_URL=https://api.ub.bitbros.in |
54 | | - |
55 | | -# ── Billing (Razorpay) ────────────────────────────────────────────────────── |
| 55 | +# ── Billing (Razorpay) ── |
| 56 | +# Required for paid plans and subscription management. |
56 | 57 | # Get from: https://dashboard.razorpay.com → Settings → API Keys |
57 | | -RAZORPAY_KEY_ID=rzp_test_xxxxxxxxxxxx |
58 | | -RAZORPAY_KEY_SECRET=xxxxxxxxxxxxxxxxxxxx |
59 | | - |
60 | | -# Create from: https://dashboard.razorpay.com → Subscriptions → Plans → Create Plan |
61 | | -RAZORPAY_PLAN_ID=plan_xxxxxxxxxxxx |
62 | | - |
63 | | -# Get from: https://dashboard.razorpay.com → Settings → Webhooks → Add Endpoint |
64 | | -RAZORPAY_WEBHOOK_SECRET=whsec_xxxxxxxxxxxx |
| 58 | +RAZORPAY_KEY_ID= |
| 59 | +RAZORPAY_KEY_SECRET= |
| 60 | +RAZORPAY_PLAN_ID= |
| 61 | +RAZORPAY_WEBHOOK_SECRET= |
65 | 62 |
|
66 | | -# ── Internal Microservices (AI & Python) ──────────────────────────────────── |
| 63 | +# ── Internal Microservices (AI & Python) ── |
67 | 64 | # Required for AI Query Builder and Python microservice communication |
68 | 65 | 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 |
| 66 | +INTERNAL_SECRET= |
| 67 | +GROQ_API_KEY= |
0 commit comments