Tech stack for an AI document chat app (2026)
Chat with your documents, designed by StackPrism from one sentence: 10 components, a reason for each, and the live checks that watch them.
The stack
Next.js
Node.js
- Inngest
Supabase
Upstash
Clerk
OpenAI
Pinecone
Sentry
“An AI assistant where teams upload PDFs and docs and chat with them. Answers cite the passages they came from, and each team has its own shared document library.”
Make it yours. Open this stack in the editor to check its health, harden it and hand it to your coding agent. No sign-up, nothing to generate.
Start from this stackSelect a component to see what it does and what it connects to, or pick one above to see what breaks if it goes down. Pinch or use the buttons to zoom.
Why this stack
Teams sign in with Clerk, which also keeps each team’s library separate, and upload files through a Next.js app on Vercel straight into Supabase Storage. An Inngest workflow does the slow part in the background: it chunks each document, embeds it with OpenAI and indexes it in Pinecone. When someone asks a question, the Node.js API finds the closest passages in Pinecone and has OpenAI answer from them, so every answer can point back to its source. Supabase Postgres keeps teams and chat history, Upstash Redis caches recent context, and Sentry reports errors.
Why each piece
All 10 components on the diagram: what each one does, what it talks to, and what stops if it goes down.
Next.js Web App
Runs on Vercel
Chat and upload UI. Calls Clerk (signs in), Supabase Storage (uploads) and Node.js API. Called by Sentry (captures).
Nothing else on the diagram depends on it.
Node.js API
Runs on Vercel, in Core Services
Chat and ingestion API. Calls Supabase Postgres (queries), Upstash Redis (reads), OpenAI and Pinecone (retrieves). Called by Next.js Web App and Sentry (captures).
If it goes down, 1 of 9 components stops working.
Inngest Workflows
Runs on Vercel, in Core Services
Async ingestion pipeline. Calls Supabase Storage (reads), Supabase Postgres (writes) and Pinecone (indexes).
Nothing else on the diagram depends on it.
Supabase Storage
In Data & Storage
Original documents. Called by Next.js Web App (uploads) and Inngest Workflows (reads).
If it goes down, 2 of 9 components degrade.
Supabase Postgres
In Data & Storage
Teams and chats. Called by Node.js API (queries) and Inngest Workflows (writes).
If it goes down, 3 of 9 components stop working.
Upstash Redis
In Data & Storage
Chat context cache. Called by Node.js API (reads).
If it goes down, 1 of 9 components degrades.
Clerk
In External Services
Auth and org access. Called by Next.js Web App (signs in).
If it goes down, 1 of 9 components stops working.
OpenAI
In External Services
LLM generation. Called by Node.js API.
If it goes down, 1 of 9 components degrades.
Pinecone
In External Services
Vector database. Called by Node.js API (retrieves) and Inngest Workflows (indexes).
If it goes down, 3 of 9 components stop working.
Sentry
Error tracking. Calls Node.js API (captures) and Next.js Web App (captures).
If it goes down, 2 of 9 components degrade.
When this stack fits
- Answers have to cite the passages they came from.
- Each team has its own library, and Clerk organizations map onto those teams.
- Documents arrive as uploads, so indexing can happen in the background before anyone asks.
When to pick something else
- You’d rather not run a separate vector database: the pgvector extension in Supabase Postgres can hold the embeddings next to the rest of your data.
- The documents can’t leave your network: OpenAI and Pinecone are hosted services, so plan for self-hosted models and storage.
- The answers must reflect data that changes every minute: query the live source instead of an index of uploaded files.
What you need to build this
10 components across 8 areas of the stack.
Build it with your AI agent
Hand the stack to Claude Code, Codex, Cursor or any coding agent as a brief: how it connects, install steps and a build plan.
Frontend1
- Docs
Next.js Web App
Chat and upload UI
npm install next
Backend & APIs2
- Docs
Node.js API
Chat and ingestion API
Inngest Workflows
Async ingestion pipeline
Data2
Cache & queues1
- Docs
Upstash Redis
Chat context cache
Auth1
- Docs
Clerk
Auth and org access
npm install @clerk/nextjs
AI1
- Docs
OpenAI
LLM generation
npm install openai
Storage & CDN1
- Docs
Supabase Storage
Original documents
npm install @supabase/supabase-js
Observability1
- Docs
Sentry
Error tracking
npm install @sentry/nextjs
Install
npm install next @supabase/supabase-js @clerk/nextjs openai @sentry/nextjs
SDKs only. Pick your own database driver or ORM.