1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
{
"project": "systemd-networkd simple Web UI",
"version": "0.2",
"goal": "Make a easy to use interface to configure router to teach network basics for high schoolers purposes",
"requirements": {
"functional": [
{
"id": "F-001",
"description": "The system shall provide a structured web-based control panel with application-style layout (navigation menu, panels, command buttons)."
},
{
"id": "F-002",
"description": "The system shall parse `networkctl status --json=short` output and present each interface as a structured panel showing: name, MAC, state, addresses, routes, DNS."
},
{
"id": "F-003",
"description": "The system shall allow browsing of existing network configuration files under `/etc/systemd/network/`."
},
{
"id": "F-004",
"description": "The system shall display each configuration file (`*.network`, `*.netdev`, `*.link`) as editable text with syntax highlighting and validation hooks."
},
{
"id": "F-005",
"description": "The system shall validate edited configuration against systemd-networkd rules before allowing save (e.g., reject unknown keys, missing sections)."
},
{
"id": "F-006",
"description": "The system shall provide versioned backups of configuration files, allowing rollback to earlier revisions."
},
{
"id": "F-007",
"description": "The system shall provide controls to apply changes safely by restarting only `systemd-networkd` (not full reboot)."
},
{
"id": "F-008",
"description": "The system shall provide a full device reboot option for recovery."
}
],
"technical": [
{
"id": "T-001",
"description": "The backend shall be implemented in Go, exposing HTTP endpoints for structured data (JSON) and file operations."
},
{
"id": "T-002",
"description": "The backend shall include a parser for systemd-networkd configuration files, mapping sections ([Match], [Link], [Network], etc.) into JSON objects."
},
{
"id": "T-003",
"description": "The frontend shall render interface panels dynamically from backend JSON and allow in-place editing of configuration fields."
},
{
"id": "T-004",
"description": "Configuration edits shall be validated by a backend hook that checks syntax with `systemd-analyze verify` before saving."
},
{
"id": "T-005",
"description": "All changes shall be written atomically to `/etc/systemd/network/`, with `.bak` backup created automatically."
},
{
"id": "T-006",
"description": "The backend shall implement privilege separation: file I/O restricted to `/etc/systemd/network/`, command execution restricted to `systemd-networkd` operations."
},
{
"id": "T-007",
"description": "The frontend shall provide syntax highlighting (via regex) for editing `.network` files."
},
{
"id": "T-008",
"description": "The system shall expose REST API endpoints for: (a) listing configs, (b) retrieving config, (c) validating config, (d) saving config, (e) restarting networkd, (f) rebooting device."
}
]
}
}
|