Backend Architecture Overview

September 14, 2026 · View on GitHub

Summary

The Dethernety backend is a NestJS GraphQL server backed by a Bolt/Cypher graph database (Neo4j or Memgraph). It auto-generates CRUD operations from the GraphQL schema, loads threat modeling modules at runtime, and routes analysis requests to the appropriate module.

Stack: NestJS + TypeScript, Neo4j/Memgraph (Bolt/Cypher), Apollo Server (GraphQL), OIDC/JWT auth, WebSocket/SSE for real-time updates.


Architecture Overview

graph TB
    subgraph "Client Layer"
        UI[Frontend Application]
        EXTERNAL[External Integrations]
    end

    subgraph "API Gateway"
        GQL[GraphQL API Server<br/>Apollo + NestJS]
        WS[WebSocket / SSE Server<br/>Real-time Subscriptions]
    end

    subgraph "Core Services"
        SCHEMA[Schema Service<br/>GraphQL Schema Management]
        RESOLVER[Custom Resolver Layer<br/>Business Logic]
        MODULE_REG[Module Registry<br/>Plugin Management]
        MODULE_MGMT[Module Management<br/>Database Operations]
    end

    subgraph "Business Logic Resolvers"
        ANALYSIS[Analysis Resolver<br/>AI Integration]
        TEMPLATE[Template Resolver<br/>Content Management]
        ISSUE[Issue Resolver<br/>External Sync]
        ATTR[Attributes Resolver<br/>Component Configuration]
    end

    subgraph "Data Layer"
        DB_SVC[Database Service<br/>Connection Management]
        NEO4J[(Neo4j Graph Database<br/>Primary Data Store)]
    end

    subgraph "External Services"
        AI[Analysis Engine<br/>via DTModule Interface]
        OIDC[Identity Provider<br/>OIDC/JWT]
        MITRE[MITRE Frameworks<br/>ATT&CK / D3FEND]
    end

    UI --> GQL
    UI --> WS
    EXTERNAL --> GQL

    GQL --> SCHEMA
    GQL --> RESOLVER
    WS --> ANALYSIS

    SCHEMA --> MODULE_REG
    RESOLVER --> ANALYSIS
    RESOLVER --> TEMPLATE
    RESOLVER --> ISSUE
    RESOLVER --> ATTR

    MODULE_REG --> MODULE_MGMT
    MODULE_MGMT --> DB_SVC

    ANALYSIS --> AI
    ANALYSIS --> DB_SVC
    TEMPLATE --> DB_SVC
    ISSUE --> DB_SVC
    ATTR --> DB_SVC

    DB_SVC --> NEO4J

    GQL --> OIDC
    AI --> NEO4J
    MODULE_MGMT --> MITRE

Layered Architecture

The backend implements a layered architecture with clear separation of concerns:

LayerResponsibilityKey Components
API GatewayRequest handling, authentication, protocol managementApollo GraphQL, WebSocket Server
Core ServicesSchema management, resolver orchestration, module loadingSchemaService, ModuleRegistry
Business LogicDomain-specific operations and integrationsCustom Resolvers (Analysis, Template, Issue, Attributes)
Data AccessDatabase connectivity, transaction managementDatabaseService, Neo4j Driver

Technology Stack

Core Framework

TechnologyPurpose
NestJSNode.js framework with dependency injection
TypeScriptType-safe development with full IDE support
Apollo ServerProduction GraphQL server implementation
Neo4j GraphQL LibraryAuto-generated CRUD operations from schema

Database

TechnologyPurpose
Bolt Protocol + CypherStandards-based graph database connectivity enabling multi-database support
Neo4j / MemgraphCompatible graph databases (Memgraph default in cost-optimized deployments)
Neo4j DriverBolt protocol driver with modern transaction patterns
Context StorageGraph database can be used by analysis modules for context retrieval

Communication

TechnologyPurpose
GraphQLPrimary API protocol with real-time subscriptions
WebSockets / SSEReal-time streaming for AI analysis updates (SSE enables CloudFront VPC origin compatibility)
HTTP/HTTPSRESTful health checks and system endpoints

Security

TechnologyPurpose
OIDC/JWTStandards-based authentication via JWKS
Query LimitingDepth and complexity protection against abuse
Input ValidationParameter validation on all mutations and queries

Core Modules

1. GraphQL Module

The central API layer providing all GraphQL functionality.

Capabilities:

  • Schema-first development with auto-generated CRUD operations
  • Custom resolver integration for business logic
  • Real-time subscriptions via WebSocket or SSE (Server-Sent Events)
  • Query depth and complexity limiting
  • Automatic authentication integration

Production Features:

  • Environment-based configuration (dev/staging/production)
  • GraphQL Playground disabled in production
  • Schema introspection disabled in production
  • Error sanitization for security

2. Database Module

Database connectivity and connection management.

Capabilities:

  • Connection pool management (configurable pool size)
  • Neo4j v5 transaction patterns (executeRead/executeWrite)
  • Automatic session lifecycle management
  • Health monitoring (connection status, query metrics)

Performance Features:

  • Connection pooling with configurable limits
  • Query performance metrics collection
  • Automatic connection cleanup
  • Multi-database support

3. Module Registry & DTModule Interface

Dynamic plugin system enabling unlimited integrations through the DTModule interface.

Module System Capabilities:

CapabilityInterface MethodsPurpose
Design ClassesgetMetadata()ComponentClass, SecurityBoundaryClass, DataFlowClass, ControlClass, DataClass definitions
ConfigurationgetModuleTemplate(), getClassTemplate(), getClassGuide()Dynamic UI schemas and documentation
Security LogicgetExposures(), getCountermeasures()Exposure detection and countermeasure mapping rules
Issue IntegrationgetSyncedIssueAttributes()External issue tracker synchronization
Analysis EnginerunAnalysis(), getDocument(), etc.Pluggable analysis implementations

Registry Features:

  • Runtime module loading from file system
  • Module whitelisting for security (production)
  • Hot reload support (development only)
  • Interface validation and health monitoring

Security Features:

  • Explicit module whitelisting in production
  • File permission validation
  • Secure driver wrapper for audit logging
  • Module health tracking and statistics

Any system implementing DTModule can integrate with Dethernety - enabling custom security frameworks, proprietary analysis engines, or domain-specific threat modeling capabilities.

4. Custom Resolver Layer

Business logic implementation for specialized operations.

ResolverPurpose
AnalysisResolverAI-powered security analysis with long-running operation support
TemplateResolverModule template and configuration guide retrieval
IssueResolverExternal issue tracking system synchronization
SetInstantiationAttributesComponent configuration with MITRE framework integration
ModuleManagementResolverModule lifecycle and class management
DispositionResolverServiceRecords user decisions (dispositions) on SYSTEM-generated exposures and countermeasures
MatchMitreTechniquesResolverServiceResolves user text to MITRE technique / mitigation candidates via a five-tier cascade

Key Architectural Features

1. Production-Ready Security

Request → JWT Validation → Query Protection → Authorization → Execution → Response

Security Layers:

  • Transport Security: HTTPS/WSS encryption
  • Authentication: OIDC JWT validation via JWKS endpoint
  • Query Protection: Depth limiting (default: 10) and complexity scoring (default: 1000)
  • Error Sanitization: Internal errors hidden in production
  • Input Validation: All inputs validated before processing

Auth-Disabled Mode (non-production only):

For a single-user deployment or local development, authentication can be disabled when NODE_ENV !== 'production', no OIDC is configured, and ENABLE_NOAUTH=true. In this mode the jwt-auth.guard creates a mock dev-user for unauthenticated requests. The GraphQL schema is loaded from schema-noauth.graphql (a build-time generated file, excluded from git, with @authentication directives stripped) — if this file is not present, the schema service falls back to the standard schema.graphql with a warning. See the Configuration Guide for details. This mode is blocked in production.

2. Monitoring

All services implement structured logging and health monitoring:

Metrics Collected:

  • Operation success/failure rates
  • Response times and performance tracking
  • Database connection pool utilization
  • Module health status
  • Cache hit rates (where applicable)

Health Check System:

  • Database connectivity verification
  • GraphQL schema validation
  • Module availability checks
  • Service status aggregation

3. Scalability Design

Horizontal Scaling Support:

  • Stateless application design
  • Database connection pooling
  • No server-side session storage
  • Schema caching in memory

Performance Optimizations:

  • LRU caching with TTL for templates and metadata
  • Batch processing for frequent operations (auto-save)
  • Connection pool management
  • Async file operations

4. Error Handling & Resilience

Error Handling Patterns:

  • Structured error classification (System, User, Business)
  • Fallback behavior when non-critical services are unavailable
  • Detailed logging for debugging
  • Sanitized responses for security

Resilience Features:

  • Retry logic with exponential backoff
  • Timeout protection on all external calls
  • Fallback mechanisms for non-critical operations
  • Mutex handling for concurrent requests

5. Pluggable Resolver Architecture

A key design pattern enabling maintainability and extensibility through modular business logic.

┌─────────────────────────────────────────────────────────────────────────┐
│                         Custom Resolver Module                          │
├─────────────────────────────────────────────────────────────────────────┤
│  ┌─────────────────────────────────────────────────────────────────┐    │
│  │                    Shared Services Layer                        │    │
│  │  AuthorizationService │ MonitoringService │ CacheServices       │    │
│  └─────────────────────────────────────────────────────────────────┘    │
│                                    │                                    │
│  ┌─────────────────────────────────────────────────────────────────┐    │
│  │                   Resolver Services (Pluggable)                 │    │
│  │  ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐        │    │
│  │  │ Analysis  │ │ Template  │ │  Issue    │ │ Attributes│  ...   │    │
│  │  │ Resolver  │ │ Resolver  │ │ Resolver  │ │ Resolver  │        │    │
│  │  └───────────┘ └───────────┘ └───────────┘ └───────────┘        │    │
│  └─────────────────────────────────────────────────────────────────┘    │
│                                    │                                    │
│  ┌─────────────────────────────────────────────────────────────────┐    │
│  │            Factory Pattern: Auto-Registration                   │    │
│  │     RESOLVER_SERVICES → SchemaService.mergeResolvers()          │    │
│  └─────────────────────────────────────────────────────────────────┘    │
└─────────────────────────────────────────────────────────────────────────┘


                    ┌───────────────────────────────┐
                    │   GraphQL Schema (Neo4j GQL)  │
                    │   Auto-generated + Custom     │
                    └───────────────────────────────┘

Architecture Benefits:

BenefitDescription
PluggabilityNew resolvers added without modifying core GraphQL setup
Separation of ConcernsEach resolver handles specific domain logic independently
Shared ServicesCommon functionality (auth, monitoring, caching) centralized
Type SafetyAll resolvers implement ResolverService interface contract
TestabilityNestJS dependency injection enables easy mocking and testing
Auto-RegistrationFactory pattern automatically collects and merges resolvers

Adding a New Resolver:

  1. Create service implementing ResolverService interface
  2. Add to resolverServiceClasses array
  3. Resolver automatically injected and merged into GraphQL schema

Shared Services Available:

ServicePurpose
AuthorizationServiceContext extraction and authorization framework
MonitoringServiceOperation metrics, statistics, and health reporting
TemplateCacheServiceLRU cache with TTL for template content
AnalysisCacheServiceSpecialized caching for analysis metadata

Each resolver service is independently testable and has its own health endpoint.


Integration Points

DTModule Interface - Unlimited Integration Potential

The DTModule interface (@dethernety/dt-module) is the core abstraction enabling unlimited third-party integrations. Any system implementing this interface can extend Dethernety's capabilities:

┌─────────────────────────────────────────────────────────────────────────┐
│                         DTModule Interface                              │
├─────────────────────────────────────────────────────────────────────────┤
│  Design Classes        │ ComponentClass, SecurityBoundaryClass,         │
│  (via getMetadata)     │ DataFlowClass, ControlClass, DataClass         │
├────────────────────────┼────────────────────────────────────────────────┤
│  Configuration         │ Module templates, class templates, guides      │
│  (getModuleTemplate,   │ → Dynamic UI generation via JSONForms          │
│   getClassTemplate,    │                                                │
│   getClassGuide)       │                                                │
├────────────────────────┼────────────────────────────────────────────────┤
│  Security Logic        │ Exposure detection rules                       │
│  (getExposures,        │ Countermeasure mapping to MITRE frameworks     │
│   getCountermeasures)  │                                                │
├────────────────────────┼────────────────────────────────────────────────┤
│  Issue Integration     │ External issue tracker synchronization         │
│  (getSyncedIssue       │ (interface supports Jira, GitHub, etc.)        │
│   Attributes)          │                                                │
├────────────────────────┼────────────────────────────────────────────────┤
│  Analysis Engine       │ AI, query-based, rule-based, or hybrid         │
│  (runAnalysis,         │ analysis with document/result retrieval        │
│   getDocument, etc.)   │                                                │
└─────────────────────────────────────────────────────────────────────────┘

Analysis Engine Capabilities

The analysis-related methods enable pluggable analysis implementations:

// Key DTModule interface methods (simplified)
interface DTModule {
  // Analysis lifecycle
  runAnalysis?(id, analysisClassId, scope, pubSub, params): Promise<AnalysisSession>;
  startChat?(id, analysisClassId, scope, userQuestion, pubSub, params): Promise<AnalysisSession>;
  resumeAnalysis?(id, analysisClassId, input, pubSub): Promise<AnalysisSession>;
  getAnalysisStatus?(id): Promise<AnalysisStatus>;
  deleteAnalysis?(id): Promise<boolean>;

  // Results retrieval
  getAnalysisValues?(id, valueKey): Promise<object>;
  getDocument?(scope, analysisId, analysisClassId, filter): Promise<object>;  // Retrieve from engine's store

  // ... additional methods (templates, exposures, countermeasures)
}

Document Management:

The getDocument method provides a unified interface to retrieve analysis results from the module's configured storage backend. This decouples result retrieval from storage implementation:

// Example: Retrieve analysis results via filter
const results = await module.getDocument(scope, analysisId, analysisClassId, {
  document: 'index'           // Get index document
});

const details = await module.getDocument(scope, analysisId, analysisClassId, {
  namespace: ['analysis', scope, analysisId], // Direct store lookup
  key: 'threat-summary',
  attribute: 'findings'
});

The multi-key filter addresses the store directly, so its namespace must be an array of strings that contains the call's scope, and its key must be a string. The check is membership rather than position — the scope may appear anywhere in the namespace — so a module whose namespaces do not name the scope cannot be read through this mode. A filter that fails any of these checks returns an error object instead of a document; the { document: 'index' } mode is unaffected, because its address comes from the graph configuration rather than from the caller.

Supported Analysis Engine Types:

TypeDescriptionExample
AI-PoweredLLM-based analysis with multi-agent workflowsExternal AI orchestration engines, custom pipelines
Query-BasedDatabase-driven analysis using predefined queriesNeo4j pattern matching, MITRE lookups
Rule-BasedDeterministic analysis using business rulesCompliance checks, policy validation
HybridCombination of AI and rule-based approachesAI-assisted with rule guardrails

Architecture Benefits:

  • Engine Agnostic: Any analysis implementation works as long as it implements DTModule
  • Storage Abstraction: Unified document retrieval regardless of underlying store (document store, external DB, custom)
  • Long-Running Operations: Supports 15+ minute analysis sessions
  • Real-Time Updates: WebSocket or SSE subscriptions for progress streaming
  • Parallel Sessions: Multiple concurrent analyses with different scopes
  • Unified API: Same GraphQL interface regardless of underlying engine

Design Class Integration Capabilities

Design classes (ComponentClass, SecurityBoundaryClass, DataFlowClass, ControlClass, DataClass) define the building blocks available for threat modeling. Through the DTModule interface, these classes can integrate with external systems for live data:

// Key DTModule interface method (simplified)
interface DTModule {
  getMetadata(): DTMetadata | Promise<DTMetadata>;  // Returns all class definitions
}

// DTMetadata includes all design classes
interface DTMetadata {
  componentClasses?: ComponentClass[];       // System components (servers, services, devices)
  securityBoundaryClasses?: SecurityBoundaryClass[];  // Trust zones, network segments
  dataFlowClasses?: DataFlowClass[];         // Communication patterns
  controlClasses?: ControlClass[];           // Security controls
  dataClasses?: DataClass[];                 // Data types and sensitivity
  // ... additional metadata
}

Integration Examples:

Source SystemClass TypeIntegration Example
Kubernetes APIComponentClass, SecurityBoundaryClassAuto-discover pods, services, namespaces as components and boundaries
Cloud Provider APIsComponentClass, DataFlowClassImport AWS/Azure/GCP resources and their connections
CMDB SystemsComponentClassSync enterprise asset inventory as modeling components
Network ScannersDataFlowClassImport discovered network flows between systems
Container RegistriesComponentClassDefine components from available container images

Architecture Benefits:

  • Live Data Integration: Classes can fetch current infrastructure state rather than static definitions
  • Dynamic Modeling: Threat models reflect actual deployed systems
  • Cross-Platform: Same interface works with any infrastructure provider
  • Custom Taxonomies: Organizations can define domain-specific component types

Security Logic Integration Capabilities

Security logic methods (getExposures, getCountermeasures) evaluate component configurations to identify vulnerabilities and map defensive controls. These methods support pluggable rule engines:

// Key DTModule interface methods (simplified)
interface DTModule {
  // The trailing `token?` is the per-request bearer, passed through for modules
  // that call an external service; the platform never decodes or logs it. See
  // DT_MODULE_INTERFACE.md for the authoritative signatures.
  getExposures?(id: string, classId: string, token?: string): Promise<Exposure[]>;
  getCountermeasures?(id: string, classId: string, token?: string): Promise<Countermeasure[]>;
}

Rule Engine Options:

EngineImplementationUse Case
Rego (in-process Regorus WASM)DtFileOpaModulePolicy-as-code with the Rego language
Custom RulesCustom moduleOrganization-specific evaluation logic
External Policy ServicesAPI integrationCentralized enterprise policy engines

Integration Examples:

Source SystemSecurity Logic TypeIntegration Example
AWS IAM AnalyzerControlClass rulesEvaluate IAM policies against least-privilege rules
Kubernetes RBACExposure detectionIdentify overly permissive role bindings
Cloud Security PostureCountermeasure mappingMap findings to MITRE D3FEND defenses
Compliance FrameworksExposure detectionCheck configurations against CIS benchmarks
Vulnerability ScannersExposure detectionImport CVEs as exposures with ATT&CK mappings

Architecture Benefits:

  • Policy-as-Code: Security rules versioned and tested like application code
  • Centralized Policy: Enterprise-wide rules applied consistently
  • Framework Integration: Automatic MITRE ATT&CK and D3FEND linking
  • Auditability: Rule evaluation logged for compliance

Configuration & Template Capabilities

Configuration methods provide dynamic UI generation through JSON Schema templates and Markdown documentation:

// Key DTModule interface methods (simplified)
interface DTModule {
  getModuleTemplate?(): Promise<string>;                        // Module-level configuration schema
  getClassTemplate?(id: string, token?: string): Promise<string>;  // Class-specific configuration schema
  getClassGuide?(id: string, token?: string): Promise<string>;     // Markdown documentation for class
  isContentCallerVariant?(): boolean;                          // Opt-in: content varies per caller → bypass the template cache
}

Capabilities:

FeatureMethodPurpose
Dynamic FormsgetClassTemplate()JSON Schema defining configuration UI via JSONForms
DocumentationgetClassGuide()Markdown guides with MITRE references and best practices
Module ConfiggetModuleTemplate()Top-level module settings and preferences

Templates can be stored in various backends (files, database, CMS) and retrieved dynamically, enabling centralized management of security guidance.

Issue Tracker Integration Capabilities

The DTModule interface supports external issue tracker synchronization. Currently, issues are stored in the graph database; external integrations can be built via the interface:

// Key DTModule interface method (simplified)
interface DTModule {
  getSyncedIssueAttributes?(
    issueId: string,
    attributes: string,    // Which attributes to fetch
    lastSyncAt: string     // Incremental sync support
  ): Promise<string>;
}

Potential Integrations:

PlatformIntegration TypeCapabilities
JiraREST APISync status, assignee, priority, custom fields
GitHub IssuesGraphQL/RESTLink to security issues, pull request status
Azure DevOpsREST APIWork item synchronization
ServiceNowREST APIITSM integration for enterprise workflows
Custom SystemsWebhook/APIAny system exposing issue attributes via API

Interface Benefits:

  • Real-Time Sync: No caching, always current data from external systems
  • Timeout Protection: 30-second limit prevents blocking on slow systems
  • Fallback: Returns local data when external system is unreachable

Reference Implementations

The @dethernety/dt-module package includes reference implementations demonstrating different integration patterns:

ImplementationStorageRule EngineUse Case
DtFileOpaModuleFile-basedRego (in-process Regorus WASM)Policy-evaluating modules with version-controlled configuration
DtLgModuleLangGraph storeAI-poweredAdvanced AI analysis with agent workflows

These implementations serve as templates for custom integrations, demonstrating the full breadth of the DTModule interface.

MITRE Frameworks

Deep integration with cybersecurity standards:

  • ATT&CK Integration: Automatic linking of exposures to attack techniques
  • D3FEND Integration: Countermeasure mapping to defensive techniques
  • Data Ingestion: Automated MITRE data import and updates

Configuration Management

Environment-Based Configuration

The system uses validated, type-safe configuration:

# Core Settings
NODE_ENV=production
NEO4J_URI=neo4j+s://cluster.neo4j.io:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=${NEO4J_PASSWORD}

# Security Settings
OIDC_JWKS_URI=https://auth-provider/.well-known/jwks.json
GQL_QUERY_DEPTH_LIMIT=10
GQL_QUERY_COMPLEXITY_LIMIT=1000

# Module Settings
ALLOWED_MODULES=dethernety-module,dt-built-in-module
ENABLE_MODULE_HOT_RELOAD=false

# Performance Settings
NEO4J_MAX_POOL_SIZE=100
NEO4J_CONNECTION_TIMEOUT=60000

Feature Comparison: Development vs Production

FeatureDevelopmentProduction
GraphQL PlaygroundEnabledDisabled
Schema IntrospectionEnabledDisabled
Error DetailsFull stack tracesSanitized messages
Query LimitsRelaxedStrict
Module Hot ReloadEnabledDisabled
Auth-Disabled ModeAvailable (ENABLE_NOAUTH=true)Blocked
Logging LevelDebugInfo

Data Architecture

Graph Database Model

The system uses Bolt protocol and Cypher query language, enabling deployment on Neo4j, Memgraph, or other compatible graph databases. Memgraph is the default choice for cost-optimized deployments due to favorable unit economics.

The database stores interconnected security model data:

Core Entities:

  • Folder - Hierarchical organization for models and controls
  • Model - System models containing security boundaries, modules, and analyses
  • Component - Key entities in the system (processes, external entities, stores)
  • SecurityBoundary - Trust boundaries with hierarchical nesting support, a trust/exposure zone, business-function and operational-plane tags, and approved peer channels (conduits) recording declared design intent
  • DataFlow - Data flow connections between components
  • Data - Data elements handled by components, flows, and boundaries
  • Control - Security controls supporting elements
  • Exposure - Identified vulnerabilities linked to MITRE ATT&CK techniques
  • Countermeasure - Defensive measures linked to MITRE D3FEND techniques
  • Issue - Tracked issues associated with any element
  • Analysis - Analysis instances with status tracking

MITRE Framework Entities:

  • MitreAttackTactic - ATT&CK tactics (e.g., Initial Access, Execution)
  • MitreAttackTechnique - ATT&CK techniques and sub-techniques
  • MitreAttackMitigation - ATT&CK mitigations
  • MitreDefendTactic - D3FEND tactics
  • MitreDefendTechnique - D3FEND defensive techniques

Module Entities:

  • Module - Module metadata with version and path
  • ComponentClass, SecurityBoundaryClass, DataFlowClass - Design element classes
  • ControlClass, DataClass - Control and data type classes
  • AnalysisClass - Analysis type definitions
  • IssueClass - Issue type definitions with templates

Transaction Patterns

All database operations use modern Neo4j v5 patterns:

// Read Operations
const result = await session.executeRead(async (tx) => {
  return await tx.run(query, parameters);
});

// Write Operations
await session.executeWrite(async (tx) => {
  return await tx.run(query, parameters);
});

Production Deployment

Deployment Requirements

Infrastructure:

  • Node.js 18+ runtime environment
  • Bolt-compatible graph database (Neo4j 7.x or Memgraph)
  • HTTPS/WSS load balancer
  • Container orchestration (Docker/Kubernetes)

Resource Recommendations:

  • 2+ CPU cores per instance
  • 4GB+ RAM per instance
  • SSD storage for graph database
  • Database replicas (tier-dependent, for high availability)

Health Check Endpoints

GET /health/gql          - GraphQL system health
GET /health/database     - Database connectivity
GET /health/modules      - Module registry status

Monitoring Integration

The backend supports integration with:

  • Log aggregation systems (structured JSON logs)
  • Metrics collection (Prometheus-compatible)
  • Health check monitoring (Kubernetes probes)
  • Alerting systems (configurable thresholds)

Detailed Documentation

For implementation-level details, refer to the Low-Level Design (LLD) documentation:

DocumentDescription
GraphQL ModuleComplete GraphQL API documentation
Database ModuleDatabase service and configuration
Module RegistryPlugin system architecture
Analysis ResolverAI integration service
Issue ResolverExternal system synchronization
Template ResolverContent management service
Module ManagementModule database operations
Architecture DiagramsDetailed architecture diagrams
API ReferenceComplete API specifications

Summary

The backend is stateless (horizontally scalable), loads modules at startup for extensibility, and routes all analysis through the DTModule interface regardless of the analysis engine behind it (AI, query-based, or rule-based).