Sun & Rain Works Engineer Portfolio Β· Est. 2005
Linked-data research workbench

Wikidata Explorer

Evidence-first exploration for Wikidata graphs.

A Next.js 16 application for searching Wikidata, inspecting entity evidence, and visualizing the relationships around any item. It turns labels, statements, qualifiers, references, ranks, and linked records into an inspectable, shareable research picture, and routes reviewers into a seeded proof path that shows graph context, evidence depth, and safe exports in one short review. Optional AG2 research agents sit behind a deliberate, feature-flagged AI boundary. It also runs as a named client of Meta Museum's Linked Art change feed, a separate system in this portfolio, with a durable callback ledger that survives a restart.

Live in production
Next.js 16 React 19 TypeScript Tailwind CSS Radix UI AG2 / AutoGen FastAPI Docker Playwright Linked Data
The idea

Make the trustworthy graph understandable, fast

Wikidata is powerful but dense. Generic search flattens its evidence into plain results. Wikidata Explorer answers a focused question instead: how quickly can someone start from one entity and understand the trustworthy graph around it?

A reviewer can land directly on a seeded Q42 proof path, Douglas Adams, and immediately see the relationship graph, the evidence behind each edge, a side-by-side comparison against another entity, and safe, shareable exports. Statements carry their ranks, references, qualifiers, and source hints rather than being collapsed into a summary, so the research picture stays auditable. The public demo ships reliably on Vercel with AI disabled by default, and the AG2 agent runtime is an opt-in layer that can be enabled locally or hosted as a separate service.

53/53
partner activities reconciled
47
distinct QIDs in the harvest
0
provider keys reachable from the browser
10
verification passes in CI
Interop

Conforming to a spec I could not reach into

Publishing a standards feed is the easy half. The harder half is being a well-behaved client of one, and saying so out loud when the evidence is not there yet.

Wikidata Explorer harvests Meta Museum's Linked Art and IIIF Change Discovery feed as a distinct named client, identifying itself in the User-Agent and a dedicated consumer-id header. Both systems are mine, so this is conformance rather than outside adoption. What it buys is that neither side could shortcut the other: the contract is a published spec, not a private arrangement. The consumer core is network-free and unit-tested: header building, QID extraction, UTC timestamp validation, per-activity reconciliation, and a walk-back plan all run against fixtures. A live harvest against the production feed passes 53 of 53 activities across 47 distinct QIDs, with every timestamp in UTC and every record carrying its equivalence hooks.

An optional public callback receives Create, Update, and Delete notifications, token-gated and failing closed until it is configured. Its observed-event ledger is honest by construction: Update and Delete stay at zero until one is genuinely seen, and the ledger persists to durable storage with a graceful per-instance fallback, so the route reports its own storage mode rather than implying a durability it does not have.

Architecture

A public app with an optional AI boundary

A reliable Next.js front end backed by live Wikimedia data, with feature-flagged server routes that keep the optional AG2 runtime, and its credentials, off the public client.

Front of house

Next.js 16 explorer

An App Router product surface built on React 19, TypeScript, Tailwind CSS, and Radix UI primitives. The search workbench drives a clickable relationship graph, evidence rows, comparison flows, and workspace slots, with shareable state encoded in the URL.

Source data

Live Wikimedia APIs

The app fetches and normalizes records from the Wikidata Action API, the Wikibase REST API, and the Wikimedia Commons API. It renders the canonical facts rather than owning them, keeping the research picture grounded in upstream data.

The AI boundary

Feature-flagged server routes

AG2-backed endpoints for chat, grounded entity summaries, and specialist workflows live behind explicit flags and fail closed in public mode. They run server-side, so provider keys and bearer tokens never reach the browser.

Optional runtime

AG2 service in a container

The AG2 / AutoGen agents run through either a local conda env or a token-protected FastAPI container. Packaged with a Docker /health check, it runs as a non-root user and can be hosted separately from the Vercel app.

Core features

Search, graph, evidence, compare

Everything a reviewer needs to assemble a trail of entities, statements, labels, references, and linked records into a trustworthy picture.

πŸ”Ž Search

Find entities by keyword or by direct entity/property ID such as Q42 or P31, then follow related items without restarting the flow.

🧾 Evidence rows

Inspect statement ranks, referenced/unreferenced badges, statement IDs, qualifiers, references, and source hints in expandable evidence rows.

πŸ•ΈοΈ Relationship graph

A clickable graph with URL-backed filters, depth controls, grouped-by-property and timeline layouts, node previews, pinned comparison, and selected-edge detail.

βš–οΈ Compare entities

Compare two or three entities without AI by shared properties, distinctive statements, property matrices, and overlapping linked entities.

πŸ”— Shareable URLs

Launch straight into a query or a shared comparison such as /search?q=Q42&tab=compare&compare=Q80, preserving context for reviewers.

πŸ“€ Safe exports

Export evidence-grounded graph paths, review findings, and portable workspace snapshots as Markdown/JSON, plus safe QuickStatements draft comments.

πŸ€– AG2 agents

When enabled, specialist agents handle research, graph analysis, next-entity suggestions, citation verification, comparison, and Markdown reports.

πŸ§‘β€βš–οΈ Review queue

Review entity data-quality findings with persisted browser-local task status, source-link hints, and a Markdown project brief for handoff.

πŸ’Ύ Workspaces

Save browser-local or token-protected project workspace slots with curation-task and agent-history summaries, or export and restore portable snapshots.

πŸ”„ Change feed client

Harvest Meta Museum's Linked Art activity stream under a declared consumer id, with cursor reconciliation, a content-addressed proof log, and a durable callback ledger.

Engineering

Grounded, tested, and safe by default

The hard part

The public demo ships with its most impressive feature switched off

The AG2 research agents are the best thing in this project, and every anonymous visitor gets them disabled by default. That is the decision, not an oversight.

An AI-enabled public demo carries provider credentials and an unmetered spend path. A portfolio demo that falls over under load, or that a stranger can drain, proves the opposite of what it was built to prove. So the boundary is a product decision as much as a technical one: the public surface should show judgment, not model access.

The off state is engineered rather than absent. Public AI routes fail closed with tested disabled responses, provider keys and bearer tokens stay server-side and never reach the browser, and the optional AG2 runtime lives in a separate token-protected container that can be enabled locally or hosted independently. Turning it off is a behaviour with tests, not a missing feature.

The partner ledger follows the same rule. Its Create counter reflects a live harvest that reconciled fifty-three of fifty-three activities across forty-seven entities, and its Update and Delete counters sit at zero, because no real Update or Delete has arrived yet. No synthetic counts are claimed, and the route reports whether its own storage is durable or per-instance rather than implying a guarantee it does not have.

A ledger that fills itself with plausible numbers is worse than one that admits it has seen nothing. The same goes for a demo that looks impressive right up until a reviewer opens it.

Outcome

Live, grounded, and inspectable

Wikidata Explorer runs in production at wikidataexplorer.com. It showcases linked-data modeling, evidence-first product design, a feature-flagged AI boundary with citation-style grounding, verified two-way interop over a published Linked Art spec, and a layered verification story spanning unit, contract, browser, performance, and visual QA. It is a research workbench that keeps every claim tied to its source, including the claims it makes about its own readiness.