VectorVault is a Retrieval-Augmented Generation (RAG) web application built with Next.js. It allows users to upload various document types, process them into vector embeddings, and interact seamlessly with the data using an AI chat interface powered by Google Gemini.
- Document Ingestion: Support for parsing multiple file formats including PDF, Excel, and Email.
- Vector Search: Utilizes Supabase (with
pgvector) for storing embeddings and performing fast similarity searches. - AI Chat: Interactive chat interface powered by Google Gemini.
- Source Tracking & Conflict Resolution: Keeps track of source documents and flags potential conflicts in the retrieved context.
- AI Voice Mode: Interact with your documents hands-free using voice input and text-to-speech responses, powered by the Web Speech API.
- Inline Source Highlighting: Retrieved context is traced back to its exact lines in the source document, with those passages highlighted directly in the reference panel for precise verification.
- Framework: Next.js (App Router)
- Frontend: React, Tailwind CSS (assumed based on standard Next.js setups)
- Database & Vector Store: Supabase (PostgreSQL + pgvector)
- AI Model: Google Gemini API
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher recommended)
- A Supabase account and project
- A Google Gemini API Key
Navigate to the project directory and install the required packages:
npm install
# or
yarn install
# or
pnpm installCreate a .env.local file in the root of your project and add the necessary environment variables. (See the .env.local file you just edited or use the template below):
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
GEMINI_API_KEY=your_gemini_api_keySet up the Supabase database schema for vector storage.
- Go to your Supabase project dashboard.
- Navigate to the SQL Editor.
- Copy the contents of
supabase/schema.sqland run the script to create the necessary tables and functions (including thepgvectorextension).
Start the Next.js development server:
npm run dev
# or
yarn dev
# or
pnpm devOpen http://localhost:3000 with your browser to see the application.
src/app/- Next.js App router pages and API routes (/api/ask,/api/ingest,/api/sources).src/components/- React components including the Chat Interface, Sidebar, and Upload Panel.src/lib/- Core logic for chunking texts, connecting to Gemini/Supabase, and parsers for various file formats.supabase/- SQL scripts for setting up the Supabase database.