Initial commit: CI Agent competitive-intelligence monitoring app

FastAPI + Celery + Next.js + Postgres/Redis app with company monitoring,
source collection, LLM-based change analysis, enrichment, and account
security (Turnstile, escalating lockout, email verification).
This commit is contained in:
2026-08-05 10:48:20 -04:00
commit 1a4c80958f
365 changed files with 43541 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
"""Resolves NINJAPEAR_API_KEY to a concrete enrichment provider instance.
Never imported directly by enrichment_service - always go through
`get_enrichment_provider()` so a future second vendor stays a one-line
config change, matching app/search/factory.py's shape."""
from __future__ import annotations
from app.core.config import Settings, get_settings
from app.enrichment.base import EnrichmentProvider
from app.enrichment.mock import MockEnrichmentProvider
def get_enrichment_provider(settings: Settings | None = None) -> EnrichmentProvider:
settings = settings or get_settings()
if settings.ninjapear_api_key:
from app.enrichment.ninjapear import NinjaPearProvider
return NinjaPearProvider(settings)
return MockEnrichmentProvider()