How helloworldbyprince/ai-projects-nodejs works
This repository’s implemented product is a Node.js PDF question-answering backend. A client uploads a PDF and question; the server extracts and chunks the text, embeds the chunks, stores them in Qdrant, searches for a matching chunk, and asks Gemini to answer from that context. A separate endpoint creates the Qdrant collection. These responsibilities are implemented in one server file, so the graph distinguishes runtime stages rather than implying separate modules. The source excerpt supports the shown calls; it does not show a client or additional product subsystems.
Main entry points: index.js PDF upload route
Components 11
HTTP API
- Express server
chat-with-pdf/server/index.js - PDF upload route
chat-with-pdf/server/index.js - Collection route
chat-with-pdf/server/index.js
PDF RAG
- PDF extraction
chat-with-pdf/server/index.js - Text chunking
chat-with-pdf/server/index.js - Embedding helper
chat-with-pdf/server/index.js - Vector retrieval
chat-with-pdf/server/index.js - Answer generation
chat-with-pdf/server/index.js
External services
- Gemini API
- Qdrant vector store
Other components
- Client
Connections 16
- Client → Express server: sends requests
chat-with-pdf/server/index.js - Express server → PDF upload route: routes upload
chat-with-pdf/server/index.js - Express server → Collection route: routes creation
chat-with-pdf/server/index.js - PDF upload route → PDF extraction: parses PDF
chat-with-pdf/server/index.js - PDF extraction → Text chunking: provides text
chat-with-pdf/server/index.js - PDF upload route → Embedding helper: embeds chunks
chat-with-pdf/server/index.js - Embedding helper → Gemini API: requests embeddings
chat-with-pdf/server/index.js - PDF upload route → Qdrant vector store: upserts points
chat-with-pdf/server/index.js - PDF upload route → Embedding helper: embeds question
chat-with-pdf/server/index.js - PDF upload route → Vector retrieval: searches vectors
chat-with-pdf/server/index.js - Vector retrieval → Qdrant vector store: queries store
chat-with-pdf/server/index.js - Vector retrieval → Answer generation: supplies matching text
chat-with-pdf/server/index.js - PDF upload route → Answer generation: provides question
chat-with-pdf/server/index.js - Answer generation → Gemini API: generates answer
chat-with-pdf/server/index.js - PDF upload route → Client: sends answer
chat-with-pdf/server/index.js - Collection route → Qdrant vector store: creates collection
chat-with-pdf/server/index.js