Skip to content

CSEC-ASTU/bootcamp1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

56 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Smart Campus πŸŽ“

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.


✨ Key Features

  • πŸ“ 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.

πŸ›  Tech Stack

Backend

  • 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)

Frontend

  • Library: React 19 + Vite
  • Styling: Vanilla CSS (Glassmorphism design system)
  • Communication: WebSockets & REST API

πŸ— System Architecture

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)]
Loading

πŸš€ Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • MongoDB (Local or Atlas)

1. Backend Setup

  1. Navigate to the backend folder:
    cd backend
  2. Install dependencies:
    pip install -r requirements.txt
  3. Configure environment variables (create a .env file):
    MONGODB_URI=mongodb://localhost:27017
    OPENAI_API_KEY=your_key
    GEMINI_API_KEY=your_key
  4. Run the API:
    python -m uvicorn main:app --reload --port 8002

2. Frontend Setup

  1. Navigate to the frontend folder:
    cd frontend
  2. Install packages:
    npm install
  3. Start the development server:
    npm run dev

πŸ“– Usage Guide

  1. Login/Register: Create an account to persist your chat history and notes.
  2. Upload PDF: Use the folder icon in the chat to upload a textbook or paper.
  3. Select Mode: Use the mode switcher (πŸ“, ❓, πŸ”) to tell the AI how to focus.
  4. Search: Prefix a query with search for: to perform a literal page search.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5