import { useEffect, useState } from "react"; import { api } from "../../api"; import { IconCheck, IconDoc, IconEval, IconQuote, IconShield, IconSpark, } from "../../lib/icons"; import { useScrollReveal } from "../../lib/useScrollReveal"; import Button from "../ui/Button"; import Card from "../ui/Card"; import { EmptyState, ErrorState, LoadingState, SuccessNote } from "../ui/States"; import DocumentCard from "../DocumentCard"; import Upload from "../Upload"; import HeroPreview from "./HeroPreview"; const STEPS = [ { t: "Send the packet", d: "Drop the invoice, packing list, contract, transport docs and certificate of origin. Scans and photos work too." }, { t: "Cross-check", d: "Tamga reads every document and matches the fields and EAEU rules against each other." }, { t: "Cite", d: "Every discrepancy points to the exact line in the exact document. Nothing is filed or signed without you." }, ]; // Lightweight count-up for the stats band (rAF, ease-out cubic). function CountUp({ end, suffix = "", duration = 1200 }) { const [v, setV] = useState(0); useEffect(() => { if (!end) return; let raf, start; const tick = (t) => { if (!start) start = t; const p = Math.min((t - start) / duration, 1); setV(Math.round((1 - Math.pow(1 - p, 3)) * end)); if (p < 1) raf = requestAnimationFrame(tick); }; raf = requestAnimationFrame(tick); return () => cancelAnimationFrame(raf); }, [end, duration]); return ( <> {v} {suffix} > ); } export default function Overview({ documents, loading, reload, onTryDemo, seeding, onOpenEval }) { const [uploading, setUploading] = useState(false); const [message, setMessage] = useState(""); const [error, setError] = useState(""); useScrollReveal([loading, documents.length]); async function onFile(file) { setError(""); setMessage(""); setUploading(true); try { const doc = await api.uploadDocument(file); await reload(); if (doc.status === "processed") { setMessage(`Uploaded "${doc.filename}" — ${doc.num_chunks} chunks ready.`); } else { setError(`"${doc.filename}" couldn't be processed: ${doc.error || "unknown error"}`); } } catch (err) { setError(err.message); } finally { setUploading(false); } } async function onDelete(doc) { setError(""); setMessage(""); try { await api.deleteDocument(doc.id); await reload(); setMessage(`Deleted "${doc.filename}".`); } catch (err) { setError(err.message); } } function scrollToUpload() { document .getElementById("upload-zone") ?.scrollIntoView({ behavior: "smooth", block: "center" }); } return (
Tamga audits a customs declaration packet (invoice, packing list, contract, transport docs and certificate of origin) for HS codes, value, origin, weights and the mismatches that stall clearance. Every finding cites the exact document, and when the evidence isn't there it says so instead of guessing.
01 / Try it with your own files
02 / How it works
{d}
03 / Why it's trustworthy
Every flag shows the exact document, line and relevance, so a broker verifies it in one glance.
If a field is missing or the evidence is weak, Tamga flags it instead of guessing.
Extractive by default. It can't invent a value that isn't in the packet.
A golden dataset grades grounding on every run — open the evaluation to see the current numbers.
Most AI demos ask you to trust them. Tamga ships a golden-dataset evaluation that scores whether it stayed grounded, and counts a correct abstention as a success.
Tamga doesn't ask you to trust it, it shows its work. Every finding links back to the exact source line, it flags the gap when the packet doesn't say, and a bundled evaluation grades that grounding on every run.