Skip to main content
The api container runs the .NET API server that orchestrates all operations.

Responsibilities

The API server is the central hub that:
  • Exposes REST endpoints for the frontend
  • Orchestrates code analysis via the analyzer service
  • Manages graph data in the database
  • Coordinates GPU layout computation
  • Hosts the plugin/overlay system

Architecture

Controllers

REST endpoints that receive HTTP requests from the frontend

Core Business Logic

Pure domain logic with no external dependencies

Ports (Interfaces)

Abstractions for external services (database, GPU, analyzer)

Adapters

Implementations that connect to actual services

Key Concepts

ConceptDescription
PortsCore interfaces: IGraphStorage, ILayoutCompute, IOverlayPlugin, IStructuralAnalyzer
PluginsExtending CodeGraph with custom data
OverlaysVisual layers on top of the graph

API Endpoints

Graph Data

MethodEndpointDescription
GET/api/graphGet all nodes and edges with attributes
GET/api/graph/nodes/{nodeId}Get single node by ID
POST/api/graph/layoutSave layout positions to database
DELETE/api/graph/layoutClear layout positions

GPU Layout

MethodEndpointDescription
POST/api/graph/layout/computeTrigger GPU layout computation
GET/api/graph/layout/compute/statusGet computation progress
POST/api/graph/layout/compute/cancelCancel running computation
GET/api/graph/layout/compute/availableCheck if GPU available

Overlays

MethodEndpointDescription
GET/api/overlaysGet all registered plugins
POST/api/overlays/{pluginId}/applyApply plugin data
DELETE/api/overlays/{pluginId}/applyRemove plugin data

Services

MethodEndpointDescription
GET/api/healthService health status
GET/api/servicesList all services
GET/api/examplesList example codebases
POST/api/examples/{name}/loadLoad example