# kernelkit/infix architecture

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

- Interactive diagram: https://gitdiagram.com/kernelkit/infix
- Repository: https://github.com/kernelkit/infix

## Overview

Infix is a managed network-appliance OS. Its principal workflow is configuring a device through the CLI or web UI, applying modeled configuration through sysrepo-backed services, and exposing operational state for monitoring. The repository also includes routing backends, host-status collectors, and configuration-file transfer. The README documents shared YANG-driven CLI and API access; source excerpts show selected routing, service, and status behaviors. Several subsystem connections are documented rather than directly traced in the sampled source.

Main entry points: [`src/confd/src/main.c`](https://github.com/kernelkit/infix/blob/main/src/confd/src/main.c) (YANG configuration), [`src/webui/internal/server/server.go`](https://github.com/kernelkit/infix/blob/main/src/webui/internal/server/server.go) (Web UI), [`src/confd/src/core.h`](https://github.com/kernelkit/infix/blob/main/src/confd/src/core.h) (Config handlers), [`src/netd/src/netd.c`](https://github.com/kernelkit/infix/blob/main/src/netd/src/netd.c) (Routing daemon)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["User Interfaces"]
  node_cli["Generated CLI<br/>[infix.c]"]
  node_webui["Web UI<br/>[server.go]"]
  node_restconf["RESTCONF client<br/>[client.go]"]
  node_copy["Config transfer<br/>[copy.c]"]
end

subgraph group_config["Configuration Runtime"]
  node_sysrepo["YANG configuration<br/>[main.c]"]
  node_confd["Config handlers<br/>[core.h]"]
  node_services["Service management<br/>[services.c]"]
  node_libsrx["Sysrepo helpers<br/>[srx_val.c]"]
end

subgraph group_network["Networking"]
  node_routing_config["Routing configuration<br/>[routing.c]"]
  node_netd["Routing daemon<br/>[netd.c]"]
  node_json_builder["FRR JSON builder<br/>[json_builder.c]"]
  node_linux_backend["Linux backend<br/>[linux_backend.c]"]
end

subgraph group_ops["Operations and Status"]
  node_statd["Status daemon<br/>[statd.c]"]
  node_yang_status["YANG status collectors<br/>[ietf_routing.py]"]
  node_host["Host access<br/>[host.py]"]
  node_status_web["Status views<br/>[dashboard.go]"]
  node_syslog["System logs<br/>[journal.c]"]
end

node_operator(("Administrator"))

node_operator -->|"configures via"| node_cli
node_operator -->|"configures via"| node_webui
node_cli -->|"edits YANG"| node_sysrepo
node_webui -->|"uses API"| node_restconf
node_restconf -->|"accesses models"| node_sysrepo
node_copy -->|"imports exports"| node_sysrepo
node_sysrepo -.->|"dispatches changes"| node_confd
node_confd -.->|"handles services"| node_services
node_confd -.->|"handles routes"| node_routing_config
node_routing_config -.->|"signals RIP needs"| node_netd
node_netd -.->|"builds FRR JSON"| node_json_builder
node_netd -.->|"applies networking"| node_linux_backend
node_statd -.->|"collects status"| node_yang_status
node_yang_status -->|"runs host commands"| node_host
node_webui -.->|"renders status"| node_status_web
node_statd -.->|"records events"| node_syslog

click node_cli "https://github.com/kernelkit/infix/blob/main/src/klish-plugin-infix/src/infix.c"
click node_webui "https://github.com/kernelkit/infix/blob/main/src/webui/internal/server/server.go"
click node_restconf "https://github.com/kernelkit/infix/blob/main/src/webui/internal/restconf/client.go"
click node_copy "https://github.com/kernelkit/infix/blob/main/src/bin/copy.c"
click node_sysrepo "https://github.com/kernelkit/infix/blob/main/src/confd/src/main.c"
click node_confd "https://github.com/kernelkit/infix/blob/main/src/confd/src/core.h"
click node_services "https://github.com/kernelkit/infix/blob/main/src/confd/src/services.c"
click node_libsrx "https://github.com/kernelkit/infix/blob/main/src/libsrx/src/srx_val.c"
click node_routing_config "https://github.com/kernelkit/infix/blob/main/src/confd/src/routing.c"
click node_netd "https://github.com/kernelkit/infix/blob/main/src/netd/src/netd.c"
click node_json_builder "https://github.com/kernelkit/infix/blob/main/src/netd/src/json_builder.c"
click node_linux_backend "https://github.com/kernelkit/infix/blob/main/src/netd/src/linux_backend.c"
click node_statd "https://github.com/kernelkit/infix/blob/main/src/statd/statd.c"
click node_yang_status "https://github.com/kernelkit/infix/blob/main/src/statd/python/yanger/ietf_routing.py"
click node_host "https://github.com/kernelkit/infix/blob/main/src/statd/python/yanger/host.py"
click node_status_web "https://github.com/kernelkit/infix/blob/main/src/webui/internal/handlers/dashboard.go"
click node_syslog "https://github.com/kernelkit/infix/blob/main/src/statd/journal.c"

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_cli,node_webui,node_restconf,node_copy toneBlue
class node_sysrepo,node_confd,node_services,node_libsrx toneAmber
class node_routing_config,node_netd,node_json_builder,node_linux_backend toneMint
class node_statd,node_yang_status,node_host,node_status_web,node_syslog toneRose
class node_operator toneIndigo
```

## Components

### User Interfaces

- [Generated CLI](https://github.com/kernelkit/infix/blob/main/src/klish-plugin-infix/src/infix.c): `src/klish-plugin-infix/src/infix.c`
- [Web UI](https://github.com/kernelkit/infix/blob/main/src/webui/internal/server/server.go): `src/webui/internal/server/server.go`
- [RESTCONF client](https://github.com/kernelkit/infix/blob/main/src/webui/internal/restconf/client.go): `src/webui/internal/restconf/client.go`
- [Config transfer](https://github.com/kernelkit/infix/blob/main/src/bin/copy.c): `src/bin/copy.c`

### Configuration Runtime

- [YANG configuration](https://github.com/kernelkit/infix/blob/main/src/confd/src/main.c): `src/confd/src/main.c`
- [Config handlers](https://github.com/kernelkit/infix/blob/main/src/confd/src/core.h): `src/confd/src/core.h`
- [Service management](https://github.com/kernelkit/infix/blob/main/src/confd/src/services.c): `src/confd/src/services.c`
- [Sysrepo helpers](https://github.com/kernelkit/infix/blob/main/src/libsrx/src/srx_val.c): `src/libsrx/src/srx_val.c`

### Networking

- [Routing configuration](https://github.com/kernelkit/infix/blob/main/src/confd/src/routing.c): `src/confd/src/routing.c`
- [Routing daemon](https://github.com/kernelkit/infix/blob/main/src/netd/src/netd.c): `src/netd/src/netd.c`
- [FRR JSON builder](https://github.com/kernelkit/infix/blob/main/src/netd/src/json_builder.c): `src/netd/src/json_builder.c`
- [Linux backend](https://github.com/kernelkit/infix/blob/main/src/netd/src/linux_backend.c): `src/netd/src/linux_backend.c`

### Operations and Status

- [Status daemon](https://github.com/kernelkit/infix/blob/main/src/statd/statd.c): `src/statd/statd.c`
- [YANG status collectors](https://github.com/kernelkit/infix/blob/main/src/statd/python/yanger/ietf_routing.py): `src/statd/python/yanger/ietf_routing.py`
- [Host access](https://github.com/kernelkit/infix/blob/main/src/statd/python/yanger/host.py): `src/statd/python/yanger/host.py`
- [Status views](https://github.com/kernelkit/infix/blob/main/src/webui/internal/handlers/dashboard.go): `src/webui/internal/handlers/dashboard.go`
- [System logs](https://github.com/kernelkit/infix/blob/main/src/statd/journal.c): `src/statd/journal.c`

### Other components

- **Administrator**

## Connections

- Administrator → Generated CLI: configures via
- Administrator → Web UI: configures via
- Generated CLI → YANG configuration: edits YANG
- Web UI → RESTCONF client: uses API
- RESTCONF client → YANG configuration: accesses models
- Config transfer → YANG configuration: imports exports (evidence: `src/bin/copy.c`)
- YANG configuration → Config handlers: dispatches changes
- Config handlers → Service management: handles services (evidence: `src/confd/src/services.c`)
- Config handlers → Routing configuration: handles routes (evidence: `src/confd/src/routing.c`)
- Routing configuration → Routing daemon: signals RIP needs
- Routing daemon → FRR JSON builder: builds FRR JSON
- Routing daemon → Linux backend: applies networking
- Status daemon → YANG status collectors: collects status
- YANG status collectors → Host access: runs host commands (evidence: `src/statd/python/yanger/ietf_routing.py`)
- Web UI → Status views: renders status
- Status daemon → System logs: records events
