AI-Powered Academic Assistant for Intelligent Document Analysis
Smart Campus is a full-stack application designed to help students and researchers navigate complex academic materials. By leveraging Large Language Models (LLMs) and Vector Search, it allows users to index PDFs, ask questions, generate summaries, and find precise citations in seconds.
- π Intelligent PDF Indexing: Upload and process academic documents for instant retrieval.
- π Multiple AI Study Modes:
- Summarized Note: Get structural summaries of complex chapters.
- Q&A: Generate practice questions and explanatory answers.
- Find Pages: Exact page-number citations for facts and figures.
- π Hybrid Search: Combines literal string matching with AI-powered vector similarity (ChromaDB).
- π Parallel Intelligence: Uses a "Best of All" logic by querying multiple LLMs (Gemini, OpenAI) simultaneously.
- π Secure Auth: JWT-based user registration and login system.
- π¬ Real-time Chat: Interactive glassmorphism UI with WebSocket-driven responses.
- Framework: FastAPI (Python)
- AI Orchestration: LangChain & LangGraph
- Database: MongoDB (User data & Chat history)
- Vector Store: ChromaDB (Document indexing)
- LLMs: Google Gemini 2.0 Flash, OpenAI, DeepSeek (via OpenRouter)
- Library: React 19 + Vite
- Styling: Vanilla CSS (Glassmorphism design system)
- Communication: WebSockets & REST API
graph TD
User((Student)) --> Frontend[React + Vite UI]
Frontend --> Auth[JWT Authentication]
Frontend --> Backend[FastAPI Core]
Backend --> AI[LangChain + LangGraph]
AI --> LLM[Gemini / OpenAI / DeepSeek]
Backend --> DB[(MongoDB: User Data)]
Backend --> VDB[(ChromaDB: Vector Search)]
- Python 3.10+
- Node.js 18+
- MongoDB (Local or Atlas)
- Navigate to the backend folder:
cd backend - Install dependencies:
pip install -r requirements.txt
- Configure environment variables (create a
.envfile):MONGODB_URI=mongodb://localhost:27017 OPENAI_API_KEY=your_key GEMINI_API_KEY=your_key
- Run the API:
python -m uvicorn main:app --reload --port 8002
- Navigate to the frontend folder:
cd frontend - Install packages:
npm install
- Start the development server:
npm run dev
- Login/Register: Create an account to persist your chat history and notes.
- Upload PDF: Use the folder icon in the chat to upload a textbook or paper.
- Select Mode: Use the mode switcher (π, β, π) to tell the AI how to focus.
- Search: Prefix a query with
search for:to perform a literal page search.