-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
114 lines (97 loc) · 4.97 KB
/
Copy path.env.example
File metadata and controls
114 lines (97 loc) · 4.97 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Backend Environment Configuration Template
# Truthopi - Python FastAPI Backend
#
# Copy this file to .env and fill in your actual values
# This file should be committed to version control
# Actual values should NEVER be committed to version control
# ============================================================================
# Database Configuration
# ============================================================================
# PostgreSQL connection string
# Format: postgresql://username:password@hostname:port/database_name
# Examples:
# - Local development: postgresql://eyad:password@localhost:5432/truthopi_db
# - Docker: postgresql://postgres:password@db:5432/truthopi_db
# - Remote: postgresql://user:pass@rds-endpoint.amazonaws.com:5432/truthopi_db
DATABASE_URL=postgresql://user:password@localhost:5432/truthopi_db
# ============================================================================
# Blockchain & Smart Contract Configuration
# ============================================================================
# Ethereum RPC endpoint for smart contract interactions
# Can be local (Ganache, Hardhat) or remote (Alchemy, Infura)
# Local development: http://127.0.0.1:8545
# Sepolia testnet: https://eth-sepolia.g.alchemy.com/v2/YOUR_API_KEY
# Mainnet: https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY
RPC_URL=http://127.0.0.1:8545
# Private key of the wallet that signs transactions and stores hashes on blockchain
# Must start with 0x
# IMPORTANT: This account must have ETH for gas fees
KMS_PRIVATE_KEY=0xYOUR_PRIVATE_KEY_HERE
# Deployed smart contract address on the blockchain network
# This contract handles storing and verifying image hashes
# Format: 0x[40 hex characters]
CONTRACT_ADDRESS=0xYOUR_CONTRACT_ADDRESS_HERE
# ============================================================================
# JWT & Security Configuration
# ============================================================================
# Secret key for JWT token signing (not used for password hashing, which uses bcrypt)
# Must be long and random in production (minimum 32 characters)
# Generate with: python -c "import secrets; print(secrets.token_urlsafe(32))"
# IMPORTANT: Never expose this in logs or version control
JWT_SECRET_KEY=your-secret-key-change-in-production
# JWT algorithm (typically HS256)
ALGORITHM=HS256
# JWT token expiration time in minutes
ACCESS_TOKEN_EXPIRE_MINUTES=300
# ============================================================================
# Google OAuth2 Configuration
# ============================================================================
# Google OAuth2 configuration for user authentication
# Get these from: https://console.developers.google.com
# Google Client ID for OAuth2
# Create an OAuth 2.0 credential (Web Application type)
GOOGLE_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID_HERE.apps.googleusercontent.com
# Google Client Secret for OAuth2
# IMPORTANT: Keep this secret! Never expose in logs or frontend
GOOGLE_CLIENT_SECRET=YOUR_GOOGLE_CLIENT_SECRET_HERE
# Redirect URI after successful Google OAuth2 authentication
# Must match the authorized redirect URI in Google Cloud Console
# Development: http://localhost:3000/auth/callback
# Production: https://yourdomain.com/auth/callback
GOOGLE_REDIRECT_URI=http://localhost:3000/auth/callback
# ============================================================================
# Google Service Account Configuration (Optional)
# ============================================================================
# Path to Google Service Account JSON file
# Used for:
# - Play Integrity API verification for mobile app
# - Server-to-server Google API calls
# - Download from Google Cloud Console > Service Accounts
# Leave as 'service_account.json' if file is in root directory
GOOGLE_SERVICE_ACCOUNT_PATH=service_account.json
# ============================================================================
# Logging & Monitoring
# ============================================================================
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL=INFO
# Enable CORS for frontend access
CORS_ORIGINS=http://localhost:3000,http://localhost:3001
# ============================================================================
# API Configuration
# ============================================================================
# API version prefix
API_VERSION=v1
# Maximum upload file size in bytes (e.g., 50MB)
MAX_FILE_SIZE=52428800
# ============================================================================
# S3 / DigitalOcean Spaces Configuration (Video Storage)
# ============================================================================
# Used for storing video files. The backend generates signed upload URLs
# so the mobile app can PUT videos directly to object storage.
# DigitalOcean Spaces: https://<region>.digitaloceanspaces.com
# AWS S3: https://s3.<region>.amazonaws.com
S3_ENDPOINT_URL=https://nyc3.digitaloceanspaces.com
S3_ACCESS_KEY=YOUR_SPACES_ACCESS_KEY_HERE
S3_SECRET_KEY=YOUR_SPACES_SECRET_KEY_HERE
S3_BUCKET_NAME=realphoto-videos
S3_REGION=nyc3