How qwerty1347/devtalk works
devTalk is a serverless RAG chat over indexed development notes. Users ask in the chat UI; the chat route embeds the question, retrieves matching Pinecone chunks, and asks Gemini to answer with sources. Separate GitHub, local-folder, and Google Drive indexers extract documents, chunk and embed them, then store vectors. The web UI also offers resumable GitHub indexing. The README documents additional Drive image description and Google Docs support; those capabilities are represented, though their full implementation paths were not sampled. Edges reflect excerpts, SOURCE INDEX references, or README workflow statements; unsampled details are not inferred.
Main entry points: gemini.ts Gemini embeddings and answers · route.ts Web index route · index-github.ts GitHub indexer · index-local.ts Local indexer
Components 21
Chat experience
- Chat UI
app/page.tsx - Index panel
app/IndexPanel.tsx
RAG runtime
- Chat route
app/api/chat/route.ts - Gemini embeddings and answers
lib/gemini.ts
Document indexing
- Web index route
app/api/index/route.ts - GitHub indexer
scripts/index-github.ts - Local indexer
scripts/index-local.ts - Drive indexer
scripts/index.ts - Text chunking
lib/chunk.ts - Vector IDs
lib/id.ts - Environment loading
lib/loadEnv.ts
Sources and storage
- GitHub documents
lib/github.ts - Local documents
lib/localfiles.ts - Drive documents
lib/drive.ts - Vector operations
lib/pinecone.ts - Pinecone index
Other components
- User
- GitHub
- Local filesystem
- Google Drive
- Gemini service
Connections 35
- User → Chat UI: asks question
README.md - Chat UI → Chat route: submits question
README.md - Chat route → Gemini embeddings and answers: embeds query
app/api/chat/route.ts - Chat route → Vector operations: searches vectors
app/api/chat/route.ts - Chat route → Gemini embeddings and answers: requests answer
app/api/chat/route.ts - Gemini embeddings and answers → Gemini service: calls models
README.md - Vector operations → Pinecone index: queries and upserts
README.md - Chat route → Chat UI: returns answer and sources
app/api/chat/route.ts - User → Index panel: starts indexing
app/IndexPanel.tsx - Index panel → Web index route: requests indexing
app/IndexPanel.tsx - Web index route → GitHub documents: lists and fetches
app/api/index/route.ts - Web index route → Text chunking: chunks text
app/api/index/route.ts - Web index route → Gemini embeddings and answers: embeds documents
app/api/index/route.ts - Web index route → Vector IDs: creates vector IDs
app/api/index/route.ts - Web index route → Vector operations: checks and upserts
app/api/index/route.ts - GitHub indexer → GitHub documents: reads documents
scripts/index-github.ts - GitHub indexer → Text chunking: chunks documents
scripts/index-github.ts - GitHub indexer → Gemini embeddings and answers: embeds documents
scripts/index-github.ts - GitHub indexer → Vector IDs: creates vector IDs
scripts/index-github.ts - GitHub indexer → Vector operations: upserts vectors
scripts/index-github.ts - Local indexer → Local documents: reads documents
scripts/index-local.ts - Local indexer → Text chunking: chunks documents
scripts/index-local.ts - Local indexer → Gemini embeddings and answers: embeds documents
scripts/index-local.ts - Local indexer → Vector IDs: creates vector IDs
scripts/index-local.ts - Local indexer → Vector operations: upserts vectors
scripts/index-local.ts - Drive indexer → Drive documents: lists and downloads
scripts/index.ts - Drive indexer → Gemini embeddings and answers: embeds and describes
scripts/index.ts - Drive indexer → Text chunking: chunks extracted text
scripts/index.ts - Drive indexer → Vector operations: upserts vectors
scripts/index.ts - GitHub documents → GitHub: fetches repository data
lib/github.ts - Local documents → Local filesystem: reads files
- Drive documents → Google Drive: lists and downloads
lib/drive.ts - Environment loading → GitHub indexer: loads script config
scripts/index-github.ts - Environment loading → Local indexer: loads script config
scripts/index-local.ts - Environment loading → Drive indexer: loads script config
scripts/index.ts