AI-powered Production Incident Root Cause Analysis Platform
A full-stack application for analysing production incidents with a multi-stage investigation pipeline: Saturn โ DataHub โ Ingestion.
- Node.js v18+ (recommended: v22.17.1)
- Python 3.10+
- npm or yarn
Follow these steps to set up the project on a new machine after cloning:
git clone <repo-url>
cd IncAnalyserAIcd backend
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate # On macOS/Linux
# OR
venv\Scripts\activate # On Windows
# Install Python dependencies
pip install -r requirements.txtcd frontend
# Install Node.js dependencies
npm installYou need two terminal windows running simultaneously.
cd backend
source venv/bin/activate # macOS/Linux
# OR venv\Scripts\activate # Windows
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadThe backend is now running at http://localhost:8000
- API Docs (Swagger): http://localhost:8000/docs
- Health Check: http://localhost:8000/health
cd frontend
npm run devThe frontend is now running at http://localhost:3000
Open http://localhost:3000 โ Browse all incidents, search by ID, or click "New Investigation".
Navigate to an incident (e.g. http://localhost:3000/inc/INC-2026-07-20-001) to see:
| Panel | Content |
|---|---|
| Header | INC ID, Flow name, Severity badge, Elapsed timer, Escalate/Settings |
| Left (30%) | Original incident text, Triage summary, Extracted entities, Timeline of events |
| Bottom-Left | Root Cause Analysis (RCA) with confidence bar, Causal chain, Best-Next-Action buttons |
| Center (45%) | Flow DAG (Saturn โ DataHub โ Ingestion) โ click nodes to see evidence + live SSE event stream |
| Right (25%) | Context-sensitive Evidence & Citations per selected step โ tool calls, runbook links, similar past incidents, feedback |
- Saturn โ Report-level checks (dashboards, counts, aggregations)
- DataHub โ Data layer inspection (Oracle, Hive, data dumps)
- Ingestion โ Pipeline ingestion checks (feeds, loaders, transforms)
IncAnalyserAI/
โโโ backend/ # FastAPI Backend
โ โโโ app/
โ โ โโโ __init__.py
โ โ โโโ main.py # All REST APIs + SSE streaming
โ โโโ requirements.txt # Python dependencies
โ โโโ venv/ # Python virtual environment (gitignored)
โโโ frontend/ # Next.js 15 Frontend
โ โโโ src/
โ โ โโโ app/
โ โ โ โโโ globals.css # Dark theme + custom utilities
โ โ โ โโโ layout.tsx # Root layout
โ โ โ โโโ page.tsx # Landing page (incident list)
โ โ โ โโโ inc/[id]/page.tsx # Incident detail + analysis dashboard
โ โ โโโ components/
โ โ โ โโโ Header.tsx # Top bar
โ โ โ โโโ IncidentPanel.tsx # Left panel
โ โ โ โโโ RCAPanel.tsx # Bottom-left panel
โ โ โ โโโ FlowDAG.tsx # Center DAG visualization
โ โ โ โโโ LiveEventStream.tsx # SSE event stream
โ โ โ โโโ EvidencePanel.tsx # Right panel
โ โ โโโ data/mockData.ts # Mock incident data
โ โ โโโ types.ts # TypeScript interfaces
โ โโโ package.json
โ โโโ tsconfig.json
โ โโโ tailwind.config.js
โโโ .gitignore
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Service info |
GET |
/health |
Health check |
GET |
/incidents |
List all incidents |
POST |
/incidents |
Start investigation โ returns run_id |
GET |
/incidents/{run_id} |
Get investigation state |
GET |
/incidents/{run_id}/stream |
SSE event stream (2s per step) |
POST |
/incidents/{run_id}/feedback |
Mark step useful/wrong |
POST |
/incidents/{run_id}/approve |
Approve remediation |
GET |
/knowledge/flows/{id} |
Flow DAG definitions |
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS, Lucide Icons
- Backend: FastAPI, Python 3.10+, Uvicorn, SSE streaming
- Design: Dark theme, Responsive layout, Real-time event streaming
N A