import { useEffect, useState } from 'react'; import { Button } from '@/components/ui/Button'; import { Card } from '@/components/ui/Card'; import { FlowNode } from '@/components/ui/FlowNode'; import { SectionHeader } from '@/components/ui/SectionHeader'; import { Tag } from '@/components/ui/Tag'; import { apiGet } from '@/lib/api'; interface HealthResponse { status: string; version: string; } interface DbDiagResponse { reachable: boolean; alembic_revision?: string | null; table_count?: number; error?: string; } type HealthState = | { kind: 'loading' } | { kind: 'ok'; data: HealthResponse } | { kind: 'error'; error: string }; type DbState = | { kind: 'loading' } | { kind: 'ok'; data: DbDiagResponse } | { kind: 'error'; error: string }; export function HomePage() { const [health, setHealth] = useState({ kind: 'loading' }); const [db, setDb] = useState({ kind: 'loading' }); useEffect(() => { let cancelled = false; apiGet('/health', { anonymous: true }) .then((data) => !cancelled && setHealth({ kind: 'ok', data })) .catch((err: unknown) => !cancelled && setHealth({ kind: 'error', error: err instanceof Error ? err.message : String(err) }), ); apiGet('/diag/db', { anonymous: true }) .then((data) => !cancelled && setDb({ kind: 'ok', data })) .catch((err: unknown) => !cancelled && setDb({ kind: 'error', error: err instanceof Error ? err.message : String(err) }), ); return () => { cancelled = true; }; }, []); return ( <>

Meta morph{' '} Purple Team Platform

Collaborative red & blue test orchestration — M4 milestone (MITRE ATT&CK)

{health.kind === 'loading' &&

Waiting for the backend…

} {health.kind === 'ok' && (

Status:{' '} {health.data.status}

)} {health.kind === 'error' && (

Error:{' '} {health.error}

)}
{db.kind === 'ok' && db.data.reachable && (

Tables:{' '} {db.data.table_count} {' '} · Alembic head reached.

)} {(db.kind === 'loading' || (db.kind === 'ok' && !db.data.reachable)) && (

Querying schema metadata…

)} {db.kind === 'error' && (

Error:{' '} {db.error}

)}

M0 + M1 + M2 + M3 + M4 done. Next:{' '} M5 — Test & scenario templates .

EVASION C2 LATERAL CRED PHISH PERSIST
recon phish c2 lateral impact
); }