# artternava/viper architecture

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

- Interactive diagram: https://gitdiagram.com/artternava/viper
- Repository: https://github.com/artternava/viper

## Overview

VIPER is a synthetic-data decision-intelligence platform that organizes evidence and provenance into reviewable assessments and decision packets, while leaving decision authority with human command. The principal workflow runs from the operator-facing renderer through the .NET API to assessment and packet services, with deterministic inference available through the decision engine. Supporting branches ingest federated feeds and provide challenge, audit, and response capabilities. The README describes the product boundaries; sampled source and SOURCE INDEX references support only the specific internal relationships shown, so uncertain links are omitted.

Main entry points: [`Gateway/Backend/Program.cs`](https://github.com/artternava/viper/blob/main/Gateway/Backend/Program.cs) (Gateway API), [`Analysis/Runtime/AnalyticRuntimeService.cs`](https://github.com/artternava/viper/blob/main/Analysis/Runtime/AnalyticRuntimeService.cs) (Analytic runtime), [`Feed/Runtime/SyncEngine.cs`](https://github.com/artternava/viper/blob/main/Feed/Runtime/SyncEngine.cs) (Feed synchronization), [`Viper/Frontend/src/app/app.routes.ts`](https://github.com/artternava/viper/blob/main/Viper/Frontend/src/app/app.routes.ts) (VIPER renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Operator experience"]
  node_renderer["VIPER renderer<br/>[app.routes.ts]"]
  node_api["Gateway API<br/>[Program.cs]"]
end

subgraph group_assessment["Assessment and deliberation"]
  node_decision_packets["Decision packets<br/>[PacketService.cs]"]
  node_analytic_api["Analytic runtime API"]
  node_analytic_runtime["Analytic runtime"]
  node_cross_domain["Cross-domain assessment"]
  node_inference_provider["Inference provider"]
  node_decision_engine["Deterministic engine<br/>[engine.py]"]
end

subgraph group_evidence["Evidence and feeds"]
  node_evidence_contract["Canonical evidence<br/>[Evidence.cs]"]
  node_feed_sync["Feed synchronization<br/>[SyncEngine.cs]"]
  node_connector_registry[("Connector registry")]
  node_ingestion["Federation ingestion"]
  node_retrieval["Evidence retrieval"]
end

subgraph group_governance["Governance and response"]
  node_audit["Audit integrity"]
  node_response["Response orchestration"]
  node_challenge["Challenge workflow"]
end

node_operator(("Human operator"))
node_institutional_source(("Institutional feed"))

node_operator -->|"uses"| node_renderer
node_renderer -->|"requests"| node_api
node_api -->|"serves packets"| node_decision_packets
node_api -.->|"routes requests"| node_analytic_api
node_analytic_api -.->|"invokes"| node_analytic_runtime
node_analytic_runtime -.->|"requests inference"| node_inference_provider
node_inference_provider -->|"calls"| node_decision_engine
node_analytic_runtime -->|"evaluates conditions"| node_cross_domain
node_institutional_source -.->|"provides pages"| node_feed_sync
node_feed_sync -->|"uses registration"| node_connector_registry
node_feed_sync -.->|"submits evidence"| node_ingestion
node_ingestion -->|"normalizes to"| node_evidence_contract
node_retrieval -.->|"retrieves"| node_evidence_contract
node_api -.->|"serves challenges"| node_challenge
node_api -.->|"exposes audit"| node_audit
node_api -->|"orchestrates response"| node_response

click node_renderer "https://github.com/artternava/viper/blob/main/Viper/Frontend/src/app/app.routes.ts"
click node_api "https://github.com/artternava/viper/blob/main/Gateway/Backend/Program.cs"
click node_decision_packets "https://github.com/artternava/viper/blob/main/Gateway/Backend/Services/PacketService.cs"
click node_analytic_api "https://github.com/artternava/viper/blob/main/Gateway/Backend/Controllers/AnalyticRuntimeController.cs"
click node_analytic_runtime "https://github.com/artternava/viper/blob/main/Analysis/Runtime/AnalyticRuntimeService.cs"
click node_cross_domain "https://github.com/artternava/viper/blob/main/Analysis/Runtime/CrossDomain/CriticalConditionEvaluator.cs"
click node_inference_provider "https://github.com/artternava/viper/blob/main/Analysis/Runtime/Ai/DecisionEngineInferenceProvider.cs"
click node_decision_engine "https://github.com/artternava/viper/blob/main/DecisionEngine/Rules/app/engine.py"
click node_evidence_contract "https://github.com/artternava/viper/blob/main/Federation/Contracts/Evidence.cs"
click node_feed_sync "https://github.com/artternava/viper/blob/main/Feed/Runtime/SyncEngine.cs"
click node_connector_registry "https://github.com/artternava/viper/blob/main/Connectors/Registry/ConnectorRegistration.cs"
click node_ingestion "https://github.com/artternava/viper/blob/main/Federation/Ingestion/IngestionService.cs"
click node_retrieval "https://github.com/artternava/viper/blob/main/Federation/Ingestion/RetrievalService.cs"
click node_audit "https://github.com/artternava/viper/blob/main/AuditCore/Service/Integrity/AuditVerificationService.cs"
click node_response "https://github.com/artternava/viper/blob/main/Response/Runtime/ResponseOrchestrationService.cs"
click node_challenge "https://github.com/artternava/viper/blob/main/Gateway/Backend/Controllers/ChallengesController.cs"

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_renderer,node_api toneBlue
class node_decision_packets,node_analytic_api,node_analytic_runtime,node_cross_domain,node_inference_provider,node_decision_engine toneAmber
class node_evidence_contract,node_feed_sync,node_connector_registry,node_ingestion,node_retrieval toneMint
class node_audit,node_response,node_challenge toneRose
class node_operator,node_institutional_source toneIndigo
```

## Components

### Operator experience

- [VIPER renderer](https://github.com/artternava/viper/blob/main/Viper/Frontend/src/app/app.routes.ts): `Viper/Frontend/src/app/app.routes.ts`
- [Gateway API](https://github.com/artternava/viper/blob/main/Gateway/Backend/Program.cs): `Gateway/Backend/Program.cs`

### Assessment and deliberation

- [Decision packets](https://github.com/artternava/viper/blob/main/Gateway/Backend/Services/PacketService.cs): `Gateway/Backend/Services/PacketService.cs`
- [Analytic runtime API](https://github.com/artternava/viper/blob/main/Gateway/Backend/Controllers/AnalyticRuntimeController.cs): `Gateway/Backend/Controllers/AnalyticRuntimeController.cs`
- [Analytic runtime](https://github.com/artternava/viper/blob/main/Analysis/Runtime/AnalyticRuntimeService.cs): `Analysis/Runtime/AnalyticRuntimeService.cs`
- [Cross-domain assessment](https://github.com/artternava/viper/blob/main/Analysis/Runtime/CrossDomain/CriticalConditionEvaluator.cs): `Analysis/Runtime/CrossDomain/CriticalConditionEvaluator.cs`
- [Inference provider](https://github.com/artternava/viper/blob/main/Analysis/Runtime/Ai/DecisionEngineInferenceProvider.cs): `Analysis/Runtime/Ai/DecisionEngineInferenceProvider.cs`
- [Deterministic engine](https://github.com/artternava/viper/blob/main/DecisionEngine/Rules/app/engine.py): `DecisionEngine/Rules/app/engine.py`

### Evidence and feeds

- [Canonical evidence](https://github.com/artternava/viper/blob/main/Federation/Contracts/Evidence.cs): `Federation/Contracts/Evidence.cs`
- [Feed synchronization](https://github.com/artternava/viper/blob/main/Feed/Runtime/SyncEngine.cs): `Feed/Runtime/SyncEngine.cs`
- [Connector registry](https://github.com/artternava/viper/blob/main/Connectors/Registry/ConnectorRegistration.cs): `Connectors/Registry/ConnectorRegistration.cs`
- [Federation ingestion](https://github.com/artternava/viper/blob/main/Federation/Ingestion/IngestionService.cs): `Federation/Ingestion/IngestionService.cs`
- [Evidence retrieval](https://github.com/artternava/viper/blob/main/Federation/Ingestion/RetrievalService.cs): `Federation/Ingestion/RetrievalService.cs`

### Governance and response

- [Audit integrity](https://github.com/artternava/viper/blob/main/AuditCore/Service/Integrity/AuditVerificationService.cs): `AuditCore/Service/Integrity/AuditVerificationService.cs`
- [Response orchestration](https://github.com/artternava/viper/blob/main/Response/Runtime/ResponseOrchestrationService.cs): `Response/Runtime/ResponseOrchestrationService.cs`
- [Challenge workflow](https://github.com/artternava/viper/blob/main/Gateway/Backend/Controllers/ChallengesController.cs): `Gateway/Backend/Controllers/ChallengesController.cs`

### Other components

- **Human operator**
- **Institutional feed**

## Connections

- Human operator → VIPER renderer: uses
- VIPER renderer → Gateway API: requests
- Gateway API → Decision packets: serves packets
- Gateway API → Analytic runtime API: routes requests
- Analytic runtime API → Analytic runtime: invokes
- Analytic runtime → Inference provider: requests inference
- Inference provider → Deterministic engine: calls (evidence: `Analysis/Runtime/Ai/DecisionEngineInferenceProvider.cs`)
- Analytic runtime → Cross-domain assessment: evaluates conditions (evidence: `Gateway/Backend/Controllers/ResponseController.cs`)
- Institutional feed → Feed synchronization: provides pages
- Feed synchronization → Connector registry: uses registration (evidence: `Feed/Runtime/SyncEngine.cs`)
- Feed synchronization → Federation ingestion: submits evidence
- Federation ingestion → Canonical evidence: normalizes to (evidence: `Federation/Ingestion/IngestionService.cs`)
- Evidence retrieval → Canonical evidence: retrieves
- Gateway API → Challenge workflow: serves challenges
- Gateway API → Audit integrity: exposes audit
- Gateway API → Response orchestration: orchestrates response
