Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat: add Settings page with backup configuration
Adam Eivyd13c1d284b87
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex c798b46775..976366e1a8 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -2,6 +2,7 @@## Added+- Settings page (`/settings`) with backup configuration (destination path, enabled toggle, cron schedule)- GitHub repos management page under Dev Tools > GitHub- Sync repos from GitHub via `gh repo list`- Toggle repos as NPM projects (auto-manages NPM_TOKEN secret)diff --git a/client/src/App.jsx b/client/src/App.jsxindex 57a68e99d2..70878ed3a5 100644--- a/client/src/App.jsx+++ b/client/src/App.jsx@@ -13,6 +13,7 @@ import Security from './pages/Security';import DigitalTwin from './pages/DigitalTwin';import Agents from './pages/Agents';import Uploads from './pages/Uploads';+import Settings from './pages/Settings';import Shell from './pages/Shell';import BrowserPage from './pages/Browser';import Jira from './pages/Jira';@@ -74,6 +75,7 @@ export default function App() {<Route path="apps/:appId/:tab" element={<AppDetail />} /><Route path="templates" element={<Templates />} /><Route path="security" element={<Security />} />+ <Route path="settings" element={<Settings />} /><Route path="uploads" element={<Uploads />} /><Route path="shell" element={<Shell />} /><Route path="browser" element={<BrowserPage />} />diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsxindex 11e6614561..2a1510faf5 100644--- a/client/src/components/Layout.jsx+++ b/client/src/components/Layout.jsx@@ -152,6 +152,7 @@ const navItems = []},{ to: '/security', label: 'Security', icon: Camera, single: true },+ { to: '/settings', label: 'Settings', icon: Settings, single: true },{ to: '/shell', label: 'Shell', icon: SquareTerminal, single: true },{ to: '/agents', label: 'Social Agents', icon: Users, single: true },{ to: '/uploads', label: 'Uploads', icon: Upload, single: true }diff --git a/client/src/pages/Settings.jsx b/client/src/pages/Settings.jsxnew file mode 100644index 0000000000..d6b039aafa--- /dev/null+++ b/client/src/pages/Settings.jsx@@ -0,0 +1,90 @@+import { useState, useEffect } from 'react';+import { Save } from 'lucide-react';+import toast from 'react-hot-toast';+import BrailleSpinner from '../components/BrailleSpinner';+import { getSettings, updateSettings } from '../services/api';++export default function Settings() {+ const [loading, setLoading] = useState(true);+ const [saving, setSaving] = useState(false);+ const [destPath, setDestPath] = useState('');+ const [enabled, setEnabled] = useState(false);+ const [cronExpression, setCronExpression] = useState('0 2 * * *');++ useEffect(() => {+ getSettings().then(settings => {+ const backup = settings?.backup || {};+ setDestPath(backup.destPath || '');+ setEnabled(backup.enabled ?? false);+ setCronExpression(backup.cronExpression || '0 2 * * *');+ }).catch(() => {}).finally(() => setLoading(false));+ }, []);++ const handleSave = async () => {+ setSaving(true);+ await updateSettings({ backup: { destPath, enabled, cronExpression } })+ .then(() => toast.success('Settings saved'))+ .catch(() => {})+ .finally(() => setSaving(false));+ };++ if (loading) {+ return (+ <div className="flex items-center justify-center h-64">+ <BrailleSpinner text="Loading settings" />+ </div>+ );+ }++ return (+ <div className="space-y-6">+ <h1 className="text-2xl font-bold text-white">Settings</h1>++ <div className="bg-port-card border border-port-border rounded-xl p-6 space-y-5">+ <h2 className="text-lg font-semibold text-white">Backup</h2>++ <div className="space-y-1">+ <label className="block text-sm text-gray-400">Destination Path</label>+ <input+ type="text"+ value={destPath}+ onChange={e => setDestPath(e.target.value)}+ className="w-full bg-port-bg border border-port-border rounded-lg px-3 py-2 text-sm text-white focus:outline-none focus:border-port-accent"+ placeholder="/path/to/backups"+ />+ </div>++ <div className="flex items-center gap-3">+ <label className="text-sm text-gray-400">Enabled</label>+ <button+ onClick={() => setEnabled(!enabled)}+ className={`relative w-10 h-5 rounded-full transition-colors ${enabled ? 'bg-port-accent' : 'bg-port-border'}`}+ >+ <span className={`absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white transition-transform ${enabled ? 'translate-x-5' : ''}`} />+ </button>+ </div>++ <div className="space-y-1">+ <label className="block text-sm text-gray-400">Schedule (cron)</label>+ <input+ type="text"+ value={cronExpression}+ onChange={e => setCronExpression(e.target.value)}+ className="w-full bg-port-bg border border-port-border rounded-lg px-3 py-2 text-sm text-white focus:outline-none focus:border-port-accent"+ placeholder="0 2 * * *"+ />+ <p className="text-xs text-gray-500">Default: 2:00 AM daily</p>+ </div>++ <button+ onClick={handleSave}+ disabled={saving}+ className="flex items-center gap-2 px-4 py-2 bg-port-accent hover:bg-port-accent/80 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50"+ >+ {saving ? <BrailleSpinner /> : <Save size={16} />}+ Save+ </button>+ </div>+ </div>+ );+}diff --git a/client/src/services/api.js b/client/src/services/api.jsindex e51a20a928..eccf101778 100644--- a/client/src/services/api.js+++ b/client/src/services/api.js@@ -1432,6 +1432,13 @@ export const triggerBackup = () => request('/backup/run', { method: 'POST' });export const getBackupSnapshots = (options) => request('/backup/snapshots', options);export const restoreBackup = (data) => request('/backup/restore', { method: 'POST', body: JSON.stringify(data) });+// Settings+export const getSettings = () => request('/settings');+export const updateSettings = (data) => request('/settings', {+ method: 'PUT',+ body: JSON.stringify(data)+});+// Insightsexport const getGenomeHealthCorrelations = () => request('/insights/genome-health');export const getInsightThemes = () => request('/insights/themes');