feat: production deployment - full update with providers, admin, glossaries, pricing, tests

Major changes across backend, frontend, infrastructure:
- Provider system with model selection (Google, DeepL, OpenAI, Ollama, Google Cloud)
- Admin panel: user management, pricing, settings
- Glossary system with CSV import/export
- Subscription and tier quota management
- Security hardening (rate limiting, API key auth, path traversal fixes)
- Docker compose for dev, prod, and IONOS deployment
- Alembic migrations for new tables
- Frontend: dashboard, pricing page, landing page, i18n (en/fr)
- Test suite and verification scripts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Sepehr Ramezani
2026-04-25 15:01:47 +02:00
parent 2ba4fedfc8
commit 26bd096a06
1178 changed files with 136435 additions and 3047 deletions

View File

@@ -5,14 +5,10 @@ from datetime import datetime, timezone
from typing import Optional, Any, Dict
from config import config
try:
import structlog
from core.logging import get_logger
logger = structlog.get_logger(__name__)
_HAS_STRUCTLOG = True
except ImportError:
logger = logging.getLogger(__name__)
_HAS_STRUCTLOG = False
logger = get_logger(__name__)
_HAS_STRUCTLOG = True
def _log_info(event: str, **kwargs):
@@ -40,38 +36,16 @@ KEY_PREFIX = "translation:file"
def _get_default_ttl() -> int:
"""Get TTL from config or default to 60 minutes."""
try:
from config import config
return config.FILE_TTL_MINUTES * 60
except Exception:
return 3600 # 60 minutes default
_async_redis = None
def _get_async_redis():
"""Return async Redis client or None. Uses REDIS_URL from env."""
global _async_redis
if _async_redis is not None:
return _async_redis if _async_redis is not False else None
"""Return shared async Redis client from core.redis."""
from core.redis import get_async_redis
# Try to get from environment first
url = os.getenv("REDIS_URL", "").strip()
if not url:
_async_redis = False
return None
try:
import redis.asyncio as redis
_async_redis = redis.Redis.from_url(url, decode_responses=True)
_log_info("redis_connected", service="storage_tracker")
return _async_redis
except Exception as e:
_log_error("redis_connection_failed", service="storage_tracker", error=str(e))
_async_redis = False
return None
return get_async_redis()
class StorageTracker: