How ceres2808/f1-rag works
Project type and purpose
• From the file tree and README, this is a full-stack RAG (Retrieval-Augmented Generation) web app built with Next.js (App Router) and React + Tailwind. Its purpose is to answer Formula 1 questions by retrieving domain-specific knowledge and augmenting prompts sent to an LLM.
File structure
• Top-level:
• f1_rag/app/(preview)/api/chat/route.ts – Next.js API route that handles chat requests
• f1_rag/app/(preview)/page.tsx & layout.tsx – React pages and layouts
• f1_rag/components & components/ui – reusable UI components (chat interface, inputs, buttons, etc.)
• f1_rag/lib/ai/search.ts – core RAG logic: vector search + LLM call
• f1_rag/lib/utils.ts & env.mjs – environment loading and helpers
• Configuration: Dockerfile, .env.example, GitHub Actions workflow, Tailwind & PostCSS, tsconfig, ESLint
• Patterns: clear separation of frontend (React/TSX under app & components) vs backend logic (API routes + lib/ai).