A Next.js-based Retrieval-Augmented Generation (RAG) application that allows users to upload, index, and chat with their documents (CSV, PDF, and URLs). The app provides a chat interface for querying indexed data and supports document management features.
- Upload and index documents (CSV, PDF, URLs)
- Chat interface for querying indexed data
- Document management panel
- Sidebar for navigation
- Modern UI built with Next.js and TypeScript
- API endpoints for chat and document operations
├── app/
│ ├── api/ # API routes for chat, collections, and document ingestion
│ ├── components/ # React components (ChatInterface, DocumentPanel, etc.)
│ ├── globals.css # Global styles
│ ├── layout.tsx # App layout
│ └── page.tsx # Main page
├── lib/ # Utility functions
├── public/ # Static assets
├── types/ # TypeScript types
├── uploads/ # Uploaded files
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── next.config.ts # Next.js configuration
├── docker-compose.yml # Docker setup
└── README.md # Project documentation
- Node.js (v18+ recommended)
- npm or yarn
- Clone the repository:
git clone https://github.com/Shub4am/rag-app.git cd rag-app - Install dependencies:
npm install # or yarn install - Start the development server:
npm run dev # or yarn dev - Open http://localhost:3000 in your browser.
- Upload documents via the interface.
- Use the chat to ask questions about your documents.
- Manage your documents in the document panel.
npm run dev— Start the development servernpm run build— Build for productionnpm run start— Start the production servernpm run lint— Lint the codebase
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.