An intelligent AI chatbot built for sports fans and analysts 🧠⚽.
It leverages LangChain, FAISS, and Groq LLM to deliver fast, context-aware answers based on your custom sports data.
Developed using a FastAPI backend and a Next.js frontend with a clean, responsive UI.
- Conversational Q&A powered by RAG (Retrieval-Augmented Generation)
- Context-aware answers with document citations
- Streamed responses from Groq LLM for real-time interaction
- Upload sports-related documents (CSV, TXT, or PDFs)
- Automatically chunked and embedded in FAISS vector store
- Fast semantic similarity search and context retrieval
- Sleek Next.js + Tailwind CSS design
- Real-time chat bubbles with typing animations
- Mobile-friendly and dark-mode optimized
- FastAPI for async performance
- LangChain integration for pipeline management
- FAISS for lightweight local vector search
graph TD A[Frontend (Next.js)] -->|Query| B(FastAPI Backend) B --> C{RAG Pipeline} C --> D[FAISS Vector DB] C --> E[Groq LLM API] E -->|Streamed Response| A
- Python ≥ 3.9
- Node.js ≥ 18
- Groq API Key
🧩 1. Clone the Repository
git clone https://github.com/<your-username>/sports-chatbot.git
cd sports-chatbot🧠 2. Backend Setup (FastAPI)
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt🔐 Configure Environment Variables
Create a .env file inside the backend folder:
GROQ_API_KEY=your-groq-api-keyuvicorn main:app --reload💻 3. Frontend Setup (Next.js)
cd frontend
npm install
npm run dev⚡ API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/chat |
POST | Send a question to the AI chatbot |
/health |
GET | Health check |
🧱 Project Structure
sports-chatbot/
├── Backend/
│ ├── main.py # FastAPI entry point
│ ├── sports_data/ # Uploaded sports documents
│ ├── vector_store/ # FAISS vector database
│ └── .env # Environment variables
│
├── Frontend/
│ ├── public/ # Public assets
│ ├── src/ # Source code (pages, components, styles)
│ ├── .gitignore
│ ├── biome.json
│ ├── next-env.d.ts
│ ├── next.config.ts
│ ├── package-lock.json
│ ├── package.json
│ └── postcss.config.mjs
│
├── docs/ # Screenshots and documentation
├── .gitignore
├── README.md
└── requirements.txt☁️ Environment Variables
| Variable | Description |
|---|---|
GROQ_API_KEY |
API key for Groq LLM |
🧠 Tech Stack
| Layer | Technologies |
|---|---|
| Frontend | Next.js, Tailwind CSS, Axios |
| Backend | FastAPI, LangChain |
| Vector DB | FAISS |
| LLM | Groq API |
| Version Control | Git + GitHub |
Check out the demo video above or explore the live preview below 👇
Contributions are always welcome! To contribute:
- Fork this repository
- Create your feature branch:
git checkout -b feature/YourFeature - Commit your changes:
git commit -m "Add YourFeature" - Push to the branch:
git push origin feature/YourFeature - Open a Pull Request 🚀
- LangChain – For document processing pipelines
- FAISS – For efficient vector search
- Groq – For fast inference and streaming
- FastAPI – Modern Python backend framework
- Next.js – Interactive frontend framework
This project is licensed under the MIT License – feel free to use and modify.
Abinan Ketheeswaram
AI Developer • Sports Enthusiast • Open-Source Contributor
Built with 🧠 Python, ⚡ Next.js, and ❤️ for innovation.

