"use client"; import { useMemo, useState } from "react"; type Event = { ip: string; country: string; city: string; network: string; score: number; status: "Review" | "Blocked" | "Allowed"; seen: string; requests: string }; const initialEvents: Event[] = [ { ip: "185.220.101.42", country: "Germany", city: "Falkenstein", network: "AS60729 · Zwiebelfreunde", score: 96, status: "Review", seen: "12 sec ago", requests: "842" }, { ip: "45.134.26.91", country: "Netherlands", city: "Amsterdam", network: "AS9009 · M247 Europe", score: 88, status: "Blocked", seen: "1 min ago", requests: "391" }, { ip: "104.28.208.87", country: "United States", city: "San Francisco", network: "AS13335 · Cloudflare", score: 18, status: "Allowed", seen: "3 min ago", requests: "126" }, { ip: "193.32.162.14", country: "Romania", city: "Bucharest", network: "AS209605 · UAB Host Baltic", score: 73, status: "Review", seen: "7 min ago", requests: "214" }, { ip: "34.160.111.145", country: "United States", city: "Mountain View", network: "AS396982 · Google Cloud", score: 7, status: "Allowed", seen: "11 min ago", requests: "98" }, ]; function riskLabel(score: number) { return score >= 80 ? "Critical" : score >= 60 ? "Elevated" : "Low"; } export default function Home() { const [query, setQuery] = useState(""); const [filter, setFilter] = useState("All traffic"); const [events, setEvents] = useState(initialEvents); const [selected, setSelected] = useState(initialEvents[0]); const [notice, setNotice] = useState(""); const visible = useMemo(() => events.filter((e) => filter === "All traffic" || e.status === filter), [events, filter]); const inspect = () => { const value = query.trim(); if (!value) return; const found = events.find((e) => e.ip === value); if (found) setSelected(found); else setSelected({ ip: value, country: "Unknown", city: "Unresolved", network: "No network record", score: 42, status: "Review", seen: "Just now", requests: "1" }); setNotice(`Inspection opened for ${value}`); setTimeout(() => setNotice(""), 2400); }; const decide = (status: "Blocked" | "Allowed") => { setSelected((current) => ({ ...current, status })); setEvents((current) => current.map((event) => event.ip === selected.ip ? { ...event, status } : event)); setNotice(`${selected.ip} ${status.toLowerCase()}`); setTimeout(() => setNotice(""), 2400); }; return (
IPSentinel
MK
Maya KimSecurity Ops

NETWORK INTELLIGENCE

Good morning, Maya.

Here’s what your perimeter has seen in the last 24 hours.

All systems operationalLast sync 18 seconds ago
Reputation, location, network and recent activity
setQuery(e.target.value)} onKeyDown={(e) => e.key === "Enter" && inspect()} placeholder="Enter IPv4 or IPv6 address" />
REQUESTS SCANNED
2.48M

+12.4% from yesterday

UNIQUE ADDRESSES
18,294

+3.1% from yesterday

THREATS BLOCKED!
1,847

−8.2% from yesterday

REVIEW QUEUE
24

7 critical need attention

Recent activity

Addresses with notable behavior

{["All traffic","Review","Blocked","Allowed"].map((name) => )}
{visible.map((event) => setSelected(event)}>)}
IP ADDRESSLOCATION / NETWORKREQUESTSRISKSTATUS
{event.ip}{event.seen}{event.city}, {event.country}{event.network}{event.requests}{event.score}{event.status}
{notice &&
{notice}
}
); }