refactor: update submodules to internal module paths
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# NexusGuard SD-WAN — Phase 4.5: Multi-Node Architecture & Production Readiness
|
||||
|
||||
**Goal**: Transform the system from a single-node mockup into a true Multi-Server (WGDashboard-style) architecture, and harden the database startup mechanisms for production environments.
|
||||
|
||||
## Task 4.5.1: Multi-Server Database & API
|
||||
- **Files**: `models.go`, `001_init.sql`, `api/servers.go`, `main.go`
|
||||
- **Actions**:
|
||||
- Add `WgServerID` foreign key to the `Device` model.
|
||||
- Implement full CRUD REST API for `WgServer` (`/api/v1/servers`) to allow Admin to register multiple public WireGuard nodes.
|
||||
|
||||
## Task 4.5.2: Provisioning API Multi-Node Fix
|
||||
- **Files**: `api/provisioning.go`, `api/provisioning_test.go`
|
||||
- **Actions**:
|
||||
- Remove the hardcoded `127.0.0.1:51820` fallback.
|
||||
- During provisioning, fetch the exact `WgServer` related to the device.
|
||||
- Return the true `Endpoint` and `PublicKey` of that specific node to the connecting agent.
|
||||
|
||||
## Task 4.5.3: Dashboard UI - Nodes Management
|
||||
- **Files**: `src/views/Servers.vue`, `src/views/Devices.vue`, `src/api/servers.ts`, `src/App.vue`
|
||||
- **Actions**:
|
||||
- Build the "Nodes" page to manage external WireGuard servers.
|
||||
- Update the "Add Device" form to include a required dropdown where the Admin selects which Node the device will connect to.
|
||||
- Update the Sidebar to reflect the new navigation.
|
||||
|
||||
## Task 4.5.4: Production Readiness (Install Detection)
|
||||
- **Files**: `main.go`
|
||||
- **Actions**:
|
||||
- Add logic to verify if the DB is empty on startup.
|
||||
- Add `-migrate-prod` flag that uses the `goose` library to apply `001_init.sql` automatically in production without needing AutoMigrate.
|
||||
@@ -0,0 +1,55 @@
|
||||
# NexusGuard SD-WAN — Phase 6: Desktop Client GUI
|
||||
|
||||
## Overview
|
||||
This plan extends the NexusGuard architecture to include a User-Friendly Desktop VPN Application for Windows and Linux users. It transitions the `sys-bridge` agent from a "stealth daemon" into a managed sidecar process controlled by a visual GUI.
|
||||
|
||||
## Architecture Decisions
|
||||
- **Framework**: Tauri (Rust) for minimal RAM overhead and native OS integration.
|
||||
- **Frontend**: Vue 3 + TailwindCSS (Glassmorphism theme) to match the Dashboard UI.
|
||||
- **Engine**: The Go binary (`sys-bridge`) built in Phase 2 will be bundled as a **Tauri Sidecar**. Tauri will spawn and control the Go binary.
|
||||
- **Privilege Elevation**: The Tauri app must prompt for Admin/Root access on startup because WireGuard/Wintun requires elevated privileges to create network adapters.
|
||||
|
||||
## Task 6.1: Tauri + Vue 3 Scaffold
|
||||
- **Goal**: Initialize the project structure in `apps/desktop-client`.
|
||||
- **Actions**:
|
||||
- Run `create-tauri-app` using Vue 3 and TypeScript.
|
||||
- Install Tailwind CSS v4 and matching UI dependencies (HeroIcons, Pinia).
|
||||
- Configure `tauri.conf.json` to allow elevated execution (`requireAdministrator` manifest on Windows).
|
||||
|
||||
## Task 6.2: Sidecar Integration (Go Binary)
|
||||
- **Goal**: Bundle the `sys-bridge` agent.
|
||||
- **Actions**:
|
||||
- Modify the Phase 2 `sys-bridge` binary to support a `--json` output flag for machine-readable logs.
|
||||
- Configure Tauri `externalBin` to package `sys-bridge-x86_64-pc-windows-msvc.exe` and `sys-bridge-x86_64-unknown-linux-gnu`.
|
||||
- Write Rust command `start_tunnel(token: String)` that spawns the sidecar process and pipes stdout to the Vue frontend.
|
||||
|
||||
## Task 6.3: UI - Registration State
|
||||
- **Goal**: Build the first-time setup screen.
|
||||
- **Actions**:
|
||||
- UI detects if `REG_TOKEN` is saved locally.
|
||||
- If missing, display a futuristic input form: "Link Device to NexusGuard".
|
||||
- User pastes the Token from the Dashboard.
|
||||
- Validate token format and securely store it using Tauri API (`tauri-plugin-store`).
|
||||
|
||||
## Task 6.4: UI - Connected State & Telemetry
|
||||
- **Goal**: Build the active VPN dashboard.
|
||||
- **Actions**:
|
||||
- Large glowing "CONNECT / DISCONNECT" toggle button.
|
||||
- Read output from the Go sidecar to determine Tunnel State (Connecting, Handshake Successful, Error).
|
||||
- Display current `InternalIP` and connection uptime.
|
||||
- Traffic graph (Tx/Rx bytes) updated in real-time.
|
||||
|
||||
## Task 6.5: OS Integration & Wintun Setup (Windows)
|
||||
- **Goal**: Ensure seamless Windows networking.
|
||||
- **Actions**:
|
||||
- Automatically download or bundle `wintun.dll`.
|
||||
- Register the application in the System Tray (Tauri system tray API).
|
||||
- Allow running in the background when the window is closed.
|
||||
|
||||
---
|
||||
**Exit Criteria**:
|
||||
- [ ] Tauri app compiles for Windows (`.msi` / `.exe`)
|
||||
- [ ] App prompts for Admin rights on launch
|
||||
- [ ] User can input Registration Token in GUI
|
||||
- [ ] Clicking "Connect" successfully spawns the Go sidecar and establishes the WireGuard tunnel
|
||||
- [ ] System Tray icon shows connection status
|
||||
+1
-1
Submodule apps/device-agent updated: 60ca014538...05b65fdc8a
+1
-1
Submodule apps/server-core updated: b99af3a316...5bda512e05
Reference in New Issue
Block a user