fraudshield/frontend/src/pages/AlertsPage.tsx
Felipe Domingues 989202648d feat: implement FraudShield MVP — backend API + frontend alerts
Backend (Python 3.12/FastAPI):
- 5 models: Transaction, DetectionRule, FraudAlert, AuditLog, RuleSnapshot
- Rule engine: 4 rule types (amount, location, time, pattern)
- 11 API routes: health, auth, transactions, alerts
- Sync ingestion pipeline with explanation generation
- JWT auth with 3 roles (analyst, admin, senior)
- Seed script with 5 default rules + 50 synthetic transactions

Frontend (React 19/TypeScript/Tailwind):
- Auth: login page, JWT token management, role-based routing
- Alerts: queue with filters, detail panel, decision workflow
- Layout: responsive sidebar, top bar, protected routes
- Full TypeScript, zero ts-ignore, Tailwind CSS

Build: Backend imports clean, Frontend tsc --noEmit passes,
vite build produces 296KB production bundle.
2026-05-12 16:54:03 -03:00

18 lines
588 B
TypeScript

import { useState } from 'react';
import AlertQueue from '../components/alerts/AlertQueue';
import AlertDetailPanel from '../components/alerts/AlertDetail';
export default function AlertsPage() {
const [selectedId, setSelectedId] = useState<string | null>(null);
return (
<div className="flex h-full">
<div className="w-2/5 border-r bg-white overflow-hidden">
<AlertQueue selectedId={selectedId} onSelect={setSelectedId} />
</div>
<div className="w-3/5 overflow-hidden">
<AlertDetailPanel alertId={selectedId} />
</div>
</div>
);
}