import { useEffect } from "react"; import { Link, useLocation } from "wouter"; import { useAuth } from "@/lib/auth"; import { Users, FileCode, Shield, Activity, LogOut, BarChart3, User, AlertTriangle, CheckCircle, XCircle, Eye } from "lucide-react"; export default function AdminAegis() { const { user, isAuthenticated, isLoading: authLoading, logout } = useAuth(); const [, setLocation] = useLocation(); useEffect(() => { if (!authLoading && !isAuthenticated) { setLocation("/login"); } }, [authLoading, isAuthenticated, setLocation]); if (authLoading || !isAuthenticated) { return (
Loading...
); } const handleLogout = async () => { await logout(); setLocation("/"); }; // Mock threat data for demo const mockThreats = [ { id: 1, type: "PII Exposure", severity: "high", status: "blocked", timestamp: "2 min ago" }, { id: 2, type: "Suspicious Pattern", severity: "medium", status: "flagged", timestamp: "15 min ago" }, { id: 3, type: "Rate Limit", severity: "low", status: "allowed", timestamp: "1 hour ago" }, ]; return (
{/* Sidebar */}

AeThex

Command Center

{user?.username}
{user?.isAdmin ? "Administrator" : "Member"}
{/* Main Content */}

Aegis Monitor

Real-time security monitoring and threat intervention

Shield Active
{/* Stats */}
Threats Blocked
247
Last 24 hours
PII Scrubbed
1,892
Instances protected
Active Sessions
34
Being monitored
Uptime
99.9%
Last 30 days
{/* Recent Activity */}

Recent Threat Activity

{mockThreats.map((threat) => (
{threat.type}
{threat.timestamp}
{threat.status}
))}

Aegis security layer is monitoring all active sessions

); } function NavItem({ icon, label, href, active = false }: { icon: React.ReactNode; label: string; href: string; active?: boolean; }) { return (
{icon} {label}
); }