This commit is contained in:
Joan
2025-11-27 16:27:01 +01:00
parent 33cc9586c2
commit 81f8912059
304 changed files with 56149 additions and 10122 deletions

32
api/core/config.py Normal file
View File

@@ -0,0 +1,32 @@
"""
Configuration module for the API.
All environment variables and constants are defined here.
"""
import os
# JWT Configuration
SECRET_KEY = os.getenv("JWT_SECRET_KEY", "your-secret-key-change-in-production-please")
ALGORITHM = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES = 60 * 24 * 7 # 7 days
# Internal API Key (for bot communication)
API_INTERNAL_KEY = os.getenv("API_INTERNAL_KEY", "change-this-internal-key")
# CORS Origins
CORS_ORIGINS = [
"https://staging.echoesoftheash.com",
"http://localhost:3000",
"http://localhost:5173"
]
# Database Configuration (imported from database module)
# DB settings are in database.py since they're tightly coupled with SQLAlchemy
# Image Directory
from pathlib import Path
IMAGES_DIR = Path(__file__).parent.parent.parent / "images"
# Game Constants
MOVEMENT_COOLDOWN = 5 # seconds
BASE_CARRYING_CAPACITY = 10.0 # kg
BASE_VOLUME_CAPACITY = 10.0 # liters