A React-based frontend for RAG (Retrieval-Augmented Generation) applications, built with TypeScript and Vite.
- Modern React 18 with TypeScript
- Chat interface for RAG interactions
- Responsive design with dark/light mode support
- Real-time message streaming support
- Clean, accessible UI with Lucide icons
- Node.js 18+
- npm or yarn
- Clone the repository
- Install dependencies:
npm install
Start the development server:
npm run devThe application will be available at http://localhost:3000.
Build for production:
npm run buildRun ESLint:
npm run lintsrc/
├── components/
│ ├── ChatInterface.tsx # Main chat component
│ ├── MessageList.tsx # Message display component
│ └── *.css # Component styles
├── App.tsx # Main application component
├── main.tsx # Application entry point
└── index.css # Global styles
The frontend expects a backend API endpoint at /api/chat that accepts POST requests with the following structure:
{
"message": "user question"
}And returns:
{
"response": "assistant response"
}- Vite configuration:
vite.config.ts - TypeScript configuration:
tsconfig.json,tsconfig.node.json - ESLint configuration:
eslint.config.js