← All systems
P–01 / 07

Case study / Applied AI / RAG document system

SynapseDoc

A deployed document-research system with citation-grounded chat, multi-provider routing, reranking, streaming, and persistent conversations.

CategoryApplied AI / RAG document systemStatusDeployedRoleFull-stack developerContextPersonal applied-AI projectStackNext.js · TypeScript · Supabase · Gemini · Groq · Mistral · CohereLiveOpen build ↗SourceGitHub ↗

Architecture playback / SynapseDoc

Follow one answer
back to its evidence.

The active stage changes with scroll. Previous stages remain visible as system history.

010203040506EVIDENCE GRAPH / GROUNDED PATH
Stage 01 / 06Uploaded document

A source enters the research workspace.

Verified boundary

Bounded production upload → ready → chat → citation → persistence flow exercised.

Known limit

Broad load and failover resilience remain unproven.

Overview

What the system is

SynapseDoc uploads documents, retrieves relevant context, and streams citation-grounded answers. It routes across Gemini, Groq, and Mistral with bounded sequential fallback and uses Cohere reranking.

Problem

The constraint that shaped it

Make document research traceable by grounding answers in uploaded sources and preserving citations with the conversation.

Contribution

What I owned

  • Document ingestion and retrieval
  • Provider routing and streaming chat
  • Conversation and citation persistence
  • Deployment verification

Capabilities

What it does

  • 01Citation-grounded chatAnswers remain connected to retrieved document passages.
  • 02Bounded provider routingGemini, Groq, and Mistral use controlled sequential fallback.
  • 03Reranked retrievalCohere improves the ordering of retrieved context.
  • 04Streaming and persistenceSSE streams responses while Supabase stores documents, conversations, messages, and citations.

Engineering

Decisions on record

Grounding
Retrieved passages and citations are first-class response evidence.
Resilience
Provider fallback is sequential and bounded.
Persistence
Document, conversation, message, and citation state live in Supabase.

Verification

Evidence checked

  • Local format, type-check, lint, tests, and Next.js build passed
  • A bounded production upload-to-chat flow was manually exercised

Evidence boundary

Known limitations

  • Broad load and failover resilience remain unproven
  • Scanned-PDF OCR remains Gemini-only with a single-page mapping limitation