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
@@ -0,0 +1,24 @@
from __future__ import annotations
import uuid
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
from app.models.notification_delivery import NotificationDelivery
class NotificationDeliveryRepository:
def __init__(self, db: AsyncSession) -> None:
self.db = db
async def create(self, delivery: NotificationDelivery) -> NotificationDelivery:
self.db.add(delivery)
await self.db.flush()
return delivery
async def list_for_alert(self, alert_id: uuid.UUID) -> list[NotificationDelivery]:
result = await self.db.execute(
select(NotificationDelivery).where(NotificationDelivery.alert_id == alert_id)
)
return list(result.scalars().all())