# jimididit/koncreet architecture

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

- Interactive diagram: https://gitdiagram.com/jimididit/koncreet
- Repository: https://github.com/jimididit/koncreet

## Overview

Koncreet is a Bash CLI for first-hour hardening of Debian and Ubuntu servers. An operator runs a command or supplies a config; the CLI plans or applies the selected hardening module, with dry-run and confirmation options. The documented stages cover baseline setup, firewall rules, fail2ban, security updates, and SSH hardening. The README documents module behavior and usage, but no source excerpts were provided, so internal call relationships and the roles of individual lib files cannot be verified.

Main entry points: [`koncreet`](https://github.com/jimididit/koncreet/blob/main/koncreet) (Koncreet CLI), [`modules/baseline.sh`](https://github.com/jimididit/koncreet/blob/main/modules/baseline.sh) (Baseline), [`modules/firewall.sh`](https://github.com/jimididit/koncreet/blob/main/modules/firewall.sh) (Firewall), [`modules/fail2ban.sh`](https://github.com/jimididit/koncreet/blob/main/modules/fail2ban.sh) (Fail2ban)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and configuration"]
  node_cli["Koncreet CLI"]
  node_config["Config example"]
end

subgraph group_hardening["Hardening modules"]
  node_baseline["Baseline<br/>[baseline.sh]"]
  node_firewall["Firewall<br/>[firewall.sh]"]
  node_fail2ban["Fail2ban<br/>[fail2ban.sh]"]
  node_updates["Security updates<br/>[updates.sh]"]
  node_ssh["SSH hardening<br/>[ssh.sh]"]
end

subgraph group_host["Server integrations"]
  node_linux["Linux VPS"]
  node_ufw["UFW"]
  node_sshd["OpenSSH daemon"]
end

node_operator(("Operator"))

node_operator -->|"runs commands"| node_cli
node_config -->|"configures apply"| node_cli
node_cli -->|"dispatches baseline"| node_baseline
node_cli -->|"dispatches firewall"| node_firewall
node_cli -->|"dispatches fail2ban"| node_fail2ban
node_cli -->|"dispatches updates"| node_updates
node_cli -->|"dispatches SSH"| node_ssh
node_baseline -->|"hardens host"| node_linux
node_firewall -->|"configures firewall"| node_linux
node_fail2ban -.->|"uses bans"| node_ufw
node_updates -->|"configures updates"| node_linux
node_ssh -->|"verifies config"| node_sshd

click node_cli "https://github.com/jimididit/koncreet/blob/main/koncreet"
click node_config "https://github.com/jimididit/koncreet/blob/main/share/koncreet.conf.example"
click node_baseline "https://github.com/jimididit/koncreet/blob/main/modules/baseline.sh"
click node_firewall "https://github.com/jimididit/koncreet/blob/main/modules/firewall.sh"
click node_fail2ban "https://github.com/jimididit/koncreet/blob/main/modules/fail2ban.sh"
click node_updates "https://github.com/jimididit/koncreet/blob/main/modules/updates.sh"
click node_ssh "https://github.com/jimididit/koncreet/blob/main/modules/ssh.sh"

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_config toneBlue
class node_baseline,node_firewall,node_fail2ban,node_updates,node_ssh toneAmber
class node_linux,node_ufw,node_sshd toneMint
class node_operator toneIndigo
```

## Components

### CLI and configuration

- [Koncreet CLI](https://github.com/jimididit/koncreet/blob/main/koncreet): `koncreet`
- [Config example](https://github.com/jimididit/koncreet/blob/main/share/koncreet.conf.example): `share/koncreet.conf.example`

### Hardening modules

- [Baseline](https://github.com/jimididit/koncreet/blob/main/modules/baseline.sh): `modules/baseline.sh`
- [Firewall](https://github.com/jimididit/koncreet/blob/main/modules/firewall.sh): `modules/firewall.sh`
- [Fail2ban](https://github.com/jimididit/koncreet/blob/main/modules/fail2ban.sh): `modules/fail2ban.sh`
- [Security updates](https://github.com/jimididit/koncreet/blob/main/modules/updates.sh): `modules/updates.sh`
- [SSH hardening](https://github.com/jimididit/koncreet/blob/main/modules/ssh.sh): `modules/ssh.sh`

### Server integrations

- **Linux VPS**
- **UFW**
- **OpenSSH daemon**

### Other components

- **Operator**

## Connections

- Operator → Koncreet CLI: runs commands (evidence: `README.md`)
- Config example → Koncreet CLI: configures apply (evidence: `README.md`)
- Koncreet CLI → Baseline: dispatches baseline (evidence: `README.md`)
- Koncreet CLI → Firewall: dispatches firewall (evidence: `README.md`)
- Koncreet CLI → Fail2ban: dispatches fail2ban (evidence: `README.md`)
- Koncreet CLI → Security updates: dispatches updates (evidence: `README.md`)
- Koncreet CLI → SSH hardening: dispatches SSH (evidence: `README.md`)
- Baseline → Linux VPS: hardens host (evidence: `README.md`)
- Firewall → Linux VPS: configures firewall (evidence: `README.md`)
- Fail2ban → UFW: uses bans (evidence: `README.md`)
- Security updates → Linux VPS: configures updates (evidence: `README.md`)
- SSH hardening → OpenSSH daemon: verifies config (evidence: `README.md`)
