# archishman-das15/dnssec-gateway architecture

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

- Interactive diagram: https://gitdiagram.com/archishman-das15/dnssec-gateway
- Repository: https://github.com/archishman-das15/dnssec-gateway

## Overview

DNSSEC Gateway delegates DNS resolution and validation to Unbound, then returns the result with an HMAC attestation that clients verify. The primary workflow runs from a CLI or desktop user through the gateway and back to a trusted result; the GUI is an alternate presentation path. The README documents Unbound’s recursive resolution to the Internet. Source excerpts show the main calls and signing/verification logic; other documented deployment details are not expanded into runtime components.

Main entry points: [`client/client.py`](https://github.com/archishman-das15/dnssec-gateway/blob/main/client/client.py) (DNSSEC Client), [`gateway/app.py`](https://github.com/archishman-das15/dnssec-gateway/blob/main/gateway/app.py) (Gateway API), [`client/ui/dashboard.py`](https://github.com/archishman-das15/dnssec-gateway/blob/main/client/ui/dashboard.py) (Dashboard), [`gateway/resolver.py`](https://github.com/archishman-das15/dnssec-gateway/blob/main/gateway/resolver.py) (DNSSEC Resolver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client"]
  node_cli["CLI<br/>[main.py]"]
  node_gui_entry["GUI Entry<br/>[gui.py]"]
  node_dashboard["Dashboard<br/>[dashboard.py]"]
  node_theme["UI Theme<br/>[theme.py]"]
  node_client_api["DNSSEC Client<br/>[client.py]"]
  node_client_crypto["HMAC Verifier<br/>[crypto.py]"]
end

subgraph group_gateway["Gateway"]
  node_api["Gateway API<br/>[app.py]"]
  node_request_model["Request Model<br/>[models.py]"]
  node_attestation["Attestation Signer<br/>[attestation.py]"]
end

subgraph group_resolver["DNS Resolution"]
  node_dns_resolver["DNSSEC Resolver<br/>[resolver.py]"]
end

subgraph group_config["Configuration"]
  node_gateway_config["Gateway Settings<br/>[config.py]"]
  node_client_config["Client Settings<br/>[client.py]"]
end

node_user(("Domain User"))
node_unbound["Unbound Resolver"]
node_internet["Internet DNS"]

node_user -->|"enters domain"| node_cli
node_user -->|"enters domain"| node_gui_entry
node_gui_entry -->|"starts"| node_dashboard
node_cli -->|"resolves with"| node_client_api
node_dashboard -->|"resolves with"| node_client_api
node_dashboard -->|"styles with"| node_theme
node_client_api -->|"posts domain"| node_api
node_client_api -->|"verifies HMAC"| node_client_crypto
node_client_api -->|"loads settings"| node_client_config
node_api -->|"accepts request"| node_request_model
node_api -->|"resolves domain"| node_dns_resolver
node_api -->|"signs result"| node_attestation
node_dns_resolver -->|"queries DNSSEC"| node_unbound
node_unbound -->|"recurses to"| node_internet
node_dns_resolver -->|"uses resolver settings"| node_gateway_config
node_attestation -->|"uses signing settings"| node_gateway_config

click node_cli "https://github.com/archishman-das15/dnssec-gateway/blob/main/client/main.py"
click node_gui_entry "https://github.com/archishman-das15/dnssec-gateway/blob/main/client/gui.py"
click node_dashboard "https://github.com/archishman-das15/dnssec-gateway/blob/main/client/ui/dashboard.py"
click node_theme "https://github.com/archishman-das15/dnssec-gateway/blob/main/client/ui/theme.py"
click node_client_api "https://github.com/archishman-das15/dnssec-gateway/blob/main/client/client.py"
click node_client_crypto "https://github.com/archishman-das15/dnssec-gateway/blob/main/client/crypto.py"
click node_api "https://github.com/archishman-das15/dnssec-gateway/blob/main/gateway/app.py"
click node_request_model "https://github.com/archishman-das15/dnssec-gateway/blob/main/gateway/models.py"
click node_attestation "https://github.com/archishman-das15/dnssec-gateway/blob/main/gateway/attestation.py"
click node_dns_resolver "https://github.com/archishman-das15/dnssec-gateway/blob/main/gateway/resolver.py"
click node_gateway_config "https://github.com/archishman-das15/dnssec-gateway/blob/main/gateway/config.py"
click node_client_config "https://github.com/archishman-das15/dnssec-gateway/blob/main/client/client.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_cli,node_gui_entry,node_dashboard,node_theme,node_client_api,node_client_crypto,node_user toneBlue
class node_api,node_request_model,node_attestation toneAmber
class node_dns_resolver toneMint
class node_gateway_config,node_client_config toneRose
class node_unbound,node_internet toneIndigo
```

## Components

### Client

- [CLI](https://github.com/archishman-das15/dnssec-gateway/blob/main/client/main.py): `client/main.py`
- [GUI Entry](https://github.com/archishman-das15/dnssec-gateway/blob/main/client/gui.py): `client/gui.py`
- [Dashboard](https://github.com/archishman-das15/dnssec-gateway/blob/main/client/ui/dashboard.py): `client/ui/dashboard.py`
- [UI Theme](https://github.com/archishman-das15/dnssec-gateway/blob/main/client/ui/theme.py): `client/ui/theme.py`
- [DNSSEC Client](https://github.com/archishman-das15/dnssec-gateway/blob/main/client/client.py): `client/client.py`
- [HMAC Verifier](https://github.com/archishman-das15/dnssec-gateway/blob/main/client/crypto.py): `client/crypto.py`

### Gateway

- [Gateway API](https://github.com/archishman-das15/dnssec-gateway/blob/main/gateway/app.py): `gateway/app.py`
- [Request Model](https://github.com/archishman-das15/dnssec-gateway/blob/main/gateway/models.py): `gateway/models.py`
- [Attestation Signer](https://github.com/archishman-das15/dnssec-gateway/blob/main/gateway/attestation.py): `gateway/attestation.py`

### DNS Resolution

- [DNSSEC Resolver](https://github.com/archishman-das15/dnssec-gateway/blob/main/gateway/resolver.py): `gateway/resolver.py`

### Configuration

- [Gateway Settings](https://github.com/archishman-das15/dnssec-gateway/blob/main/gateway/config.py): `gateway/config.py`
- [Client Settings](https://github.com/archishman-das15/dnssec-gateway/blob/main/client/client.py): `client/client.py`

### Other components

- **Domain User**
- **Unbound Resolver**
- **Internet DNS**

## Connections

- Domain User → CLI: enters domain (evidence: `client/main.py`)
- Domain User → GUI Entry: enters domain (evidence: `README.md`)
- GUI Entry → Dashboard: starts (evidence: `client/gui.py`)
- CLI → DNSSEC Client: resolves with (evidence: `client/main.py`)
- Dashboard → DNSSEC Client: resolves with (evidence: `client/ui/dashboard.py`)
- Dashboard → UI Theme: styles with (evidence: `client/ui/dashboard.py`)
- DNSSEC Client → Gateway API: posts domain (evidence: `client/client.py`)
- DNSSEC Client → HMAC Verifier: verifies HMAC (evidence: `client/client.py`)
- DNSSEC Client → Client Settings: loads settings (evidence: `client/client.py`)
- Gateway API → Request Model: accepts request (evidence: `gateway/app.py`)
- Gateway API → DNSSEC Resolver: resolves domain (evidence: `gateway/app.py`)
- Gateway API → Attestation Signer: signs result (evidence: `gateway/app.py`)
- DNSSEC Resolver → Unbound Resolver: queries DNSSEC (evidence: `gateway/resolver.py`)
- Unbound Resolver → Internet DNS: recurses to (evidence: `README.md`)
- DNSSEC Resolver → Gateway Settings: uses resolver settings (evidence: `gateway/resolver.py`)
- Attestation Signer → Gateway Settings: uses signing settings (evidence: `gateway/attestation.py`)
