Swiss-HD: Deployment & Configuration
Implementation procedures for the Swiss-HD dashboard within a Node.js-based environment.
1. Overview
Swiss-HD is deployed as a modern Vite-based React application. It requires a reverse proxy or service mesh for optimal performance and secure integration with internal APIs (e.g., Proxmox VE, K3s, Grafana, n8n).
2. Requirements & Prerequisites
Necessary components or states prior to implementation:
- Node.js: Version 18.0.0 or higher.
- Package Manager: npm or yarn.
- API Access: Valid tokens for integrated services (see Environment Variables below).
- Network Connectivity: Unhindered access to internal service endpoints.
3. Implementation Procedure
A. Environment Configuration
-
Initialize the repository and install essential dependencies:
-
Create an environment configuration file named
.env.localin the project root. -
Define the required integration parameters (see Environment Variables section below).
B. Service Deployment
-
Execute the development server for initial validation:
-
Generate the optimized production bundle:
-
Deploy the resulting assets in the
dist/directory to a static web server or containerized Nginx instance.
4. Environment Variables
Proxmox Integration
VITE_METRIC_1_TYPE=proxmox
VITE_METRIC_1_API_URL=/api/proxmox/api2/json/nodes/[NODE_NAME]/status
VITE_METRIC_1_AUTH="PVEAPIToken=[USER]@[REALM]![TOKEN_ID]=[SECRET]"
K3s Integration
Create the ServiceAccount and token:
kubectl apply -f - <<EOF
apiVersion: v1
kind: ServiceAccount
metadata:
name: dashboard
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: dashboard-metrics
rules:
- apiGroups: ["metrics.k8s.io"]
resources: ["nodes"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["nodes", "pods"]
verbs: ["get", "list"]
- apiGroups: ["apps"]
resources: ["deployments", "replicasets"]
verbs: ["get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: dashboard-metrics
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: dashboard-metrics
subjects:
- kind: ServiceAccount
name: dashboard
namespace: default
EOF
kubectl create token dashboard --duration=8760h
Google Calendar Integration
Arr Stack (Sonarr, Radarr, Lidarr)
VITE_SONARR_API_KEY=your_sonarr_key
VITE_RADARR_API_KEY=your_radarr_key
VITE_LIDARR_API_KEY=your_lidarr_key
qBittorrent
Jellyfin
ArgoCD
Grafana
Setup: Administration → Service Accounts → Create Service Account → Add Viewer role → Create token
n8n
Setup: Settings → n8n API → Create API Key
5. Configuration Standards
- Proxy Layer: Vite's internal proxy is utilized during development to bypass CORS limitations when communicating with internal APIs. In production (K3s), Nginx handles the proxy — see K3s Deployment.
- Security: API credentials must remain restricted to
.env.localfor local development. For production, credentials are stored as GitHub Secrets and baked into the Docker image at build time. - Persistence: Component state is managed via React hooks; no external database is required for core functionality.
6. Production Deployment (K3s + ArgoCD)
For production deployment on K3s via ArgoCD with GitHub Actions CI/CD, see the dedicated guide:
This covers: - Dockerfile and multi-arch build (amd64 + arm64) - Nginx proxy configuration replacing the Vite dev proxy - GitHub Actions workflow (build → push to ghcr.io → update k3s-repo) - ArgoCD GitOps setup - Adding new services with secrets - Troubleshooting common deployment errors
6. Verification
System health is validated through these procedures:
- Confirm successful compilation without TypeScript errors.
- Verify visual rendering of the grid-based interface at
localhost:3000. - Validate telemetry data by checking the "Metrics" panel for active updates.
- Inspect the browser console to ensure no 401 (Unauthorized) or 403 (Forbidden) errors originate from API endpoints.
- Verify service cards display expected metrics (e.g.,
dashboards: 15 | alerts: 3for Grafana).
7. Troubleshooting
| Issue | Solution |
|---|---|
| 401 Unauthorized | Verify API tokens are correct and not expired |
| Metrics not displaying | Check appType is set correctly in config.yaml |
| CORS errors | Ensure Vite proxy is configured correctly |
| Pod count shows 0/0 | Verify K3s token has proper RBAC permissions |