User explicit: "1 bilhão de entusiastas pelo mundo ovni" — site is for the
UFO-curious public, not for skeptics. The 8-detective scaffolding becomes
invisible plumbing; the reader sees stories about what was observed.
Reader-facing changes:
New homepage (web/app/page.tsx)
- SiteHeader: magazine-style top nav (no detective tiles)
- HeroBanner: full-bleed editorial opener with declassified-page art
background, display-serif headline, live stats row (122 docs,
2047 events, 1861 witnesses, 867 craft catalogued)
- FeaturedCase: cover-story treatment of the most recent case_report,
uses a real document page as hero image, links to /c/[slug]
- PortalGrid: 6 thematic doorways into the archive — Sightings,
Witnesses, Craft, Hot spots, Programs, Documents — each tile shows
a real entity count and short editorial blurb
- GreatestHits: top 9 most-cited events from the corpus
(Kenneth Arnold 1947, Mantell 1948, …) as a magazine grid
- Doc list kept but reframed as "the primary record"
New sub-pages (5)
- /sightings → events (2047), magazine grid
- /witnesses → people (1861), compact table
- /objects → uap_objects (867), magazine grid
- /locations → locations (1757), compact table
- /operations → organizations (1596), compact table
- /documents → full doc list with thumbnails (mirrors homepage section
for direct deep-link)
All share <EntityListPage> shell with per-page i18n + JSON-LD ItemList
Stripped detective surfacing
- /jobs/[id]: "Sherlock Holmes / Dr. Watson" → "Investigation in progress"
- chat-bubble: detective-named card → neutral "Investigação em andamento"
- quick-launch: 7-kind detective dropdown → single "investigar um caso"
input (kind=case_report hardcoded)
- /bureau: rewritten as the case-file library (no artefact dumps)
Typography + design
- Fraunces variable serif loaded for display headings
(`.font-display` class)
- Gold-amber accent (#e0c080) unified as the brand colour
- Asymmetric magazine grids (1+2+3 column, generous whitespace)
- Hover micro-interactions (image scale on featured case, translateX
on portal arrows)
SEO + GEO
- layout.tsx metadataBase + title.template + per-route Metadata exports
- Organization JSON-LD on root layout
- WebSite + SearchAction JSON-LD on homepage
- CollectionPage + ItemList JSON-LD on every entity list page
- openGraph + twitter cards, pt-BR primary + en-US alternate
- ai:purpose meta tag for Generative Engine Optimization — declares
the site as a citation-linked primary-source archive
- robots: index + follow with large image preview
The detectives themselves remain alive in the backend (runtime, DB, audit
log), but the reader never sees "Holmes / Sun-Tzu / Watson" in the UI. The
next phase will reorient case-writer to write as a single best-seller voice
synthesising all the internal sources.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
105 lines
3.5 KiB
TypeScript
105 lines
3.5 KiB
TypeScript
"use client";
|
|
|
|
/**
|
|
* QuickLaunch — homepage form to fire an investigation in 1 click without
|
|
* opening the chat.
|
|
*
|
|
* Detective dropdown picks the kind; the form swaps the input label based
|
|
* on what that kind needs (topic, question, hypothesis_id, person_id).
|
|
* Submit POSTs to /api/bureau/launch which inserts the job + returns the
|
|
* job_id; the UI then routes to /jobs/[id].
|
|
*/
|
|
import { useState } from "react";
|
|
import { useRouter } from "next/navigation";
|
|
import { ArrowUpRight } from "lucide-react";
|
|
|
|
interface DetectiveOption {
|
|
slug: string;
|
|
label: string;
|
|
kind: string;
|
|
inputLabel: string;
|
|
placeholder: string;
|
|
field: "question" | "topic" | "hypothesis_id" | "person_id";
|
|
tone: string;
|
|
}
|
|
|
|
// Single reader-facing option: assemble a case-file narrative on any topic.
|
|
// The pipeline (multiple internal mind-clones in parallel) is hidden.
|
|
const OPTIONS: DetectiveOption[] = [
|
|
{
|
|
slug: "case",
|
|
label: "Investigar um caso",
|
|
kind: "case_report",
|
|
inputLabel: "Tópico ou pergunta",
|
|
placeholder: "as bolas de fogo verdes sobre Sandia",
|
|
field: "topic",
|
|
tone: "text-[#e0c080] border-[#e0c080]",
|
|
},
|
|
];
|
|
|
|
export function QuickLaunch() {
|
|
const router = useRouter();
|
|
const opt = OPTIONS[0];
|
|
const [value, setValue] = useState("");
|
|
const [pending, setPending] = useState(false);
|
|
const [error, setError] = useState<string | null>(null);
|
|
|
|
async function submit(e: React.FormEvent) {
|
|
e.preventDefault();
|
|
if (!value.trim()) return;
|
|
setPending(true);
|
|
setError(null);
|
|
try {
|
|
const payload: Record<string, string> = { kind: opt.kind };
|
|
payload[opt.field] = value.trim();
|
|
const r = await fetch("/api/bureau/launch", {
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json" },
|
|
body: JSON.stringify(payload),
|
|
});
|
|
const data = (await r.json()) as { job_id?: string; error?: string; message?: string };
|
|
if (!r.ok || !data.job_id) {
|
|
setError(data.error || data.message || `HTTP ${r.status}`);
|
|
setPending(false);
|
|
return;
|
|
}
|
|
router.push(`/jobs/${data.job_id}`);
|
|
} catch (e) {
|
|
setError((e as Error).message);
|
|
setPending(false);
|
|
}
|
|
}
|
|
|
|
return (
|
|
<form
|
|
onSubmit={submit}
|
|
className="rounded-lg border border-[rgba(224,192,128,0.18)] bg-[#0d1220] p-3 mb-5"
|
|
>
|
|
<div className="text-[10px] font-mono text-[#e0c080] uppercase tracking-wider mb-2">
|
|
🛸 Investigar um caso
|
|
</div>
|
|
<div className="grid md:grid-cols-[1fr_auto] gap-2">
|
|
<input
|
|
type="text"
|
|
value={value}
|
|
onChange={(e) => setValue(e.target.value)}
|
|
placeholder={opt.placeholder}
|
|
aria-label={opt.inputLabel}
|
|
className="bg-[#060a13] border border-[rgba(224,192,128,0.18)] rounded px-3 py-2 text-[13px] text-[#e7ecf3] placeholder:text-[#5a6678] font-sans"
|
|
/>
|
|
<button
|
|
type="submit"
|
|
disabled={pending || !value.trim()}
|
|
className="px-4 py-2 rounded border border-[#e0c080] bg-[#e0c080]/10 hover:bg-[#e0c080]/20 text-[#e0c080] text-[12px] font-mono inline-flex items-center gap-1 disabled:opacity-40 disabled:cursor-not-allowed"
|
|
>
|
|
{pending ? "enfileirando…" : "investigar"}
|
|
{!pending && <ArrowUpRight size={12} />}
|
|
</button>
|
|
</div>
|
|
<div className="text-[10px] font-mono text-[#5a6678] mt-2">
|
|
{opt.inputLabel}
|
|
{error && <span className="text-[#ff6ec7] ml-2">· {error}</span>}
|
|
</div>
|
|
</form>
|
|
);
|
|
}
|