I vibe-coded a Next.js knowledge base that argues with itself
This is a submission for the Sanity Challenge, Path Two: Vibe-Code Something Strange What I Built Still True is a knowledge base about Next.js that keeps itself honest. Instead of storing facts as flat pages it stores them as claims tied to sources, with typed relationships between claims. One claim can supersede another or contradict it. The relationship carries the reason it holds. The public…
This project, for the Sanity Challenge's Path Two, is a knowledge base about Next.js that argues with itself, aiming to stay honest. Instead of storing facts as flat pages, it presents them as claims linked to sources and linked claims. One claim can override or contradict another, with the relationship indicating why. The public board presents this graph, organized by topic.
Current claims are visible, while superseded claims are dimmed and crossed out. When two sources disagree, the conflict is displayed side by side with an explanation.
The core of the app is built with Next.js 16 on the App Router. Data is managed through Sanity, with claims, sources, and typed edges forming a graph. Each claim page contains its source, confidence, and linked claims. The project employs unit and end-to-end tests within CI. The schema was initially developed to link contradictions with a reference, but the model suggested a more robust approach: treating the relationship as a distinct document.
This led to the creation of claimEdge type, including from, to, relation (supports, contradicts, supersedes), and reason.
Sanity Context was utilized to seed the knowledge base with conflicting documents, expecting it to flag every pair. However, it reconciled them into a timeline-aware entry, which posed a challenge for the demo. Adding a genuine unreconcilable pair—official default versus community disagreement—resolved the issue, raising exactly one conflict that is now visible on the board.
The editorial process is modeled as data with sanity-plugin-workflow, moving through unverified, sourced, and confirmed states. This gated transition is overseen by administrators, with the confirmed status recorded in a separate metadata document. A contradiction-triage dashboard, built as an App SDK app, allows reviewers to examine open contradictions, showcasing the 'reach past the Studio' bonus.
The project employs Claude Code as an AI-native IDE, generating the Sanity schema, knowledge base pipeline, and the agent. The AI assisted in building the design and decisions, verified through live deployment at the provided URL. With the MiniMax-M3 model, the entire process ran end-to-end, demonstrating the power of AI in software development.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.