-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
92 lines (76 loc) · 3.24 KB
/
env.example
File metadata and controls
92 lines (76 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Local development environment variables (backend)
#
# Usage:
# cp env.example .env
#
# Notes:
# - `.env` is gitignored.
# - The backend loads `./.env` automatically in development via `src/lib/env-loader.ts`.
# -----------------------------------------------------------------------------
# Runtime / Logging
# -----------------------------------------------------------------------------
NODE_ENV=development
LOG_LEVEL=info
# -----------------------------------------------------------------------------
# Service Ports (defaults match Makefile)
# -----------------------------------------------------------------------------
API_PORT=3003
SSE_PORT=3004
RESTATE_PORT=9080
# -----------------------------------------------------------------------------
# Infrastructure
# -----------------------------------------------------------------------------
NATS_URL=nats://localhost:4222
RESTATE_INGRESS_URL=http://localhost:8080
# Optional Restate client tuning
RESTATE_TIMEOUT_MS=30000
RESTATE_API_TIMEOUT_MS=15000
# -----------------------------------------------------------------------------
# CORS (comma-separated)
# -----------------------------------------------------------------------------
CORS_ORIGINS=http://localhost:3005,http://localhost:3003,http://127.0.0.1:3005,http://127.0.0.1:3003
# -----------------------------------------------------------------------------
# Security / Secrets (safe defaults for local dev; CHANGE for production)
# -----------------------------------------------------------------------------
IP_HASH_SALT=dev-ip-hash-salt-change-me
PURCHASE_TOKEN_SECRET=dev-purchase-secret-change-in-prod
ADMIN_SECRET=dev-admin-secret-change-me
# -----------------------------------------------------------------------------
# Bot Mitigation
# -----------------------------------------------------------------------------
# Keep this low for local testing; increase in prod.
POW_DIFFICULTY=2
MIN_TRUST_SCORE=50
# Optional: enable FingerprintJS Pro verification
FINGERPRINT_API_KEY=
# -----------------------------------------------------------------------------
# Rate Limiting
# -----------------------------------------------------------------------------
RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_MAX_REQUESTS=10
RATE_LIMIT_STRICT_WINDOW_MS=60000
RATE_LIMIT_STRICT_MAX_REQUESTS=5
# Set true for load testing (also used by `make backend-test`)
SKIP_RATE_LIMIT=false
# -----------------------------------------------------------------------------
# Queue (token sequencing)
# -----------------------------------------------------------------------------
QUEUE_ENABLED=true
QUEUE_ADMISSION_RATE=20
QUEUE_MAX_CONCURRENT=50
QUEUE_READY_WINDOW=30
QUEUE_MAX_AGE=10
QUEUE_MIN_BEHAVIOR_SCORE=30
QUEUE_ADMISSION_TICK_MS=1000
# -----------------------------------------------------------------------------
# Maintenance
# -----------------------------------------------------------------------------
ENABLE_PERIODIC_CLEANUP=true
CLEANUP_INTERVAL_MS=300000
# -----------------------------------------------------------------------------
# Optional helpers
# -----------------------------------------------------------------------------
# Used by `pnpm init-drop` (tsx script), not by `make init-drop` (curl)
DROP_ID=
# You can point the backend .env loader somewhere else if needed
ENV_FILE=