Authentication, authorization, and frontend architecture in Omni.
Configured in src/auth.ts using NextAuth:
allowDangerousEmailAccountLinking enabled.id, role, creditsRemaining, and mfaEnabled.session.user.| Role | Description |
|---|---|
OPERATIVE | Default role for standard users |
ADMIN | Administrative access to Command Center |
omni_live_<hex>) on creation./api/user/rotate-key.users.creditsRemaining.src/app/page.tsx)view state.ResultsPage fetches /api/investigate (IP) with fallback to ipapi.co when unauthenticated.IPResults renders data, security assessment, and exports PDF.DNSRecords fetches /api/investigate (DOMAIN) or falls back to Google DNS.DNSResults displays A/AAAA/MX/TXT/NS records and PDF export.BreachSearch fetches /api/investigate (BREACH).BreachResults renders summary, breach list, recommendations, and PDF export.URLSearch calls /api/investigate (URL).URLResults shows live submission status + last scan details.HistoryPage fetches /api/history and allows drilling into detailed report view.AdminDashboard displays user table and audit logs.CreditInjectionModal enforces max quotas (ADMIN 10k / OPERATIVE 1k).AdminAuditLogs shows audit stream.middleware.ts enforces anti-scraping checks, simple rate limiting, and security headers./admin and /history is done by checking NextAuth session cookies in middleware (Edge-safe).| Module | Purpose |
|---|---|
src/utils/exportPdf.ts | Generates branded forensic PDFs with jsPDF + autoTable |
src/utils/fingerprint.ts | Browser fingerprint data collection |