-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
59 lines (46 loc) · 1.85 KB
/
Copy path.env.example
File metadata and controls
59 lines (46 loc) · 1.85 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
# server
PORT=4000
# MONGO DB
MONGO_URI=
# GCP
GOOGLE_CLIENT_SECRET=
WEB_GOOGLE_CLIENT_ID=
GOOGLE_REDIRECT_URI=http://localhost:4000/api/v1/auth/oauth2callback
# API Keys
NEWSAPIORG_API_KEY= # Get from https://newsapi.org/account
GUARDIAN_API_KEY= # Get from https://open-platform.theguardian.com/access/
NYTIMES_API_KEY= # Get from https://developer.nytimes.com/apis
NYTIMES_API_SECRET=
GOOGLE_TRANSLATE_API_KEY=
GEMINI_API_KEY=
HUGGINGFACE_API_TOKEN= # Get from https://huggingface.co/settings/tokens
# Auth
EMAIL_USER=
EMAIL_PASS=
MAGIC_LINK_EXPIRY=15m
FRONTEND_URL=http://localhost:4000
# JWT
ACCESS_TOKEN_SECRET=
ACCESS_TOKEN_EXPIRY=30d
REFRESH_TOKEN_SECRET=
REFRESH_TOKEN_EXPIRY=60d
# Cache
RECOMMENDATION_CACHE_DURATION=3600000 # 60 * 60 * 1000 => 60 min (1 hour)
# Rate Limiting Configuration
AI_WINDOW_MS=300000 # 5 minute in milliseconds (5 * 60 * 1000)
AI_MAX_REQUESTS=30 # 30 AI requests per window
NEWS_SCRAPING_WINDOW_MS=900000 # 15 minutes in milliseconds (15 * 60 * 1000)
NEWS_SCRAPING_MAX_REQUESTS=50 # 50 scraping requests per window
AUTH_WINDOW_MS=900000 # 15 minutes in milliseconds (15 * 60 * 1000)
AUTH_MAX_REQUESTS=10 # 10 auth attempts per window per IP
BOOKMARK_WINDOW_MS=300000 # 5 minutes in milliseconds (5 * 60 * 1000)
BOOKMARK_MAX_REQUESTS=20 # 20 bookmark operations per window per user
READING_HISTORY_WINDOW_MS=300000 # 5 minutes in milliseconds (5 * 60 * 1000)
READING_HISTORY_MAX_REQUESTS=30 # 30 reading history operations per window per user
USER_PREFERENCES_WINDOW_MS=900000 # 15 minutes in milliseconds (15 * 60 * 1000)
USER_PREFERENCES_MAX_REQUESTS=10 # 10 preference changes per window per user
# News Classification - Strike
STRIKE_COOLDOWN_COUNT=2 # Strike count for cooldown warnings (strikes 1-2)
STRIKE_TEMPORARY_BLOCK_COUNT=3 # Strike count for temporary block
STRIKE_TEMPORARY_BLOCK_DURATION=15 # 15m
STRIKE_LONG_BLOCK_DURATION=2 # 2d