⚠️ Important Notice
It is strongly recommended to run this application locally using your own Google Gemini API key. The publicly deployed version is intended only as a demo and may be rate-limit heavily, become unavailable without notice, or incur unexpected costs when usage spikes. Running it locally gives you full control, unlimited usage (subject to your own key’s quota), and guarantees data privacy.
AI Knowledge Hub is a powerful Retrieval-Augmented Generation (RAG) platform that transforms static PDF documents into an interactive "Second Brain."
Users can upload textbooks, research papers, or legal documents and instantly receive concise summaries, study flashcards, and a semantic chat interface to ask deep questions about the content.
It leverages Google Gemini 2.5 Flash for high-speed, cost-effective analysis and ChromaDB for local vector storage, ensuring a privacy-first, zero-cost deployment architecture.
- PDF Ingestion Engine: Parses complex PDFs, splits them into semantic chunks, and creates vector embeddings
- Instant Executive Summary: Generates a 5-point summary immediately after upload
- Study Flashcards: AI-generated flashcards for active recall
- RAG Chat: Ask questions and get context-aware answers strictly from the document
- Bring Your Own Key (BYOK): API key is never stored — privacy-first
- Fully Dockerized: One-command setup on any OS
- Next.js 14 • Tailwind CSS • Shadcn/UI • Framer Motion • Lucide Icons
- FastAPI • LangChain • ChromaDB (Embedded) • Google Gemini 2.5 Flash
- Docker + Docker Compose • Vercel (Frontend) • Render (Backend)
- Docker Desktop
- Git
git clone https://github.com/yourusername/ai-knowledge-hub.git
cd ai-knowledge-hubdocker compose up --build- Frontend:
http://localhost:3000 - Backend API docs:
http://localhost:8000/docs - Mobile on same WiFi:
http://<your-local-ip>:3000
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000cd frontend
npm install
npm run dev- Create new Web Service → Runtime: Docker → Root Directory: backend
- Add environment variable:
GOOGLE_API_KEY=your_key_here- Deploy → copy the backend URL
- Import the repo
- Set root directory to /frontend
- Add environment variable:
NEXT_PUBLIC_API_URL=https://your-backend.onrender.com- Deploy
ai-knowledge-hub/
├── backend/
│ ├── chroma_db/
│ ├── Dockerfile
│ ├── main.py
│ ├── rag.py
│ └── requirements.txt
├── frontend/
│ ├── Dockerfile
│ ├── src/
│ │ ├── app/
│ │ ├── components/
│ │ └── lib/
│ └── public/
├── docker-compose.yml
├── package.json
└── README.md- Fork the repo
- Create your feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Open a Pull Request
- Released under the MIT License.
- Built with ❤️ by Samarth Saxena