How alankritkadian/pathway_rag works
Project type and purpose
• This is a full-stack web application that provides an interactive chat/replay/upload UI (built in Next.js/React) and a Python-based backend (“PathwayVectorServer”) that ingests documents, runs retrieval-augmented generation (RAG), domain-specific services (finance, maths, report generation), and returns structured chat responses.
• The README describes how to launch the backend (python main.py in the server folder) and the client (Dockerfile in client or npm run dev inside client/client).
File structure
• Top level:
• Dockerfile – containerizes the whole stack
• main.py & requirements.txt – a root-level script (likely a legacy entrypoint)
• client/ – Next.js TypeScript application
• server/ – Python Flask (or FastAPI) app with Socket.IO wrapper
• docs/, videos/ – static documentation
• client/ contains its own Dockerfile, README, and all UI code under client/client/src. Key folders:
• app/ – Next.js app routes (chat, upload, replay)
• components/ – reusable UI pieces (chat window, landing page, UI primitives)
• firebase/ – Firebase initialization
• pages/api/upload.ts – REST endpoint for file uploads
• server/ contains:
• app.py & routes.py – main HTTP/WebSocket entrypoints
• sio_wrapper.py – wraps Socket.IO for real-time messaging
• services/ – core business logic (architectural orchestrator, RAG engines, domain services, output parsing, report gen)
README for additional insights
• The server is called “PathwayVectorServer”—it uses the external pathway_lib_zipped.zip as a vector-store/processing engine.
• The backend runs in a virtual environment with dependencies in server/requirements.txt.