How itanishqshelar/vectorvault works
VectorVault is a document-grounded AI assistant with upload and Google-source ingestion, semantic search, chat, source inspection, voice interaction, and ticket/CRM workflows. Its main path is upload → parse and chunk → embed and store → retrieve context → stream a Gemini answer with source references. The sampled routes establish the ingestion, retrieval, session, and Google-sync wiring; several UI and conflict-resolution details are documented but their implementation was not sampled, so those links are shown only where supported.
Main entry points: supabase.js Storage operations · drive/route.js Drive sync · gemini.js Gemini services · process/route.js Ingest processor
Components 28
User experience
- Main app
src/app/page.js - Chat interface
src/components/ChatInterface.jsx - Upload panel
src/components/UploadPanel.jsx - Source viewer
src/components/DocumentViewer.jsx - Search modal
src/components/SearchModal.jsx - Voice interface
src/components/LiveVoiceOrb.jsx - CRM page
src/app/crm/page.jsx
Knowledge pipeline
- Upload endpoint
src/app/api/ingest/route.js - Ingest processor
src/app/api/ingest/process/route.js - File parsers
src/lib/parsers - Chunking
src/lib/chunker.js - Storage operations
src/lib/supabase.js - Supabase store
Assistant workflows
- Chat endpoint
src/app/api/ask/route.js - Search endpoint
src/app/api/search/route.js - Document endpoint
src/app/api/document/route.js - Chat sessions
src/app/api/sessions/route.js - Conflict handling
src/lib/conflict.js - Ticket endpoints
src/app/api/tickets/route.js
External integrations
- Gemini services
src/lib/gemini.js - Google Gemini
- Drive sync
src/app/api/fetch/drive/route.js - Gmail sync
src/app/api/fetch/gmail/route.js - Google OAuth
src/lib/googleAuth.js - Google Drive / Gmail
- Transcription endpoint
src/app/api/transcribe/route.js - Groq transcription
Other components
- User
Connections 44
- User → Main app: opens
- Main app → Chat interface: shows
- Main app → Upload panel: shows
- User → Upload panel: selects files
- Upload panel → Upload endpoint: uploads
- Upload endpoint → Storage operations: stores file
- Upload endpoint → Ingest processor: returns source ID
- Ingest processor → Storage operations: loads file
- Ingest processor → File parsers: parses
- Ingest processor → Chunking: chunks text
- Ingest processor → Gemini services: requests embeddings
- Ingest processor → Storage operations: inserts chunks
- Storage operations → Supabase store: reads / writes
- Chat interface → Chat endpoint: submits query
- Chat endpoint → Gemini services: embeds query
- Chat endpoint → Storage operations: searches vectors
- Chat endpoint → Gemini services: requests answer
- Gemini services → Google Gemini: calls
- Search modal → Search endpoint: submits query
- Search endpoint → Gemini services: embeds query
- Search endpoint → Storage operations: searches vectors
- Source viewer → Document endpoint: loads source
- Document endpoint → Storage operations: reads source and chunks
- Chat interface → Chat sessions: saves messages
- Chat sessions → Storage operations: reads / writes
- Chat endpoint → Conflict handling: checks conflicts
- User → Drive sync: chooses Drive files
- Drive sync → Google OAuth: gets OAuth tokens
- Drive sync → Google Drive / Gmail: lists / downloads
- Drive sync → File parsers: parses files
- Drive sync → Chunking: chunks text
- Drive sync → Gemini services: requests embeddings
- Drive sync → Storage operations: stores sources and chunks
- User → Gmail sync: starts sync
- Gmail sync → Google OAuth: gets OAuth tokens
- Gmail sync → Google Drive / Gmail: lists / fetches messages
- Gmail sync → Chunking: chunks text
- Gmail sync → Gemini services: embeds and classifies
- Gmail sync → Storage operations: stores sources and tickets
- CRM page → Ticket endpoints: manages tickets
- User → Voice interface: speaks
- Voice interface → Transcription endpoint: sends audio
- Transcription endpoint → Groq transcription: transcribes
- Voice interface → Chat endpoint: asks with transcript