How pinecone-io/pinecone-vercel-starter works
Frontend Layer Components
• Chat Component (src/app/components/Chat)
• Context Panel Component (src/app/components/Context)
• Header Component
API Layer Components
• Chat API (/api/chat)
• Context API (/api/context)
• Crawl API (/api/crawl)
• Clear Index API (/api/clearIndex)
• Crawler Service as a separate component connected to the Crawl API
• Embedding service as a middleware component
Infrastructure Layer Components
• Pinecone Vector Database
• OpenAI API
• Data stores:
• Vector Embeddings Store (in Pinecone)
• Document Chunks Store
• User Input → Chat Component → Chat API → OpenAI API
• Crawler → URLs → Document Chunks → Embeddings → Pinecone
• Context API → Pinecone → Context Panel
• User interactions (e.g., blue)
• Data processing flows (e.g., green)
• Storage operations (e.g., orange)
Key Processes to Highlight
• RAG Pipeline:
• Document Ingestion
• Embedding Generation
• Vector Storage
• Context Retrieval
• Response Generation
Additional Elements
• Environment variables section
• Edge runtime indicators
• Streaming response paths
Technical Details
• Next.js 13+ App Router architecture
• Edge Runtime capabilities
• Vercel AI SDK integration
• Document splitting strategies (Recursive/Markdown)
Architectural Patterns
• RAG pattern implementation
• Streaming response pattern
• Separation of concerns between crawling, embedding, and chat
The edge computing capabilities
This will provide a clear visualization of how the application processes user queries through the RAG system while maintaining context and delivering streaming responses.