# hato0/nornops architecture

> Architecture diagram of the GitHub repository hato0/nornops, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hato0/nornops
- Repository: https://github.com/hato0/nornops

## Overview

NornOps is a multi-tenant SOC workbench: analysts submit indicators, which are normalized, enriched across threat-intelligence providers, and turned into a scored verdict; they can then organize findings into cases or share them with the community. The graph also preserves the documented Path Encyclopedia, authentication, dashboard, and billing capabilities. The README establishes the product-level flow, while excerpts show API registration, provider orchestration and caching, authentication, and case persistence; unsampled route internals are represented only at the documented capability level.

Main entry points: [`backend/app/main.py`](https://github.com/hato0/nornops/blob/main/backend/app/main.py) (FastAPI app), [`backend/app/enrichment/orchestrator.py`](https://github.com/hato0/nornops/blob/main/backend/app/enrichment/orchestrator.py) (Enrichment orchestration), [`backend/app/routers/cases.py`](https://github.com/hato0/nornops/blob/main/backend/app/routers/cases.py) (Case management), [`backend/app/routers/auth.py`](https://github.com/hato0/nornops/blob/main/backend/app/routers/auth.py) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Analyst experience"]
  node_frontend["Next.js app<br/>[page.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_api["API and identity"]
  node_api_app["FastAPI app<br/>[main.py]"]
  node_auth_routes["Authentication<br/>[auth.py]"]
  node_identity["Identity and access<br/>[deps.py]"]
  node_security["JWT security<br/>[security.py]"]
  node_config["Runtime settings<br/>[config.py]"]
  node_schemas["API schemas<br/>[schemas.py]"]
  node_entitlements["Plans and entitlements<br/>[loader.py]"]
  node_billing["Billing API<br/>[billing.py]"]
end

subgraph group_intel["IOC intelligence"]
  node_ioc_routes["IOC API<br/>[ioc.py]"]
  node_normalization["IOC normalization"]
  node_orchestrator["Enrichment orchestration<br/>[orchestrator.py]"]
  node_provider_clients["Threat intel sources"]
  node_enrichment_cache["Enrichment cache<br/>[cache.py]"]
  node_scoring["Verdict scoring<br/>[scoring.py]"]
  node_verdict["Verdict assembly<br/>[verdict.py]"]
end

subgraph group_workspace["Investigation workspace"]
  node_case_routes["Case management<br/>[cases.py]"]
  node_community["Community sharing<br/>[community.py]"]
  node_dashboard["Analyst dashboard<br/>[dashboard.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_database[("Application database<br/>[database.py]")]
end

subgraph group_path["Path Encyclopedia"]
  node_path_routes["Path lookup API<br/>[path.py]"]
  node_path_analysis["Path analysis<br/>[path_analyzer.py]"]
  node_path_matching["Knowledge matching<br/>[path_matching.py]"]
  node_path_merge["Knowledge merging<br/>[merging.py]"]
  node_kb_sources["Knowledge sources<br/>[kb_sources.py]"]
end

node_analyst(("SOC analyst"))

node_analyst -->|"uses"| node_frontend
node_frontend -->|"requests data"| node_api_client
node_api_client -->|"REST + JWT"| node_api_app
node_api_app -->|"registers routes"| node_auth_routes
node_api_app -->|"registers routes"| node_ioc_routes
node_api_app -->|"registers routes"| node_case_routes
node_api_app -->|"registers routes"| node_community
node_api_app -->|"registers routes"| node_dashboard
node_api_app -->|"registers routes"| node_path_routes
node_auth_routes -->|"hashes and signs"| node_security
node_auth_routes -->|"creates users"| node_models
node_ioc_routes -->|"normalizes indicators"| node_normalization
node_ioc_routes -->|"requests enrichment"| node_orchestrator
node_orchestrator -->|"dispatches sources"| node_provider_clients
node_orchestrator -->|"reads and writes"| node_enrichment_cache
node_orchestrator -->|"feeds verdict scoring"| node_scoring
node_scoring -->|"contributes verdict"| node_verdict
node_case_routes -->|"reads and writes"| node_models
node_case_routes -->|"uses session"| node_database
node_community -->|"normalizes shared IOC"| node_normalization
node_dashboard -.->|"summarizes workspace"| node_models
node_path_routes -.->|"analyzes paths"| node_path_analysis
node_path_routes -.->|"matches knowledge"| node_path_matching
node_path_analysis -.->|"combines signals"| node_path_merge
node_path_matching -.->|"consults sources"| node_kb_sources
node_api_app -->|"configures middleware"| node_config
node_case_routes -->|"validates payloads"| node_schemas
node_api_app -->|"loads extensions"| node_entitlements
node_api_app -->|"registers routes"| node_billing

click node_frontend "https://github.com/hato0/nornops/blob/main/frontend/src/app/(app)/iocs/page.tsx"
click node_api_client "https://github.com/hato0/nornops/blob/main/frontend/src/lib/api.ts"
click node_api_app "https://github.com/hato0/nornops/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/hato0/nornops/blob/main/backend/app/routers/auth.py"
click node_identity "https://github.com/hato0/nornops/blob/main/backend/app/deps.py"
click node_security "https://github.com/hato0/nornops/blob/main/backend/app/security.py"
click node_config "https://github.com/hato0/nornops/blob/main/backend/app/config.py"
click node_ioc_routes "https://github.com/hato0/nornops/blob/main/backend/app/routers/ioc.py"
click node_normalization "https://github.com/hato0/nornops/blob/main/backend/app/ioc_normalization.py"
click node_orchestrator "https://github.com/hato0/nornops/blob/main/backend/app/enrichment/orchestrator.py"
click node_provider_clients "https://github.com/hato0/nornops/tree/main/backend/app/enrichment"
click node_enrichment_cache "https://github.com/hato0/nornops/blob/main/backend/app/enrichment/cache.py"
click node_scoring "https://github.com/hato0/nornops/blob/main/backend/app/enrichment/scoring.py"
click node_verdict "https://github.com/hato0/nornops/blob/main/backend/app/enrichment/verdict.py"
click node_case_routes "https://github.com/hato0/nornops/blob/main/backend/app/routers/cases.py"
click node_community "https://github.com/hato0/nornops/blob/main/backend/app/routers/community.py"
click node_dashboard "https://github.com/hato0/nornops/blob/main/backend/app/routers/dashboard.py"
click node_models "https://github.com/hato0/nornops/blob/main/backend/app/models.py"
click node_database "https://github.com/hato0/nornops/blob/main/backend/app/database.py"
click node_path_routes "https://github.com/hato0/nornops/blob/main/backend/app/routers/path.py"
click node_path_analysis "https://github.com/hato0/nornops/blob/main/backend/app/path_analyzer.py"
click node_path_matching "https://github.com/hato0/nornops/blob/main/backend/app/path_matching.py"
click node_path_merge "https://github.com/hato0/nornops/blob/main/backend/app/path_scoring/merging.py"
click node_kb_sources "https://github.com/hato0/nornops/blob/main/backend/app/kb_sources.py"
click node_schemas "https://github.com/hato0/nornops/blob/main/backend/app/schemas.py"
click node_entitlements "https://github.com/hato0/nornops/blob/main/backend/app/entitlements/loader.py"
click node_billing "https://github.com/hato0/nornops/blob/main/backend/app/routers/billing.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_frontend,node_api_client toneBlue
class node_api_app,node_auth_routes,node_identity,node_security,node_config,node_schemas,node_entitlements,node_billing toneAmber
class node_ioc_routes,node_normalization,node_orchestrator,node_provider_clients,node_enrichment_cache,node_scoring,node_verdict toneMint
class node_case_routes,node_community,node_dashboard,node_models,node_database toneRose
class node_path_routes,node_path_analysis,node_path_matching,node_path_merge,node_kb_sources,node_analyst toneIndigo
```

## Components

### Analyst experience

- [Next.js app](https://github.com/hato0/nornops/blob/main/frontend/src/app/(app)/iocs/page.tsx): `frontend/src/app/(app)/iocs/page.tsx`
- [API client](https://github.com/hato0/nornops/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`

### API and identity

- [FastAPI app](https://github.com/hato0/nornops/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/hato0/nornops/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Identity and access](https://github.com/hato0/nornops/blob/main/backend/app/deps.py): `backend/app/deps.py`
- [JWT security](https://github.com/hato0/nornops/blob/main/backend/app/security.py): `backend/app/security.py`
- [Runtime settings](https://github.com/hato0/nornops/blob/main/backend/app/config.py): `backend/app/config.py`
- [API schemas](https://github.com/hato0/nornops/blob/main/backend/app/schemas.py): `backend/app/schemas.py`
- [Plans and entitlements](https://github.com/hato0/nornops/blob/main/backend/app/entitlements/loader.py): `backend/app/entitlements/loader.py`
- [Billing API](https://github.com/hato0/nornops/blob/main/backend/app/routers/billing.py): `backend/app/routers/billing.py`

### IOC intelligence

- [IOC API](https://github.com/hato0/nornops/blob/main/backend/app/routers/ioc.py): `backend/app/routers/ioc.py`
- [IOC normalization](https://github.com/hato0/nornops/blob/main/backend/app/ioc_normalization.py): `backend/app/ioc_normalization.py`
- [Enrichment orchestration](https://github.com/hato0/nornops/blob/main/backend/app/enrichment/orchestrator.py): `backend/app/enrichment/orchestrator.py`
- [Threat intel sources](https://github.com/hato0/nornops/tree/main/backend/app/enrichment): `backend/app/enrichment`
- [Enrichment cache](https://github.com/hato0/nornops/blob/main/backend/app/enrichment/cache.py): `backend/app/enrichment/cache.py`
- [Verdict scoring](https://github.com/hato0/nornops/blob/main/backend/app/enrichment/scoring.py): `backend/app/enrichment/scoring.py`
- [Verdict assembly](https://github.com/hato0/nornops/blob/main/backend/app/enrichment/verdict.py): `backend/app/enrichment/verdict.py`

### Investigation workspace

- [Case management](https://github.com/hato0/nornops/blob/main/backend/app/routers/cases.py): `backend/app/routers/cases.py`
- [Community sharing](https://github.com/hato0/nornops/blob/main/backend/app/routers/community.py): `backend/app/routers/community.py`
- [Analyst dashboard](https://github.com/hato0/nornops/blob/main/backend/app/routers/dashboard.py): `backend/app/routers/dashboard.py`
- [Domain models](https://github.com/hato0/nornops/blob/main/backend/app/models.py): `backend/app/models.py`
- [Application database](https://github.com/hato0/nornops/blob/main/backend/app/database.py): `backend/app/database.py`

### Path Encyclopedia

- [Path lookup API](https://github.com/hato0/nornops/blob/main/backend/app/routers/path.py): `backend/app/routers/path.py`
- [Path analysis](https://github.com/hato0/nornops/blob/main/backend/app/path_analyzer.py): `backend/app/path_analyzer.py`
- [Knowledge matching](https://github.com/hato0/nornops/blob/main/backend/app/path_matching.py): `backend/app/path_matching.py`
- [Knowledge merging](https://github.com/hato0/nornops/blob/main/backend/app/path_scoring/merging.py): `backend/app/path_scoring/merging.py`
- [Knowledge sources](https://github.com/hato0/nornops/blob/main/backend/app/kb_sources.py): `backend/app/kb_sources.py`

### Other components

- **SOC analyst**

## Connections

- SOC analyst → Next.js app: uses (evidence: `README.md`)
- Next.js app → API client: requests data (evidence: `README.md`)
- API client → FastAPI app: REST + JWT (evidence: `README.md`)
- FastAPI app → Authentication: registers routes (evidence: `backend/app/main.py`)
- FastAPI app → IOC API: registers routes (evidence: `backend/app/main.py`)
- FastAPI app → Case management: registers routes (evidence: `backend/app/main.py`)
- FastAPI app → Community sharing: registers routes (evidence: `backend/app/main.py`)
- FastAPI app → Analyst dashboard: registers routes (evidence: `backend/app/main.py`)
- FastAPI app → Path lookup API: registers routes (evidence: `backend/app/main.py`)
- Authentication → JWT security: hashes and signs (evidence: `backend/app/routers/auth.py`)
- Authentication → Domain models: creates users (evidence: `backend/app/routers/auth.py`)
- IOC API → IOC normalization: normalizes indicators (evidence: `README.md`)
- IOC API → Enrichment orchestration: requests enrichment (evidence: `README.md`)
- Enrichment orchestration → Threat intel sources: dispatches sources (evidence: `backend/app/enrichment/orchestrator.py`)
- Enrichment orchestration → Enrichment cache: reads and writes (evidence: `backend/app/enrichment/orchestrator.py`)
- Enrichment orchestration → Verdict scoring: feeds verdict scoring (evidence: `README.md`)
- Verdict scoring → Verdict assembly: contributes verdict (evidence: `README.md`)
- Case management → Domain models: reads and writes (evidence: `backend/app/routers/cases.py`)
- Case management → Application database: uses session (evidence: `backend/app/routers/cases.py`)
- Community sharing → IOC normalization: normalizes shared IOC (evidence: `backend/app/routers/community.py`)
- Analyst dashboard → Domain models: summarizes workspace
- Path lookup API → Path analysis: analyzes paths
- Path lookup API → Knowledge matching: matches knowledge
- Path analysis → Knowledge merging: combines signals
- Knowledge matching → Knowledge sources: consults sources
- FastAPI app → Runtime settings: configures middleware (evidence: `backend/app/main.py`)
- Case management → API schemas: validates payloads (evidence: `backend/app/routers/cases.py`)
- FastAPI app → Plans and entitlements: loads extensions (evidence: `backend/app/main.py`)
- FastAPI app → Billing API: registers routes (evidence: `backend/app/main.py`)
