Inspiration
When an enterprise customer cancels a major contract, post-mortems are notoriously chaotic. Root causes are fragmented across CRM notes, Zendesk tickets, Jira defects, and release changelogs. Teams typically spend 3 to 5 hours copy-pasting records into spreadsheets or relying on ungrounded AI summaries that hallucinate plausible excuses and confuse chronological correlation with legal causation.
We built TraceCase to replace speculative post-mortems with deterministic, verifiable graph intelligence: connecting complaints, defects, and cancellation events into an evidence-linked ledger in milliseconds.
What it does
TraceCase is an open-source, local-first investigation platform for customer churn post-mortems:
- Embedded Graph Exploration: Ingests CSV/JSON data into a local embedded Relate graph database (
@relate/relate), mapping customers, complaints, software releases, and churn events. - EvidenceEnvelope™ Answers: Rather than generating ungrounded summaries, queries return verified graph traversal paths linked to immutable source records with SHA-256 byte-integrity verification.
- Defensive & Grounded AI: Sanitizes untrusted records against indirect prompt injections and strictly enforces graph grounding—rejecting any claim not backed by a verified node.
- Interactive Visualizer: Pan/zoom SVG graph explorer enabling investigators to inspect multi-hop causal chains and source provenance.
- Human-in-the-Loop Review Ledger: An append-only audit trail where investigators review, edit, and disposition findings (
accepted,edited,rejected). - Board-Ready Reports & MCP Server: Exports printable executive HTML post-mortems and exposes a read-only Model Context Protocol (MCP) server for local AI coding agents.
How we built it
- Graph Storage: Embedded Relate database (
@relate/[email protected]) running natively in-process via Foreign Function Interface (FFI) with strict uniqueness constraints and allowlisted Cypher templates. - Backend API: Fastify 5.2 and TypeScript 5.7 running 100% locally on
127.0.0.1:4000with zero external egress. - Frontend UI: React 18, Vite, and interactive SVG graph rendering with pan/zoom controls and evidence inspection modals.
- Local AI Defense: Custom threat-scanning pipeline normalizing Unicode lookalikes and defending against 20+ prompt-injection vectors.
Challenges we ran into
- Preventing Cypher Injections: Instead of letting LLMs write raw Cypher queries over sensitive data, we engineered a deterministic query catalog using 5 parameterized, allowlisted Cypher templates with bound parameters.
- Strict Provenance & Byte Integrity: Ensuring that every ingested source file retains raw byte integrity using SHA-256 digests without degrading query performance.
- Temporal Causality Guardrails: Guaranteeing that bug releases or complaints that occurred after a churn event are never falsely attributed to that churn.
Accomplishments that we're proud of
- Sub-50ms multi-hop traversals connecting complaints to specific software release defects.
- 100% local-first and air-gapped by default—sensitive customer data never leaves the machine.
- 23/23 end-to-end integration tests passing with full cryptographic and schema integrity verification.
What we learned
We learned how powerful embedded graph databases like Relate are for high-stakes enterprise workflows. Graph structures naturally mirror causal relationships, making evidence verification intuitive, deterministic, and auditable.
What's next for TraceCase
- Portable
.rlgraph archive bundle export and import workflows. - Integration connectors for direct, read-only Jira and Zendesk webhook ingestion.
- Timeline heatmaps for multi-account churn cluster analysis.
Built With
- cypher
- fastify
- graph-database
- local-first
- model-context-protocol
- node.js
- react
- relate
- svg
- typescript
- vite