In high-stakes litigation, learning about an emergency stay or bench order 30 minutes before opposing counsel can determine the outcome of a case. Yet state and federal court portals (such as PACER and state registry websites) rarely provide modern Webhooks or event streaming APIs.
To power QanoonMate's real-time litigation alert engine, we engineered a fault-tolerant scraping and streaming ingestion fabric that harmonizes erratic legacy government portals into structured real-time events.
Architectural Ingestion Pipeline
Government Court Registry Portal (Legacy ASP.NET / Oracle)
│
▼
[Polite Distributed Poller Fleet]
- Exponential Jitter Backoff
- IP Proxy Rotation & Session Keepalive
│
▼
[HTML Diffing & Entity Extraction]
- Detects new docket entries & judge signatures
│
▼
[NATS JetStream Ingestion Fabric]
│
┌────────────────┴────────────────┐
▼ ▼
[Postgres Matter DB] [Realtime Webhook Dispatcher]
(Permanent Legal Record) (Pushes alert to lawyers' phones)
Preventing Duplicate Alert Storms
Legacy court portals frequently reset or rollback session state during nightly maintenance. If a poller sees 50 docket entries re-appear as "new", sending 50 duplicate SMS and push alerts to senior partners destroys trust.
We compute an idempotency hash across court case number, docket sequence, timestamp, and entry title:
export function computeDocketIdempotencyKey(entry: {
courtId: string;
caseNumber: string;
docketNumber: number;
entryDate: string;
summaryText: string;
}): string {
const normalized = `${entry.courtId}_${entry.caseNumber}_${entry.docketNumber}_${entry.entryDate}`;
return crypto.createHash("sha256").update(normalized).digest("hex");
}
If the key exists in our Redis 90-day deduplication window, the entry is acknowledged silently without triggering push notifications.


