Yantr is an AI-powered study assistant built for engineering students. It combines a RAG (Retrieval Augmented Generation) pipeline with an organized library of study materials, enabling precise, context-aware answers sourced directly from indexed course documents.
| Feature | Description |
|---|---|
| RAG Chatbot | Streams GPT-4o-mini responses grounded in your indexed PDFs via Pinecone |
| Study Library | Organized browser for PDFs — Physics, Chemistry, C Programming, CPS, Statistics, FCPS |
| Vision Support | Upload images alongside questions for multimodal AI assistance |
| Contribution Pipeline | Students submit PDFs via UI → GitHub PR auto-created → Admin merges to publish |
| Auth & Quotas | Clerk authentication + Upstash Redis rate limiting (10 messages/day) |
| Streaming Responses | Real-time streamed AI output using Vercel AI SDK |
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript |
| Styling | Tailwind CSS v4, Framer Motion |
| AI / LLM | OpenAI GPT-4o-mini (@ai-sdk/openai) |
| Vector DB | Pinecone (text-embedding-3-small) |
| Auth | Clerk |
| Rate Limiting | Upstash Redis |
| Contribution API | Octokit (@octokit/rest) → GitHub REST API |
| Deployment | Vercel |
| Python Backend | pdfplumber, langchain, openai (for RAG indexing) |
Yantr-chatbot/
├── frontend/ # Next.js application
│ ├── src/
│ │ ├── app/
│ │ │ ├── api/
│ │ │ │ ├── chat/ # Streaming RAG chat endpoint
│ │ │ │ ├── contribute/ # GitHub PR creation endpoint
│ │ │ │ ├── history/ # Chat history (Upstash Redis)
│ │ │ │ ├── quota/ # Daily message quota API
│ │ │ │ └── theory/ # Study material file server
│ │ │ ├── contribute/ # User contribution form page
│ │ │ ├── resources/ # Study materials browser page
│ │ │ └── page.tsx # Home / Chat interface
│ │ ├── components/ # Reusable React components
│ │ └── lib/ # Pinecone, Upstash, Clerk helpers
│ ├── public/
│ │ └── manuals/ # PDFs served to users
│ └── package.json
│
└── backend/ # Python data processing
├── scripts/
│ ├── upload_vectors.py # Indexes PDFs into Pinecone
│ └── generate-theory-index.js
└── data/
└── knowledge_base/ # Source documents (FCPS, Stats, CPS...)
- Node.js 18+
- Python 3.9+ (for indexing only)
git clone https://github.com/aryawadhwa/Yantr-chatbot.git
cd Yantr-chatbot/frontend
npm installCreate frontend/.env.local:
# AI
OPENAI_API_KEY=sk-...
# Vector DB
PINECONE_API_KEY=...
PINECONE_INDEX_NAME=yantr-knowledge-base
# Auth
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_...
CLERK_SECRET_KEY=sk_...
# Rate Limiting
UPSTASH_REDIS_REST_URL=https://...
UPSTASH_REDIS_REST_TOKEN=...
# Contribution Pipeline (GitHub Fine-grained PAT)
# Scopes required: Contents (read/write), Pull Requests (read/write)
GITHUB_PAT=github_pat_...cd frontend
npm run devOpen http://localhost:3000.
To embed course documents into Pinecone:
# Setup Python environment
cd backend
python -m venv venv
source venv/bin/activate # macOS/Linux
pip install pdfplumber langchain-text-splitters openai pinecone python-dotenv
# Add PDFs to backend/data/knowledge_base/
# Then run the indexer
python scripts/upload_vectors.pyStudents can submit study materials directly from the web UI:
- Navigate to
/contributeon the site. - Select a course, enter a filename, and upload a PDF.
- The server calls the GitHub API to create a new branch and PR with the file placed in both
public/manuals/anddata/knowledge_base/. - An admin reviews and merges the PR on GitHub — Vercel auto-deploys the update.
- Push code to GitHub.
- Import the repository on vercel.com.
- Set Root Directory to
frontend. - Add all environment variables from
.env.localin Project Settings. - Click Deploy.
| Name | Role |
|---|---|
| Arya Wadhwa | CEO & Co-Founder |
| Dilraj Singh | CTO & Co-Founder |
| Aadarsh KR | Co-Founder |
| Harsha S | Co-Founder |