# markmental/eznfs architecture

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

- Interactive diagram: https://gitdiagram.com/markmental/eznfs
- Repository: https://github.com/markmental/eznfs

## Overview

eznfs manages Linux NFS entries in /etc/fstab through a CLI and interactive wizard. The principal workflow validates a requested share, creates its local mount point, safely saves the fstab entry, then optionally reloads systemd and mounts it. Separate workflows inspect, edit, and remove entries. The graph preserves README-documented capabilities; source excerpts are partial, so detailed internal call relationships are omitted where they are not shown.

Main entry points: [`eznfs.py`](https://github.com/markmental/eznfs/blob/main/eznfs.py) (Add share), [`eznfs_ui.py`](https://github.com/markmental/eznfs/blob/main/eznfs_ui.py) (Rich presentation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry Points"]
  node_main["Application entry<br/>[eznfs.py]"]
  node_cli["CLI commands<br/>[eznfs.py]"]
  node_wizard["Interactive wizard<br/>[eznfs.py]"]
end

subgraph group_share["Share Workflows"]
  node_add["Add share<br/>[eznfs.py]"]
  node_list["List shares<br/>[eznfs.py]"]
  node_edit["Edit share<br/>[eznfs.py]"]
  node_remove["Remove share<br/>[eznfs.py]"]
  node_validate["Input validation<br/>[eznfs.py]"]
  node_usercheck["UID/GID reminder<br/>[eznfs.py]"]
end

subgraph group_system["System Integration"]
  node_resolve["Hostname check<br/>[eznfs.py]"]
  node_fstab[("fstab entries")]
  node_mountpoint["Mount point<br/>[eznfs.py]"]
  node_mountops["Mount operations<br/>[eznfs.py]"]
  node_systemd["systemd and mount"]
end

subgraph group_presentation["Terminal Interface"]
  node_ui["Rich presentation<br/>[eznfs_ui.py]"]
end

node_user(("Administrator"))
node_nfsserver["NFS server"]
node_terminal(("Terminal"))

node_user -->|"invokes"| node_main
node_main -->|"dispatches"| node_cli
node_main -->|"dispatches"| node_wizard
node_cli -->|"runs"| node_add
node_cli -->|"runs"| node_list
node_cli -->|"runs"| node_edit
node_cli -->|"runs"| node_remove
node_wizard -->|"offers apply"| node_add
node_add -->|"validates"| node_validate
node_add -->|"checks hostname"| node_resolve
node_add -->|"creates"| node_mountpoint
node_add -->|"writes entry"| node_fstab
node_add -->|"applies mount"| node_mountops
node_add -->|"reminds about"| node_usercheck
node_wizard -->|"checks inputs"| node_validate
node_wizard -->|"checks hostname"| node_resolve
node_wizard -->|"offers save"| node_fstab
node_wizard -->|"offers mount"| node_mountops
node_list -->|"reads entries"| node_fstab
node_edit -->|"updates entry"| node_fstab
node_remove -->|"removes entry"| node_fstab
node_mountops -->|"reloads or mounts"| node_systemd
node_mountops -->|"mounts share"| node_nfsserver
node_resolve -->|"resolves host"| node_nfsserver
node_main -->|"uses presentation"| node_ui
node_ui -->|"renders prompts"| node_terminal

click node_main "https://github.com/markmental/eznfs/blob/main/eznfs.py"
click node_cli "https://github.com/markmental/eznfs/blob/main/eznfs.py"
click node_wizard "https://github.com/markmental/eznfs/blob/main/eznfs.py"
click node_add "https://github.com/markmental/eznfs/blob/main/eznfs.py"
click node_list "https://github.com/markmental/eznfs/blob/main/eznfs.py"
click node_edit "https://github.com/markmental/eznfs/blob/main/eznfs.py"
click node_remove "https://github.com/markmental/eznfs/blob/main/eznfs.py"
click node_validate "https://github.com/markmental/eznfs/blob/main/eznfs.py"
click node_resolve "https://github.com/markmental/eznfs/blob/main/eznfs.py"
click node_usercheck "https://github.com/markmental/eznfs/blob/main/eznfs.py"
click node_mountpoint "https://github.com/markmental/eznfs/blob/main/eznfs.py"
click node_mountops "https://github.com/markmental/eznfs/blob/main/eznfs.py"
click node_ui "https://github.com/markmental/eznfs/blob/main/eznfs_ui.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_main,node_cli,node_wizard toneBlue
class node_add,node_list,node_edit,node_remove,node_validate,node_usercheck toneAmber
class node_resolve,node_fstab,node_mountpoint,node_mountops,node_systemd,node_nfsserver toneMint
class node_ui toneRose
class node_user,node_terminal toneIndigo
```

## Components

### Entry Points

- [Application entry](https://github.com/markmental/eznfs/blob/main/eznfs.py): `eznfs.py`
- [CLI commands](https://github.com/markmental/eznfs/blob/main/eznfs.py): `eznfs.py`
- [Interactive wizard](https://github.com/markmental/eznfs/blob/main/eznfs.py): `eznfs.py`

### Share Workflows

- [Add share](https://github.com/markmental/eznfs/blob/main/eznfs.py): `eznfs.py`
- [List shares](https://github.com/markmental/eznfs/blob/main/eznfs.py): `eznfs.py`
- [Edit share](https://github.com/markmental/eznfs/blob/main/eznfs.py): `eznfs.py`
- [Remove share](https://github.com/markmental/eznfs/blob/main/eznfs.py): `eznfs.py`
- [Input validation](https://github.com/markmental/eznfs/blob/main/eznfs.py): `eznfs.py`
- [UID/GID reminder](https://github.com/markmental/eznfs/blob/main/eznfs.py): `eznfs.py`

### System Integration

- [Hostname check](https://github.com/markmental/eznfs/blob/main/eznfs.py): `eznfs.py`
- **fstab entries**
- [Mount point](https://github.com/markmental/eznfs/blob/main/eznfs.py): `eznfs.py`
- [Mount operations](https://github.com/markmental/eznfs/blob/main/eznfs.py): `eznfs.py`
- **systemd and mount**

### Terminal Interface

- [Rich presentation](https://github.com/markmental/eznfs/blob/main/eznfs_ui.py): `eznfs_ui.py`

### Other components

- **Administrator**
- **NFS server**
- **Terminal**

## Connections

- Administrator → Application entry: invokes (evidence: `README.md`)
- Application entry → CLI commands: dispatches (evidence: `eznfs.py`)
- Application entry → Interactive wizard: dispatches (evidence: `eznfs.py`)
- CLI commands → Add share: runs (evidence: `README.md`)
- CLI commands → List shares: runs (evidence: `README.md`)
- CLI commands → Edit share: runs (evidence: `README.md`)
- CLI commands → Remove share: runs (evidence: `README.md`)
- Interactive wizard → Add share: offers apply (evidence: `README.md`)
- Add share → Input validation: validates (evidence: `README.md`)
- Add share → Hostname check: checks hostname (evidence: `README.md`)
- Add share → Mount point: creates (evidence: `README.md`)
- Add share → fstab entries: writes entry (evidence: `README.md`)
- Add share → Mount operations: applies mount (evidence: `README.md`)
- Add share → UID/GID reminder: reminds about (evidence: `README.md`)
- Interactive wizard → Input validation: checks inputs (evidence: `README.md`)
- Interactive wizard → Hostname check: checks hostname (evidence: `README.md`)
- Interactive wizard → fstab entries: offers save (evidence: `README.md`)
- Interactive wizard → Mount operations: offers mount (evidence: `README.md`)
- List shares → fstab entries: reads entries (evidence: `README.md`)
- Edit share → fstab entries: updates entry (evidence: `README.md`)
- Remove share → fstab entries: removes entry (evidence: `README.md`)
- Mount operations → systemd and mount: reloads or mounts (evidence: `README.md`)
- Mount operations → NFS server: mounts share (evidence: `README.md`)
- Hostname check → NFS server: resolves host (evidence: `README.md`)
- Application entry → Rich presentation: uses presentation (evidence: `eznfs.py`)
- Rich presentation → Terminal: renders prompts (evidence: `eznfs_ui.py`)
