"use client"; import { FormEvent, useState } from "react"; import { ReportView } from "./report-view"; import { demoInspection } from "@/lib/inspect/demo"; import { isInspectionResult } from "@/lib/inspect/validation"; import type { InspectionResult } from "@/lib/inspect/types"; import { CERTSCOPE_VERSION } from "@/lib/version"; type ReportSource = "demo" | "live"; type ActiveReport = { result: InspectionResult; source: ReportSource }; type RequestState = | { status: "idle" | "success" } | { status: "loading"; requestedHost: string } | { status: "error"; requestedHost: string; message: string }; function ShieldLogo() { return ; } function SearchIcon() { return ; } function CheckIcon() { return ; } function ArrowIcon() { return ; } const capabilities = [ { label: "DNS", detail: "A / AAAA, MX / NS, SPF and DMARC", icon: "01" }, { label: "TLS", detail: "Trust, identity, expiry and connection", icon: "02" }, { label: "HTTP", detail: "Redirect safety, HSTS, CSP and headers", icon: "03" }, ]; const securityBoundaries = ["Public hosts only", "Ports 80 / 443", "Redirects revalidated", "Bounded deadlines", "No scan history"]; const unavailableMessage = "Inspection service is temporarily unavailable. Try again shortly."; export default function Home() { const [host, setHost] = useState(""); const [report, setReport] = useState(null); const [request, setRequest] = useState({ status: "idle" }); const loading = request.status === "loading"; async function runInspection(rawHost: string) { const requestedHost = rawHost.trim(); if (!requestedHost) return; setRequest({ status: "loading", requestedHost }); try { const response = await fetch(`/api/inspect?host=${encodeURIComponent(requestedHost)}`, { cache: "no-store" }); const body = await response.json().catch(() => null) as unknown; if (!response.ok) { const message = typeof body === "object" && body !== null && "error" in body && typeof body.error === "string" ? body.error : unavailableMessage; throw new Error(message); } if (!isInspectionResult(body)) throw new Error("Inspection returned an invalid response"); setReport({ result: body, source: "live" }); setHost(body.host); setRequest({ status: "success" }); } catch (error) { const message = error instanceof Error ? error.message : unavailableMessage; setRequest({ status: "error", requestedHost, message }); } } function inspect(event: FormEvent) { event.preventDefault(); void runInspection(host); } function loadDemo() { setReport({ result: demoInspection, source: "demo" }); setRequest({ status: "idle" }); } const demoWarning = demoInspection.findings.find((finding) => finding.severity === "warning") ?? demoInspection.findings[0]; const landingError = request.status === "error" ? request.message : ""; return
CertScopeDOMAIN POSTURE INSPECTOR
DNS · TLS · HTTPEvidence-led checks for public infrastructure
v{CERTSCOPE_VERSION}Repository
{report ? void runInspection(currentHost)} onInspectAnother={(nextHost) => void runInspection(nextHost)} /> : <>

Smaller risks. A more open internet.

Explainable domain inspection

CertScope

Public infrastructure posture, made explainable.

Inspect the DNS, TLS and HTTP posture of any public hostname. Every score change points back to evidence, not a black box.

Single-hostDeterministicEvidence-led

Start an inspection

Inspect a hostname
Public targets only
setHost(event.target.value)} placeholder="example.com" autoComplete="off" spellCheck={false} aria-describedby="hostname-help" />Enter a hostname, not a URL or IP address.
{["example.com", "github.com", "cloudflare.com"].map((example) => )}

DNS, TLS and HTTP checks stay bounded; no scan history is stored.

{landingError &&
Inspection unavailable{landingError}Adjust the hostname and try again.
}
{loading &&
Inspecting DNS, TLS and HTTP posture…

Collecting bounded evidence for {host.trim()}. Existing evidence will appear as soon as the report is ready.

}

What CertScope checks

One clear report across the public-facing stack.

Evidence, not guesswork
{capabilities.map((capability) =>

{capability.label}

{capability.detail}

)}

Safe by design

Strong boundaries around every connection.
    {securityBoundaries.map((boundary) =>
  • {boundary}
  • )}

Deterministic demo

See the report before you inspect.

The built-in fixture is local, reproducible and ready to explore without a network request.
Demo preview{demoInspection.host}
{demoInspection.score.overall}/100
{(["dns", "tls", "http"] as const).map((category) =>
{category.toUpperCase()}{demoInspection.score.categories[category]}
)}
!
{demoWarning.title}

{demoWarning.summary}

}
; }