diff --git a/docs/superpowers/plans/2026-06-21-wireguard-dashboard-p3-peers.md b/docs/superpowers/plans/2026-06-21-wireguard-dashboard-p3-peers.md new file mode 100644 index 0000000..b66aa06 --- /dev/null +++ b/docs/superpowers/plans/2026-06-21-wireguard-dashboard-p3-peers.md @@ -0,0 +1,860 @@ +# WireGuard dashboard — Phase 3 (peer management) Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development. Steps use `- [ ]` checkboxes. + +**Goal:** Create + remove WireGuard client peers from the `/wireguard` dashboard, with the new client config (private key) + QR shown ONCE in a modal and never persisted. + +**Architecture:** The security-critical **write-bridge** (spec §0 Bridge 2, variant A): the app writes `run/wg-request.json` `{id,action,args}`; a new host `.path` watcher runs `clusev-wg.sh serve-request`, which **whitelists the action + re-sanitises every arg host-side**, dispatches to a fixed `cmd_*`, and writes `run/wg-result-.json` (0600, owned by the app uid) + for add-peer a `run/wg-qr-.svg` sidecar. The container's strings are DATA, never code. The Livewire component polls its own pending id for the result (no public route → automatic id-binding) and shows the config+QR once. + +**Tech Stack:** bash (host bridge), systemd `.path`/`.service`, Laravel 13 + Livewire 3 + wire-elements/modal, Tailwind tokens, Pint, shellcheck. Spec: `docs/superpowers/specs/2026-06-20-wireguard-dashboard-sp2-design.md` §0/§4/§6. + +**Run tooling (R8):** tests `docker compose --project-directory /home/nexxo/clusev exec -T -u 1002:1002 app sh -lc '… php artisan test --filter='`; Pint `… vendor/bin/pint `; shellcheck `docker run --rm -v "$PWD:/mnt" -w /mnt koalaman/shellcheck:stable