Sigit Dani Perkasa
ProjectsWorkAboutContact

Built with Next.js, R3F, drei - Last updated 2026-06-22

GitHubContact
Sigit Dani Perkasa
ProjectsWorkAboutContact
Ai SoftwareRepository

Crisis Monitor

Full-stack crisis dashboard: FastAPI + LLM synthesis + Next.js frontend with composite risk gauge.

Loading gauge...

The Problem

Global crises rarely emerge in isolation. A military escalation in one region can trigger energy price spikes, which cascade into food supply disruptions and financial market instability. Monitoring these threads individually misses the systemic picture.

Crisis Monitor ingests signals from nine interconnected pathways (NATO alliance, energy security, food/fertilizer, credit markets, sovereign debt, China economic, political/social unrest, supply chain, and health security) via curated data sources including FRED economic indicators and NewsAPI headlines. Each morning at 08:00 WIB, an automated pipeline fetches fresh data and synthesizes it into a composite risk assessment.

The System

The backend runs on FastAPI with SQLite for persistent storage. A background pipeline executes asynchronously: data fetchers pull indicators and news headlines, then nine parallel LLM-powered Dot Analyzers each assess one crisis pathway independently. The Composite Scorer aggregates these into a single 0-30 risk score with a five-tier scale: Normal, Monitor, Elevated, Alert, and Critical.

The final LLM synthesis step produces a structured daily briefing covering the top five driving questions, a pathway-level summary, and recommended actions. The entire pipeline takes 60-150 seconds, with live progress exposed via a polling endpoint so the frontend dashboard renders node-by-node status in real time.

Results

The composite score aggregates weighted signals across all nine pathways. Financial and energy pathways carry higher weights due to their direct market impact. The timeseries below shows the last 30 days of composite scores with the five-tier risk bands.

The system has 12 active commits in active development. Daily cron triggers at 08:00 WIB with a 2-minute watchdog. Idempotency within 5 minutes prevents duplicate runs from overlapping triggers.

Implementation

The FastAPI routes module is the backbone of the backend. It serves the dashboard data, pipeline status with per-node progress tracking, the timeseries endpoint with daily-resolution indicators, and the authenticated trigger mechanism that starts each pipeline run as a fire-and-forget background task.

The idempotency layer prevents duplicate pipeline runs within a 5-minute window. Live progress is published via a shared dict that the pipeline status endpoint reads on every frontend poll (every 2 seconds during active runs).

View source on GitHubsigitdanip/crisis-monitor\u2192

Related

Agent Office

Real-time WebSocket dashboard for 20 AI agents. Shares the real-time monitoring pattern.

EV Research

CrewAI multi-agent research. Similar LLM orchestration, different domain.

\u2190 All projects

Built with Next.js, R3F, drei - Last updated 2026-06-22

GitHubContact