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

@@ -53,30 +53,15 @@ class QuotaResult:
# ---------------------------------------------------------------------------
# Redis backend
# Redis backend (shared client from core.redis)
# ---------------------------------------------------------------------------
_async_redis = None
def _get_async_redis():
"""Return async Redis client or None. Uses REDIS_URL from env. Single shared client."""
global _async_redis
if _async_redis is not None:
return _async_redis if _async_redis is not False else None
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)
logger.info("Tier quota: using Redis for daily quota")
return _async_redis
except Exception as e:
logger.warning("Tier quota: Redis unavailable (%s), using in-memory fallback", e)
_async_redis = False
return None
"""Return async Redis client or None. Uses shared client from core.redis."""
from core.redis import get_async_redis
return get_async_redis()
# ---------------------------------------------------------------------------