NewsMate is a responsive, modern web client built using React, Vite, and Tailwind CSS. It provides a conversational interface for querying the latest news, backed by a powerful Retrieval-Augmented Generation (RAG) system running on the server.
This frontend communicates with the backend via REST APIs and WebSockets, maintains per-session histories, and renders chatbot responses in markdown.
client/
βββ components/ # Reusable UI components
βββ pages/ # Route-specific views
βββ services/ # API utilities (axios)
βββ App.jsx # Main app wrapper with routing
βββ main.jsx # Entry point
Prerequisites
Install dependencies
npm install
Run in development mode
npm run dev
Build for production
npm run build
Preview production build
```bash
npm run preview
The frontend interacts with the backend via the following endpoints:
| Route | Method | Description |
| -------------- | ------ | --------------------------------- |
| /chat
| POST
| Send user message to Gemini + RAG |
| /history/:id
| GET
| Retrieve session chat history |
| /reset
| POST
| Clear a sessionβs Redis cache |