A full-stack news chatbot that leverages Retrieval-Augmented Generation (RAG) to provide intelligent responses about news content. Users can engage in natural conversations about current events, with each session maintaining context and conversation history.
Verge consists of three main components:
- News Engine (verge-news-engine-repository): Handles crawling, preprocessing, and embedding news articles into Pinecone’s vector database.
- Frontend: React-based chat interface with session management
- Backend: Node.js API with vector search and AI integration
Frontend (React + Vite) ←→ Backend (Node.js + Express)
↓
Vector Search (Pinecone)
↓
AI Chat (Google Gemini)
↓
Database (PostgreSQL + Redis)
- Intelligent Chat: Context-aware conversations about news topics
- Session Management: Persistent chat sessions with conversation memory
- Semantic Search: Vector-based news content retrieval
- Real-time Interface: Responsive chat UI with typing indicators
- Session History: Browse and resume previous conversations
- React 19 with TypeScript
- Vite for build tooling
- Tailwind CSS for styling
- Radix UI components
- Axios for API communication
- Node.js 18+ with TypeScript
- Express.js framework
- PostgreSQL (Neon) with Drizzle ORM
- Redis for session caching
- Pinecone for vector search
- Google Gemini for AI responses
- Node.js 18.0.0 or higher
- PostgreSQL database (Neon recommended)
- Google Gemini API key
- Pinecone account
-
Clone the repository
git clone https://github.com/MuhammedBasith/verge.git cd verge -
Backend Setup
cd backend npm install cp .env.example .env # Configure your environment variables npm run db:migrate npm run dev
-
Frontend Setup
cd frontend npm install cp .env.example .env # Configure API endpoint npm run dev
The application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3000
verge/
├── frontend/ # React application
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── utils/ # Utility functions
│ │ └── lib/ # Shared libraries
│ └── README.md # Frontend documentation
├── backend/ # Node.js API
│ ├── src/
│ │ ├── controllers/ # Request handlers
│ │ ├── services/ # Business logic
│ │ ├── models/ # Database schemas
│ │ ├── routes/ # API routes
│ │ └── config/ # Configuration
│ ├── README.md # Backend documentation
│ └── SETUP_GUIDE.md # Detailed setup instructions
└── README.md # This file
POST /api/sessions- Create new chat sessionPOST /api/chat- Send message and get AI responseGET /api/chat/history/:sessionId- Retrieve conversation historyGET /api/sessions- List user sessionsGET /api/health- System health check
Both frontend and backend require environment configuration:
- Backend: Database credentials, API keys, Redis configuration
- Frontend: API endpoint configuration
See individual README files in each directory for detailed configuration options.
# Terminal 1 - Backend
cd backend && npm run dev
# Terminal 2 - Frontend
cd frontend && npm run dev# Backend
cd backend
npm run lint
npm run format
# Frontend
cd frontend
npm run lint- Frontend Documentation - React app setup and architecture
- Backend Documentation - API architecture and services
- Setup Guide - Detailed installation instructions
- API Documentation - Complete API reference
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
MIT License - see LICENSE file for details.