the owner's work, committed as one unit rather than split: the registration
files (App.tsx, Dock, AppRegistry, hono.ts, the schema and db barrels,
ecosystem.config.cjs) all reference modules under src/servers/{api,sidecar}/wallet
and src/workspaces/officerdev/src/apps/Wallet, so committing the shared plumbing
on its own would leave a commit that does not build.
officer-wallet is a new pm2 peer holding seed material sealed under an owner
passphrase on top of VAULT_STORE_KEY, with an unlock ttl after which the root key
is wiped from memory. five backends: on-chain via esplora, and lnd, clnrest,
lndhub and nwc for lightning. bolt11 encode/decode is implemented in-tree.
no secrets in the diff — the key-shaped literals under sidecar/wallet are the
bolt11 spec vectors and the bip39 "abandon … about" vector. .env.example gains
placeholders only. bun test src/servers/sidecar/wallet: 38 pass, 0 fail.
not reviewed line by line; assembled and verified to build, not audited.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
78 lines
4.3 KiB
TypeScript
78 lines
4.3 KiB
TypeScript
import { BrowserRouter, Routes, Route, Navigate } from 'react-router';
|
|
import * as Authentication from './Screens/Authentication';
|
|
import * as Dashboard from './Screens/Dashboard';
|
|
import { useAuth } from 'hooks/useAuth';
|
|
import { useServerSettings } from 'state/useServerSettings';
|
|
import { useServerEnvironment } from 'state/useServerEnvironment';
|
|
import { useInitialData } from '@/state/useInitialData';
|
|
|
|
export function App() {
|
|
const { isLoading, isAuthenticated } = useAuth();
|
|
const { plugins, isLoading: isServerSettingsLoading } = useServerSettings();
|
|
useServerEnvironment();
|
|
useInitialData();
|
|
|
|
if (isLoading || isServerSettingsLoading) return null;
|
|
|
|
return (
|
|
<BrowserRouter>
|
|
{!isAuthenticated && (
|
|
<Authentication.AuthenticationLayout>
|
|
<Routes>
|
|
<Route path="/" element={<Authentication.LandingPage />} />
|
|
<Route path="/auth/forgot-password" element={<Authentication.ForgotPassword />} />
|
|
<Route path="/auth/reset-password" element={<Authentication.ResetPassword />} />
|
|
<Route path="*" element={<Navigate to="/" replace />} />
|
|
</Routes>
|
|
</Authentication.AuthenticationLayout>
|
|
)}
|
|
{isAuthenticated && (
|
|
<Dashboard.DashboardLayout>
|
|
<Routes>
|
|
<Route path="/" element={<Dashboard.HomeScreen />} />
|
|
<Route path="/settings/profile" element={<Dashboard.ProfileSettings />} />
|
|
<Route path="/settings/ai" element={<Dashboard.AISettings />} />
|
|
<Route path="/settings/system" element={<Dashboard.SystemSettings />} />
|
|
<Route path="/settings/integrations" element={<Dashboard.IntegrationsSettings />} />
|
|
<Route path="/settings/apps" element={<Dashboard.AppsSettings />} />
|
|
<Route path="/chat" element={<Dashboard.SessionListPage />} />
|
|
<Route path="/chat/new" element={<Dashboard.SessionListPage isNew />} />
|
|
<Route path="/chat/:sessionId" element={<Dashboard.SessionListPage />} />
|
|
<Route path="/plans" element={<Dashboard.Plans />} />
|
|
<Route path="/files" element={<Dashboard.FilesScreen />} />
|
|
<Route path="/music" element={<Dashboard.MusicScreen />} />
|
|
<Route path="/soulseek" element={<Dashboard.SoulseekScreen />} />
|
|
<Route path="/headscale" element={<Dashboard.HeadscaleScreen />} />
|
|
<Route path="/headscale/:section" element={<Dashboard.HeadscaleScreen />} />
|
|
<Route path="/transmission" element={<Dashboard.TransmissionScreen />} />
|
|
<Route path="/transmission/:section" element={<Dashboard.TransmissionScreen />} />
|
|
<Route path="/invoices" element={<Dashboard.InvoicesScreen />} />
|
|
<Route path="/invoices/:section" element={<Dashboard.InvoicesScreen />} />
|
|
<Route path="/wallet" element={<Dashboard.WalletScreen />} />
|
|
<Route path="/wallet/:section" element={<Dashboard.WalletScreen />} />
|
|
<Route path="/system-monitor" element={<Dashboard.SystemMonitorScreen />} />
|
|
<Route path="/activity" element={<Dashboard.ActivityScreen />} />
|
|
|
|
<Route path="/code-editor" element={<Dashboard.CodeEditor />} />
|
|
<Route path="/skills" element={<Dashboard.Skills />} />
|
|
<Route path="/tasks" element={<Dashboard.Tasks />} />
|
|
<Route path="/processes" element={<Dashboard.Processes />} />
|
|
<Route path="/task-logs" element={<Dashboard.TaskLogs />} />
|
|
<Route path="/jobs" element={<Dashboard.JobsPage />} />
|
|
<Route path="/jobs/:id" element={<Dashboard.JobsPage />} />
|
|
<Route path="/dashboards" element={<Dashboard.DashboardsScreen />} />
|
|
<Route path="/dashboards/:id" element={<Dashboard.DashboardScreen />} />
|
|
<Route path="/email" element={<Dashboard.EmailScreen />} />
|
|
<Route path="/email/:emailId" element={<Dashboard.EmailScreen />} />
|
|
<Route path="/browser" element={<Dashboard.BrowserScreen />} />
|
|
<Route path="/terminal" element={<Dashboard.TerminalScreen />} />
|
|
<Route path="/desktop" element={<Dashboard.DesktopScreen />} />
|
|
<Route path="/auth/signout" element={<Authentication.SignoutScreen />} />
|
|
<Route path="*" element={<Navigate to="/" replace />} />
|
|
</Routes>
|
|
</Dashboard.DashboardLayout>
|
|
)}
|
|
</BrowserRouter>
|
|
);
|
|
}
|