From c576907024e399c152db4ae516637a080ff6ab90 Mon Sep 17 00:00:00 2001 From: AndReicscs Date: Thu, 18 Jun 2026 19:03:57 +0000 Subject: [PATCH] cleaning up legacy docs --- CONTRIBUTING.md | 2 +- Docs/architecture/hub/frontend/components.md | 45 +- Docs/architecture/hub/frontend/overview.md | 38 ++ Docs/architecture/hub/frontend/store-app.md | 33 ++ .../architecture/hub/frontend/store-events.md | 22 + Docs/architecture/hub/frontend/store-fleet.md | 16 + Docs/architecture/hub/frontend/stores.md | 6 + Docs/architecture/hub/frontend/test.txt | 0 Hub/internal/BACKEND_ARCHITECTURE.md | 145 ------ Hub/internal/compose/COMPOSE_ARCHITECTURE.md | 28 -- .../severity/SEVERITY_ARCHITECTURE.md | 385 -------------- .../projections/uptime/UPTIME_ARCHITECTURE.md | 342 ------------- .../velocity/VELOCITY_ARCHITECTURE.md | 244 --------- Hub/ui/FRONTEND_ARCHITECTURE.md | 473 ------------------ Hub/ui/FRONTEND_DEV.md | 166 ------ .../stores/Events/EVENTSTS_ARCHITECTURE.md | 95 ---- .../src/stores/Fleet/FLEETTS_ARCHITECTURE.md | 95 ---- .../src/stores/System/APPTS_ARCHITECTURE.md | 153 ------ SECURITY.md | 4 +- Sensors/community/README.md | 2 +- Sensors/official/FileCanary/README.md | 46 -- Sensors/official/IcmpCanary/README.md | 42 -- .../official/NetworkScanDetector/README.md | 49 -- Sensors/official/TcpTarpit/README.md | 54 -- Sensors/official/WebRouterDecoy/README.md | 46 -- wizard/README.md | 75 --- 26 files changed, 164 insertions(+), 2442 deletions(-) create mode 100644 Docs/architecture/hub/frontend/store-app.md create mode 100644 Docs/architecture/hub/frontend/store-events.md create mode 100644 Docs/architecture/hub/frontend/store-fleet.md create mode 100644 Docs/architecture/hub/frontend/test.txt delete mode 100644 Hub/internal/BACKEND_ARCHITECTURE.md delete mode 100644 Hub/internal/compose/COMPOSE_ARCHITECTURE.md delete mode 100644 Hub/internal/projections/severity/SEVERITY_ARCHITECTURE.md delete mode 100644 Hub/internal/projections/uptime/UPTIME_ARCHITECTURE.md delete mode 100644 Hub/internal/projections/velocity/VELOCITY_ARCHITECTURE.md delete mode 100644 Hub/ui/FRONTEND_ARCHITECTURE.md delete mode 100644 Hub/ui/FRONTEND_DEV.md delete mode 100644 Hub/ui/src/stores/Events/EVENTSTS_ARCHITECTURE.md delete mode 100644 Hub/ui/src/stores/Fleet/FLEETTS_ARCHITECTURE.md delete mode 100644 Hub/ui/src/stores/System/APPTS_ARCHITECTURE.md delete mode 100644 Sensors/official/FileCanary/README.md delete mode 100644 Sensors/official/IcmpCanary/README.md delete mode 100644 Sensors/official/NetworkScanDetector/README.md delete mode 100644 Sensors/official/TcpTarpit/README.md delete mode 100644 Sensors/official/WebRouterDecoy/README.md delete mode 100644 wizard/README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f860a18..539c1a9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -[![License](https://img.shields.io/badge/license-GPLv3-blue.svg)](LICENSE) +[![License](https://img.shields.io/badge/license-AGPLv3-blue.svg)](LICENSE) # Contributing to HoneyWire diff --git a/Docs/architecture/hub/frontend/components.md b/Docs/architecture/hub/frontend/components.md index 9119de8..6e82f57 100644 --- a/Docs/architecture/hub/frontend/components.md +++ b/Docs/architecture/hub/frontend/components.md @@ -33,4 +33,47 @@ Views act as orchestrators for pages (e.g., `Dashboard.vue`, `NodeDetails.vue`). |---|---| | Own ephemeral UI state (e.g., "is the modal open?") | Perform backend mutations directly | | Delegate heavy logic to Pinia stores | Duplicate error rollback logic | -| Orchestrate layout and pass down props | Normalize API responses | \ No newline at end of file +| Orchestrate layout and pass down props | Normalize API responses | + +--- + +## Design System + +The Hub frontend uses a centralized token system based on the OKLCH color space (located in `src/assets/style.css`). + +### Principles + +- Semantic tokens only — no hardcoded colors in components. +- Accessibility-first contrast. +- Dark/light parity. +- Theme switching swaps root variables only. + +### Token Categories + +| Category | Examples | Usage | +|---|---|---| +| Structural | `--bg`, `--bg-surface`, `--border-default` | Layout hierarchy | +| Interactive | `--primary-main`, `--secondary-main`, `--danger-main` | Actions & states | +| Severity | `--sev-critical` through `--sev-info` | Charts, alerts, tables, status | +| Typography | `--text-h1`, `--text-base`, `--text-sm` | All text sizing | +| Spacing | `--space-card-p`, `--space-flow` | Layout rhythm | +| Elevation | `--radius-sm`, `--shadow-md` | Cards, modals, widgets | +| Z-index | `--z-dropdown` → `--z-toast` | Stacking hierarchy | + +**No arbitrary values.** Use tokens. + +### Tailwind Integration + +Tokens exposed via `@theme`: + +```css +bg-bg-surface → --bg-surface +text-text-h → --text-h +border-border-default → --border-default +``` + +### Dark Mode + +```css +.dark { /* overrides root variables */ } +``` \ No newline at end of file diff --git a/Docs/architecture/hub/frontend/overview.md b/Docs/architecture/hub/frontend/overview.md index 805f8c3..6bdb4d5 100644 --- a/Docs/architecture/hub/frontend/overview.md +++ b/Docs/architecture/hub/frontend/overview.md @@ -111,3 +111,41 @@ This decision was explicitly chosen to prioritize initial simplicity and speed o **Future Migration Path:** This is considered technical debt. If frontend performance bottlenecks arise due to memory overhead (e.g., traversing thousands of events in the browser), or if HoneyWire adopters request it for scale, the event pagination logic will be migrated to the backend to match the architecture of our dashboard projections. +# Bootstrap & Lifecycle + +## Cold Boot Sequence + +User loads the app (`onMounted` in App.vue): + +1. Check if setup is required (`checkRequiresSetup`). +2. Check if authenticated (`checkSystemState`). +3. Load application data in parallel (`fetchFleet`, `fetchEvents`, etc.). +4. Connect WebSocket and register handlers. +5. **Critical Invariant:** `isAuthenticated = true` is set **last**, after all data has been fetched. This prevents the authenticated shell from rendering before stores are populated. + +--- + +# Debugging Guide + +## Blank Dashboard After Login +- Check: `loadAppData()` actually completed and all `await Promise.all([...])` calls resolved. +- Fix: Ensure `isAuthenticated = true` is set AFTER data loads. + +## UI Not Updating +- Check: Array reassignment broke reactivity (`nodes.value = newArray`). Fix by using `splice()`, `push()`, `Object.assign()`. +- Check: Watched property is accessed with `.value` in `