MindIndex

Document Q&A for teams: shared workspaces where members ask questions across PDFs, Word files and slide decks, and every answer cites the passages it came from.

Live siteSource code

Next.js 16 

JavaScript 

Supabase 

PostgreSQL 

pgvector 

OpenAI API 

Gemini 

Tailwind CSS 

MindIndex

Overview

MindIndex answers questions from a team's own documents. Upload PDFs, Word files, slide decks, text or Markdown into a project, ask a question in plain language, and the answer comes back with numbered citations. Each citation opens the exact passage it came from, with its page or slide number.

Answers come only from those documents. When they don't cover a question, MindIndex says so instead of guessing.

Team workspaces

Each team gets a workspace with four roles: viewer, member, admin and owner. Documents belong to the workspace and everyone in it can search them, while each person's chat history stays private.

People join through an invite link or QR code. Invites expire after 1, 7 or 30 days and can be limited to a number of people, and by default an admin approves every request. Admins also get an activity log of invites, role changes, removals and uploads that nobody can edit.

How it works

Each upload is read in memory and never written to disk. The text is split into passages of about 1,000 characters, embedded, and stored in Postgres with pgvector.

A question is embedded the same way. The six closest passages in the project are retrieved, and the answer streams back with numbered citations. It works with OpenAI or Google Gemini for both embeddings and answers. Each document records the embedding model that indexed it, and search skips documents that don't match the current one.

MindIndex steps: upload, index, ask
Upload, index, ask.

Security in the database

Workspace isolation lives in Postgres, not just in the app. Every table has row level security, and the server talks to Supabase with the signed-in user's token, never an admin key. Roles and invites change only through database functions that check the caller's role.

Uploads are capped at 4 MB, checked against their file signature and scanned for zip bombs. Retrieved passages are wrapped in a random tag on every request and treated as untrusted, and a link in an answer only works if the exact URL appears in a cited passage.

MindIndex architecture diagram
Architecture: the Next.js app, Supabase Auth, Postgres with pgvector, and the AI provider layer.

Features

More screenshots

The MindIndex landing page
The landing page, with an answer and its citation.
MindIndex declining to answer a question its documents don't cover
When the documents don't cover a question, MindIndex says so.

Built by Lakshay Jain