From e7e63bc49193b829a7d4ffa2fa5e4503ca270a3e Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Sun, 13 Sep 2026 06:53:33 +0100 Subject: [PATCH] Updates --- AGENTS.md | 8 + db/schema.ts | 63 ++++- db/types/db.ts | 64 ++++- db/wgui | Bin 61440 -> 65536 bytes src/components/general/admin-button.tsx | 40 +++ src/components/general/admin-card.tsx | 25 ++ src/components/general/status-dot.tsx | 52 ++++ src/data/app-data.ts | 2 + src/dict/variables-dict.ts | 7 + .../setup/grab-host-network-interface.ts | 9 + .../setup/grab-host-public-ip-address.ts | 9 + .../backend/setup/setup-wireguard-host.ts | 147 ++++++++++++ src/layouts/admin/(partials)/MobileNav.tsx | 11 +- .../(partials)/admin-aside-links-dict.tsx | 45 +++- src/layouts/admin/(partials)/admin-aside.tsx | 12 +- .../admin/(partials)/header-page-title.tsx | 29 +++ src/layouts/admin/(sections)/Header.tsx | 2 + src/pages/admin/(data)/dashboard-mock-data.ts | 227 ++++++++++++++++++ src/pages/admin/(partials)/activity-row.tsx | 57 +++++ src/pages/admin/(partials)/aside-panel.tsx | 38 +++ .../admin/(partials)/distribution-row.tsx | 56 +++++ src/pages/admin/(partials)/peer-row.tsx | 39 +++ src/pages/admin/(partials)/sparkline.tsx | 62 +++++ src/pages/admin/(partials)/stat-card.tsx | 78 ++++++ src/pages/admin/(partials)/traffic-chart.tsx | 130 ++++++++++ .../admin/(sections)/activity-section.tsx | 20 ++ .../admin/(sections)/kpi-hero-section.tsx | 23 ++ .../(sections)/kpi-secondary-section.tsx | 18 ++ .../admin/(sections)/peers-table-section.tsx | 52 ++++ .../(sections)/traffic-chart-section.tsx | 78 ++++++ .../admin/clients/(data)/clients-mock-data.ts | 122 ++++++++++ .../clients/(partials)/client-form-modal.tsx | 108 +++++++++ .../admin/clients/(partials)/client-row.tsx | 47 ++++ .../(sections)/clients-table-section.tsx | 88 +++++++ src/pages/admin/clients/index.tsx | 41 ++++ src/pages/admin/host/(data)/host-mock-data.ts | 33 +++ .../admin/host/(partials)/host-stat-cell.tsx | 17 ++ .../host/(partials)/interface-config-row.tsx | 17 ++ .../host/(sections)/host-status-section.tsx | 46 ++++ .../(sections)/interface-config-section.tsx | 60 +++++ src/pages/admin/host/index.tsx | 33 +++ src/pages/admin/index.tsx | 18 +- src/scripts/setup-wireguard.sh | 73 +++++- src/styles/main.css | 15 +- src/utils/grab-dir-names.ts | 18 ++ 45 files changed, 2117 insertions(+), 22 deletions(-) create mode 100644 src/components/general/admin-button.tsx create mode 100644 src/components/general/admin-card.tsx create mode 100644 src/components/general/status-dot.tsx create mode 100644 src/dict/variables-dict.ts create mode 100644 src/functions/backend/setup/grab-host-network-interface.ts create mode 100644 src/functions/backend/setup/grab-host-public-ip-address.ts create mode 100644 src/functions/backend/setup/setup-wireguard-host.ts create mode 100644 src/layouts/admin/(partials)/header-page-title.tsx create mode 100644 src/pages/admin/(data)/dashboard-mock-data.ts create mode 100644 src/pages/admin/(partials)/activity-row.tsx create mode 100644 src/pages/admin/(partials)/aside-panel.tsx create mode 100644 src/pages/admin/(partials)/distribution-row.tsx create mode 100644 src/pages/admin/(partials)/peer-row.tsx create mode 100644 src/pages/admin/(partials)/sparkline.tsx create mode 100644 src/pages/admin/(partials)/stat-card.tsx create mode 100644 src/pages/admin/(partials)/traffic-chart.tsx create mode 100644 src/pages/admin/(sections)/activity-section.tsx create mode 100644 src/pages/admin/(sections)/kpi-hero-section.tsx create mode 100644 src/pages/admin/(sections)/kpi-secondary-section.tsx create mode 100644 src/pages/admin/(sections)/peers-table-section.tsx create mode 100644 src/pages/admin/(sections)/traffic-chart-section.tsx create mode 100644 src/pages/admin/clients/(data)/clients-mock-data.ts create mode 100644 src/pages/admin/clients/(partials)/client-form-modal.tsx create mode 100644 src/pages/admin/clients/(partials)/client-row.tsx create mode 100644 src/pages/admin/clients/(sections)/clients-table-section.tsx create mode 100644 src/pages/admin/clients/index.tsx create mode 100644 src/pages/admin/host/(data)/host-mock-data.ts create mode 100644 src/pages/admin/host/(partials)/host-stat-cell.tsx create mode 100644 src/pages/admin/host/(partials)/interface-config-row.tsx create mode 100644 src/pages/admin/host/(sections)/host-status-section.tsx create mode 100644 src/pages/admin/host/(sections)/interface-config-section.tsx create mode 100644 src/pages/admin/host/index.tsx diff --git a/AGENTS.md b/AGENTS.md index 8fc0ec3..cd39f59 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -122,3 +122,11 @@ Server functions use `index.server.ts` alongside `index.tsx` (e.g. `single-docum - `external/` binary directories (`**/models`, `**/bin`, `**/x-86`, `**/arm-64`) are gitignored. - The `bunext.config.ts` excludes `onnxruntime-node` and `@xenova/transformers` from SSR/page compilation (native modules that must stay server-side). - `tsconfig.json` excludes `src/components/twui/mdx`, `src/components/twui/elements/RemoteCodeBlock.tsx`, and `src/components/twui/mdx/markdown/MarkdownEditorPreviewComponent.tsx` from type-checking. + +## Conventions + +- Prefer one function/component per file over monolithic files with multiple exports. +- **Modularization is non-negotiable: prioritize modularization over monolithic functions/components.** Repeated UI blocks must be extracted into their own reusable components driven by props (e.g. an info row component taking `{ icon, text }`), never repeated inline markup. +- **UNCHANGEABLE RULE — twui components always win over raw JSX elements.** ALWAYS use twui components (`H1`–`H5`, `P`, `Span`, `List`, `Img`, `Row`, `Stack`, `Container`, `Section`, `Border`, `Card`, `Button`, `Tag`, `Link`, etc.) before basic JSX elements (`

`–`

`, `

`, ``, `