Skip to content

Daku3011/Class-Intelligence-System

Repository files navigation

🎓 Class Intelligence System (CIS)

Empowering Departments with AI-Driven Knowledge.
Effortlessly query lecture notes, assignments, and exam papers using the power of RAG and Google Gemini.

FastAPI Next.js Google Gemini Tailwind CSS v4 ngrok


✨ Core Features

  • 🧠 Advanced RAG Engine: Retrieval-Augmented Generation using ChromaDB for pinpoint accurate context retrieval from uploaded PDFs.
  • ⚡ Google Gemini Integration: Leverages Gemini 1.5 Flash for intelligent, low-latency responses and document analysis.
  • 🔐 Enterprise-Grade Auth: Custom authentication system using bcrypt with SHA-256 pre-hashing, ensuring unlimited password length support and top-tier security.
  • 🖼️ Modern Aesthetics: A premium UI built with Next.js 15+ and Tailwind CSS v4, featuring glassmorphism effects and seamless navigation.
  • 🌐 Cloud-Ready Networking: Integrated ngrok multi-tunnel configuration for instant, secure public access to both frontend and backend.

🛠️ Technology Stack

Backend (Intelligence Layer)

  • Framework: FastAPI (Asynchronous Python)
  • AI Orchestration: LangChain
  • Vector Search: ChromaDB
  • Database: SQLModel (SQLAlchemy + Pydantic)
  • Security: Custom Bcrypt + JWT

Frontend (Interface Layer)

  • Framework: Next.js 15+ (App Router)
  • Styling: Tailwind CSS v4
  • API Client: Standardized Fetch with ngrok-bypass headers
  • Icons: Lucide React

🚀 Installation & Setup

1. 🏗️ Backend Setup

Navigate to the backend directory and install dependencies:

cd backend
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

Configure your .env file:

DATABASE_URL=sqlite:///./cis.db
SECRET_KEY=yoursecretkey
GOOGLE_API_KEY=your-gemini-key

Run the server:

uvicorn app.main:app --reload

2. ⚛️ Frontend Setup

Navigate to the frontend directory and install packages:

cd frontend
npm install
npm run dev

3. 🌐 Public Access (ngrok)

Share your project instantly using the multi-tunnel configuration:

ngrok start --all --config ngrok-cis.yml

📂 Project Structure

  • backend/app/routers: API endpoints for Auth, Document Processing, and Chat.
  • backend/app/services: Core logic for RAG (VectorStore) and Document Analysis (DocumentProcessor).
  • frontend/src/app: Modern Next.js pages including the Faculty Dashboard and Student Chat.
  • frontend/src/lib: Centralized apiFetch with built-in ngrok warning bypass.

📝 Usage

  1. Faculty: Upload PDF documents via the Dashboard to build the knowledge base.
  2. Student: Navigate to AI Chat to ask complex questions based on the uploaded material.
  3. Admin: Monitor system health and user activity.

⚖️ License

Distributed under the MIT License. See LICENSE for more information.

Developed with ❤️ for Advanced Academic Intelligence.

About

An AI-powered RAG system that functions as a 'Department ChatGPT,' allowing students to query notes, PDFs, and exam papers for instant, sourced answers.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors