Skip to main content

Repository overview

This page is the canonical map of the AiSOC monorepo. It used to live in README.md; it was extracted here so the front page stays focused on "what is AiSOC and how do I run it" while this page stays useful for anyone navigating the code.

For the data-flow architecture (Kafka spine, fusion, agents, storage tier, surface) see Architecture. For the deeper system-design write-up (ML fusion, Neo4j-at-ingest schema, threat-intel pipeline) see docs/architecture/SYSTEM_DESIGN.md.

Monorepo layout

AiSOC/
├── apps/
│ ├── web/ # Next.js console + marketing landing + Responder PWA route
│ └── docs/ # Docusaurus documentation site (this site)
├── services/
│ ├── api/ # Core REST API + Neo4j graph + rule engine + auth + RBAC + compliance + Investigation Ledger
│ ├── ingest/ # Go · OCSF normalization · Shodan + CVE
│ ├── enrichment/ # Go · IOC enrichment
│ ├── fusion/ # Python · dedup + ML scoring + per-alert confidence + correlation narrative
│ ├── agents/ # Python · LangGraph + Qdrant RAG + investigation ledger writer + hunt engine
│ ├── actions/ # Python · SOAR + blast-radius gating + ChatOps verification
│ ├── threatintel/ # Python · TAXII / MISP / OTX / KEV + threat-actor attribution
│ ├── realtime/ # Node.js · per-channel WebSocket fan-out + VAPID Web Push
│ ├── ueba/ # Python · User & Entity Behavior Analytics (Welford online baseline)
│ ├── honeytokens/ # Python · deceptive credential traps (HMAC-signed)
│ ├── purple-team/ # Python · Atomic Red Team + Caldera + ATT&CK + detection drift snapshots
│ ├── osquery-tls/ # Python · native osquery TLS server + FIM + pack distribution
│ ├── osquery-extensions/ # Go · AI threat-intel table + ML anomaly score table + 3 more
│ ├── slack-bot/ # Python · ChatOps surface (Slack Bolt + HMAC signature verification)
│ └── mcp/ # TypeScript · Model Context Protocol server (npm: @aisoc/mcp, lands in v8.0)
├── packages/
│ ├── types/ # Shared TS types
│ ├── ui/ # Shared React primitives
│ ├── ocsf/ # OCSF normalization helpers
│ ├── sdk-ts/ # TypeScript client SDK for AiSOC API (npm: @aisoc/sdk, lands in v8.0)
│ ├── sdk-py/ # Async Python client SDK (PyPI: aisoc-sdk, lands in v8.0)
│ ├── sdk-go/ # Go client SDK + models (module: github.com/beenuar/aisoc/sdk-go)
│ ├── plugin-sdk-ts/ # TypeScript plugin development SDK
│ ├── plugin-sdk-py/ # Python plugin development SDK (PyPI: aisoc-plugin-sdk, lands in v8.0)
│ ├── plugin-sdk-go/ # Go plugin development SDK (module: github.com/beenuar/aisoc/plugin-sdk-go)
│ └── aisoc-cli/ # CLI: scaffold / validate / publish plugins & detections (PyPI: aisoc-cli, lands in v8.0)
├── detections/ # Community Sigma detection rules (YAML) — 800+ native
├── hunts/ # Hunt-as-Code YAML definitions (hypothesis + indicators + schedule)
├── playbooks/ # Community SOAR playbooks (YAML)
├── plugins/ # First-party plugins (Go + Python) + marketplace manifests
├── marketplace/ # Marketplace index (JSON, generated by scripts/build_marketplace.py)
├── infra/
│ ├── coolify/ # Coolify (self-hosted Heroku-style PaaS) quickstart
│ ├── fly/ # Fly.io machines + deploy script (canonical hosted demo target)
│ ├── railway/ # Railway template (railway.toml)
│ ├── render/ # Render blueprint (render.yaml at repo root)
│ ├── terraform/ # AWS (VPC, EKS, RDS, ElastiCache, MSK) + GCP + Azure skeletons
│ └── helm/ # Kubernetes Helm chart (HPA, PDB, Ingress per service)
├── docs/
│ ├── openapi.yaml # OpenAPI 3.1 spec for the Core API
│ ├── architecture/ # System-design docs (SYSTEM_DESIGN.md, threat-actor attribution, …)
│ ├── decisions/ # Architecture Decision Records (ADR-0001 onwards)
│ ├── demo/ # Screencast brief + shot list
│ ├── operations/ # Runbooks, managed-mode notes, audit health probes
│ └── runbooks/ # Per-service operational runbooks
└── scripts/
├── aisoc-demo.ts # One-shot demo orchestrator (powers `pnpm aisoc:demo`)
├── aisoc-doctor.ts # Local health check (ports, containers, demo data, API + WS)
├── aisoc-acceptance.ts # Cold-start acceptance test
├── run_evals.py # Public eval harness (per-case + per-template macros, telemetry coverage)
├── generate_eval_incidents.py # 200-incident synthetic generator (55 templates) + synthetic_telemetry.jsonl
├── build_marketplace.py # Build marketplace/index.json from detections+playbooks+plugins
├── validate_detections.py # YAML schema validation for Sigma detections
├── validate_playbooks.py # YAML schema validation for playbooks
├── backup.sh # Postgres + ClickHouse + plugins → S3/R2
└── restore.sh # Point-in-time restore

Service map

ServiceLangPortRole
webNext.js + React3000SOC console (alerts detail + Investigation Rail), benchmark scoreboard, marketing landing
apiPython · FastAPI8000Alerts (detail envelope + correlation narrative), cases, RBAC, graph, rules, audit, compliance, detection proposals (DAC), federated search fan-out, SLA tracking
realtimeNode.js · ws8086Per-channel WebSocket fan-out + VAPID Web Push (short-lived signed tickets)
agentsPython · LangGraph8001Multi-agent reasoning + Qdrant RAG + Hunt-as-Code engine & scheduler + Investigation Ledger writer
fusionPython8003Dedup + ML scoring (LightGBM, IsoForest), alert confidence, entity risk / RBA, correlation narrative projection for API
actionsPython8002SOAR with blast-radius gating + ChatOps verification + signed approval URLs
connectorsPythonConnector polling (APScheduler), credential vault, federated query translators
threatintelPython8005TAXII / MISP / OTX / KEV polling + threat-actor attribution engine
uebaPython8007User & Entity Behavior Analytics
honeytokensPython8008Honeytoken lifecycle + webhook alerting
purple-teamPython8006Atomic Red Team + Caldera + ATT&CK heatmap + detection drift snapshots
osquery-tlsPython8091Native osquery TLS server — enroll nodes, distribute packs, stream FIM/process/network telemetry
osquery-extensionsGoCustom osquery extensions (AI-powered threat intel table, ML anomaly score table, + 3 more)
slack-botPython8009ChatOps surface — interactive approvals for high-blast-radius actions, /aisoc slash command
mcpTypeScript— (stdio)Model Context Protocol server exposing 13 AiSOC tools — discovery, deep-dive, action/replay, and warm-tier lake query
ingestGo8081OCSF normalization + Shodan/CVE + Neo4j graph-at-ingest writers
enrichmentGo8080IOC enrichment (VT, AbuseIPDB, GreyNoise)

Storage tier

StorePurpose
PostgreSQLTenants, users, cases, detection rules, RBAC, audit log, compliance · Row-level security
ClickHouseHigh-cardinality event analytics + alert metrics
OpenSearchFull-text IOC + actor + report search · Sigma backend
QdrantVector RAG for agents, semantic ATT&CK lookup
Neo4jKnowledge graph: entities, attack paths, blast radius (graph-at-ingest writers in services/ingest/internal/graph/)
RedisCache, pub/sub, IOC bloom filter, enrichment TTL, short-lived realtime tickets
KafkaEvent streaming spine (raw, fused, vulnerability, anomaly, action, graph-updates)

API surface

The full OpenAPI 3.1 spec lives at docs/openapi.yaml. Endpoint groups are summarised in Architecture and the interactive view is at http://localhost:8000/docs (Swagger) or /redoc (ReDoc) when you run the local stack.

Next stops