diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..2e7bb274c7b1600e5e1a48d033702ff8f15f9b91 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +# Never bake secrets or local cruft into the image +.env +.git +.gitignore +__pycache__/ +*.pyc +.venv/ +venv/ +*.log diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..813ea2a41ac7d86295503be3af1ffd226f57d5b0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,40 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.faiss filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b7a5095d519d1addff1b5bdb1886c9a9637936a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +# Secrets — NEVER commit (contains the Supabase service-role key + NVIDIA key) +.env + +# Python +__pycache__/ +*.pyc +.venv/ +venv/ +*.log + +# Note: vector_db/, images/ and documents/ ARE committed on purpose so the +# deployed app ships with the policy index already built. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..78af158e45974859f646fe1922d321eb09106655 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +# Docent AI — container image for free deployment (Hugging Face Spaces / Render / Fly.io) +FROM python:3.11-slim + +WORKDIR /app + +# Install Python dependencies first (better layer caching) +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +# Copy the whole project (includes the pre-built vector_db/ and images/) +COPY . . + +# These dirs must exist at startup: StaticFiles mounts images/, and uploads +# write into documents/ + vector_db/. +RUN mkdir -p documents images vector_db + +# Hugging Face Spaces expects the app on port 7860 by default. +EXPOSE 7860 + +WORKDIR /app/backend +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c73c7796b15152dfd0a573311d0882e64170ca4f --- /dev/null +++ b/README.md @@ -0,0 +1,182 @@ +--- +title: Docent AI Policy Chatbot +emoji: 📚 +colorFrom: green +colorTo: gray +sdk: docker +app_port: 7860 +pinned: false +--- + +# Docent AI — NVIDIA RAG Policy Chatbot + +A production-ready Retrieval-Augmented Generation (RAG) chatbot that answers questions strictly from uploaded policy PDFs. Powered by NVIDIA's `llama-3.3-70b-instruct` and LangChain, with Supabase-backed user accounts and persistent chat history. + +## Features + +- **User authentication** (Supabase email/password) — each user has their own private chats +- **Persistent chat history** — conversations are stored in Supabase and reload on login +- **Conversational memory** — follow-up questions ("what about for managers?") are understood using prior turns via a history-aware retriever +- Upload one or many PDF documents; they are indexed and **persisted** in a FAISS vector store +- Answers come **only from the documents** — the LLM is instructed never to hallucinate or use outside knowledge +- Every answer shows **source file + page number** references (persisted with history) +- Adding more PDFs at any time merges them into the existing index with no data loss + +## Project Structure + +``` +docent-ai-nvidia/ +├── .env # NVIDIA API key + Supabase keys +├── supabase_schema.sql # Run once in the Supabase SQL editor +├── requirements.txt +├── documents/ # Uploaded PDFs are stored here +├── vector_db/ # Persisted FAISS index +├── backend/ +│ ├── main.py # FastAPI app + auth + history endpoints +│ ├── rag.py # History-aware RAG engine +│ ├── db.py # Supabase auth + chat persistence +│ └── ingest.py # PDF ingestion + FAISS management +└── frontend/ + ├── index.html + ├── style.css + └── script.js +``` + +## Setup + +### 1. Install dependencies + +```powershell +cd c:\docent-ai-nvidia +pip install -r requirements.txt +``` + +### 2. Verify `.env` + +The `.env` file should contain: + +``` +NVIDIA_API_KEY=nvapi-... +SUPABASE_URL=https://.supabase.co +SUPABASE_ANON_KEY=eyJ... +SUPABASE_SERVICE_ROLE_KEY=eyJ... +``` + +### 3. Set up Supabase (one time) + +1. Open your project → **SQL Editor** → **New query**. +2. Paste the contents of `supabase_schema.sql` and click **Run**. This creates the + `chat_sessions` and `messages` tables with row-level security. +3. (Recommended for quick testing) Go to **Authentication → Providers → Email** and + turn **off** "Confirm email" so new sign-ups can log in immediately. Leave it on + in production and users will receive a confirmation email. + +### 4. Run the server + +From the project root: + +```powershell +cd c:\docent-ai-nvidia +run +``` + +Or double-click `run.bat`. Then open [http://localhost:8000](http://localhost:8000). + +### 5. Open the chatbot + +Go to [http://localhost:8000](http://localhost:8000) in your browser. + +## Deploy for free (Hugging Face Spaces) + +The repo ships a `Dockerfile` and the pre-built `vector_db/`, so the deployed app +works out of the box. Hugging Face Spaces' free tier gives 16 GB RAM (enough for the +heavy `faiss`/`langchain` deps) with no credit card. + +1. Create a free account at [huggingface.co](https://huggingface.co). +2. **New → Space**: pick a name, **SDK = Docker** (Blank template), visibility Public. +3. Push this project to the Space's git repo (or upload the files), e.g.: + +```bash +git init +git add . +git commit -m "Docent AI" +git remote add origin https://huggingface.co/spaces// +git push origin main +``` + +4. In the Space → **Settings → Variables and secrets**, add these **secrets**: + `NVIDIA_API_KEY`, `SUPABASE_URL`, `SUPABASE_ANON_KEY`, `SUPABASE_SERVICE_ROLE_KEY`. +5. Run `supabase_schema.sql` in the Supabase SQL Editor and turn **off** "Confirm email". +6. The Space builds and serves at `https://-.hf.space`. + +> `.env` is gitignored and never deployed — all keys come from Space secrets. +> Runtime PDF uploads are ephemeral on free tiers (they reset on rebuild); the +> committed `vector_db/` is what ships. Re-ingest locally and push to update it. + +## Usage + +1. **Upload PDFs** — drag-and-drop or click "Drop PDFs here" in the sidebar and click **Upload**. +2. **Ask questions** — type in the chat box and press Enter. +3. **See sources** — each answer shows which document and page the information came from. +4. **Add more documents** — upload additional PDFs at any time; they are merged into the existing index. + +## API Reference + +All routes except `/` and `/config` require a Supabase access token in the +`Authorization: Bearer ` header. + +| Method | Path | Description | +|--------|------|-------------| +| `GET` | `/` | Serves the chat UI | +| `GET` | `/config` | Public Supabase URL + anon key for the frontend | +| `POST` | `/upload` | Upload one or more PDF files (auth) | +| `GET` | `/documents` | List all ingested document filenames (auth) | +| `GET` | `/sessions` | List the user's conversations (auth) | +| `POST` | `/sessions` | Create a new conversation (auth) | +| `GET` | `/sessions/{id}/messages` | Load a conversation's messages (auth) | +| `DELETE` | `/sessions/{id}` | Delete a conversation (auth) | +| `POST` | `/chat` | Send a question, get an answer + sources (auth) | + +### `/chat` request body + +```json +{ + "question": "What is the leave policy?", + "session_id": "optional-existing-session-uuid" +} +``` + +If `session_id` is omitted, a new conversation is created automatically. + +### `/chat` response + +```json +{ + "answer": "According to the HR Policy document, employees are entitled to ...", + "sources": [ + { "file": "hr-policy.pdf", "page": 4, "image_urls": [] } + ], + "session_id": "…", + "title": "What is the leave policy?" +} +``` + +## How conversational memory works + +On each `/chat` call the backend loads the recent turns of that conversation from +Supabase and (a) rewrites the follow-up into a standalone question for retrieval, +and (b) passes the history to the LLM so references like "it" / "that policy" +resolve correctly. The strict "answer only from the documents" rule still applies. + +## Tech Stack + +| Component | Library | +|-----------|---------| +| LLM | `langchain-nvidia-ai-endpoints` — `ChatNVIDIA` (`meta/llama-3.3-70b-instruct`) | +| Embeddings | `NVIDIAEmbeddings` (`nvidia/nv-embedqa-e5-v5`) | +| Vector store | `faiss-cpu` (persisted to disk) | +| Auth & history | Supabase (Postgres + Auth) | +| PDF loading | `pypdf` via `PyPDFLoader` | +| Framework | `langchain` | +| Backend | `fastapi` + `uvicorn` | +| Frontend | HTML + CSS + Vanilla JS + `@supabase/supabase-js` | diff --git a/backend/Untitled b/backend/Untitled new file mode 100644 index 0000000000000000000000000000000000000000..25de988f6d4d497852978fef1951b78188f81660 --- /dev/null +++ b/backend/Untitled @@ -0,0 +1 @@ +python ingest_all.py diff --git a/backend/db.py b/backend/db.py new file mode 100644 index 0000000000000000000000000000000000000000..919f79f273ac8589aa95e47d2d9cfa8064697e47 --- /dev/null +++ b/backend/db.py @@ -0,0 +1,132 @@ +""" +Supabase integration: token verification + chat-history persistence. + +All database access here uses the *service-role* key, which bypasses Row Level +Security. Because of that, every query is explicitly scoped to the +authenticated user's id — never trust a client-supplied user id. +""" +import os +from pathlib import Path +from datetime import datetime, timezone + +from dotenv import load_dotenv +from supabase import create_client, Client + +load_dotenv(Path(__file__).parent.parent / ".env") + +SUPABASE_URL = os.environ.get("SUPABASE_URL", "").rstrip("/") +SUPABASE_ANON_KEY = os.environ.get("SUPABASE_ANON_KEY", "") +SERVICE_ROLE_KEY = os.environ.get("SUPABASE_SERVICE_ROLE_KEY", "") + +_admin: Client | None = None + + +def is_configured() -> bool: + return bool(SUPABASE_URL and SERVICE_ROLE_KEY and SUPABASE_ANON_KEY) + + +def admin() -> Client: + """Lazily create and reuse a single service-role client.""" + global _admin + if _admin is None: + if not is_configured(): + raise RuntimeError( + "Supabase is not configured. Set SUPABASE_URL, SUPABASE_ANON_KEY " + "and SUPABASE_SERVICE_ROLE_KEY in your .env file." + ) + _admin = create_client(SUPABASE_URL, SERVICE_ROLE_KEY) + return _admin + + +def _now() -> str: + return datetime.now(timezone.utc).isoformat() + + +# ── Auth ──────────────────────────────────────────────────────────────────── + +def verify_token(token: str): + """Validate a Supabase access token and return the user, or None.""" + try: + res = admin().auth.get_user(token) + return res.user if res else None + except Exception: + return None + + +# ── Sessions ────────────────────────────────────────────────────────────────── + +def create_session(user_id: str, title: str) -> dict: + res = ( + admin() + .table("chat_sessions") + .insert({"user_id": user_id, "title": title[:80] or "New chat"}) + .execute() + ) + return res.data[0] + + +def list_sessions(user_id: str) -> list[dict]: + res = ( + admin() + .table("chat_sessions") + .select("id, title, created_at, updated_at") + .eq("user_id", user_id) + .order("updated_at", desc=True) + .execute() + ) + return res.data or [] + + +def get_session(session_id: str, user_id: str) -> dict | None: + res = ( + admin() + .table("chat_sessions") + .select("*") + .eq("id", session_id) + .eq("user_id", user_id) + .limit(1) + .execute() + ) + return res.data[0] if res.data else None + + +def touch_session(session_id: str) -> None: + admin().table("chat_sessions").update({"updated_at": _now()}).eq("id", session_id).execute() + + +def rename_session(session_id: str, user_id: str, title: str) -> None: + admin().table("chat_sessions").update({"title": title[:80]}).eq("id", session_id).eq("user_id", user_id).execute() + + +def delete_session(session_id: str, user_id: str) -> None: + # messages cascade-delete via the foreign key + admin().table("chat_sessions").delete().eq("id", session_id).eq("user_id", user_id).execute() + + +# ── Messages ────────────────────────────────────────────────────────────────── + +def add_message(session_id: str, role: str, content: str, sources: list | None = None) -> dict: + res = ( + admin() + .table("messages") + .insert({ + "session_id": session_id, + "role": role, + "content": content, + "sources": sources or [], + }) + .execute() + ) + return res.data[0] + + +def list_messages(session_id: str) -> list[dict]: + res = ( + admin() + .table("messages") + .select("role, content, sources, created_at") + .eq("session_id", session_id) + .order("created_at") + .execute() + ) + return res.data or [] diff --git a/backend/ingest.py b/backend/ingest.py new file mode 100644 index 0000000000000000000000000000000000000000..4800dfe9fb055421af61f901d3e2ebac8e1ef38a --- /dev/null +++ b/backend/ingest.py @@ -0,0 +1,139 @@ +import os +import json +from pathlib import Path +from dotenv import load_dotenv +from langchain_community.document_loaders import PyPDFLoader +from langchain_text_splitters import RecursiveCharacterTextSplitter +from langchain_nvidia_ai_endpoints import NVIDIAEmbeddings +from langchain_community.vectorstores import FAISS + +load_dotenv(Path(__file__).parent.parent / ".env") + +VECTOR_DB_PATH = Path(__file__).parent.parent / "vector_db" +DOCUMENTS_PATH = Path(__file__).parent.parent / "documents" +IMAGES_PATH = Path(__file__).parent.parent / "images" + +CHUNK_SIZE = 1000 +CHUNK_OVERLAP = 200 +MIN_IMAGE_DIM = 80 # pixels — skip tiny icons / decorative elements + + +def get_embeddings() -> NVIDIAEmbeddings: + return NVIDIAEmbeddings( + model="nvidia/nv-embedqa-e5-v5", + api_key=os.environ["NVIDIA_API_KEY"], + truncate="END", + ) + + +# ── Image extraction ────────────────────────────────────────────────────────── + +def extract_images_from_pdf(pdf_path: str) -> dict[int, list[str]]: + """ + Extract images from every page of the PDF using PyMuPDF. + Returns a dict mapping page_number (0-based) → [image_filename, ...] + Only images larger than MIN_IMAGE_DIM × MIN_IMAGE_DIM are kept. + """ + try: + import fitz # PyMuPDF + except ImportError: + return {} + + pdf_name = Path(pdf_path).stem + page_images: dict[int, list[str]] = {} + doc = fitz.open(pdf_path) + + for page_num in range(len(doc)): + page = doc[page_num] + img_list = page.get_images(full=True) + saved = [] + + for img_idx, img_info in enumerate(img_list): + xref = img_info[0] + try: + base = doc.extract_image(xref) + except Exception: + continue + + w, h = base.get("width", 0), base.get("height", 0) + if w < MIN_IMAGE_DIM or h < MIN_IMAGE_DIM: + continue + + ext = base.get("ext", "png") + filename = f"{pdf_name}_p{page_num + 1}_i{img_idx + 1}.{ext}" + dest = IMAGES_PATH / filename + + if not dest.exists(): + dest.write_bytes(base["image"]) + + saved.append(filename) + + if saved: + page_images[page_num] = saved + + doc.close() + return page_images + + +# ── Text ingestion ──────────────────────────────────────────────────────────── + +def load_and_split_pdf(pdf_path: str, page_images: dict[int, list[str]]) -> list: + loader = PyPDFLoader(pdf_path) + pages = loader.load() + + splitter = RecursiveCharacterTextSplitter( + chunk_size=CHUNK_SIZE, + chunk_overlap=CHUNK_OVERLAP, + separators=["\n\n", "\n", ".", " ", ""], + ) + chunks = splitter.split_documents(pages) + + for chunk in chunks: + page_num = chunk.metadata.get("page", 0) # PyPDFLoader uses 0-based page + chunk.metadata["source"] = Path(pdf_path).name + # Attach image filenames for this page (stored as JSON string) + imgs = page_images.get(page_num, []) + chunk.metadata["images"] = json.dumps(imgs) + + return chunks + + +def ingest_pdf(pdf_path: str) -> int: + """ + Extract images, embed text chunks, merge into persisted FAISS index. + Returns the number of text chunks added. + """ + page_images = extract_images_from_pdf(pdf_path) + chunks = load_and_split_pdf(pdf_path, page_images) + + if not chunks: + return 0 + + embeddings = get_embeddings() + index_file = VECTOR_DB_PATH / "index.faiss" + + if index_file.exists(): + store = FAISS.load_local( + str(VECTOR_DB_PATH), + embeddings, + allow_dangerous_deserialization=True, + ) + store.add_documents(chunks) + else: + store = FAISS.from_documents(chunks, embeddings) + + store.save_local(str(VECTOR_DB_PATH)) + return len(chunks) + + +def load_vector_store() -> FAISS | None: + """Load the persisted FAISS index. Returns None if no index exists yet.""" + index_file = VECTOR_DB_PATH / "index.faiss" + if not index_file.exists(): + return None + embeddings = get_embeddings() + return FAISS.load_local( + str(VECTOR_DB_PATH), + embeddings, + allow_dangerous_deserialization=True, + ) diff --git a/backend/main.py b/backend/main.py new file mode 100644 index 0000000000000000000000000000000000000000..e3b000ea966053e4221dee73098529a17f4852e6 --- /dev/null +++ b/backend/main.py @@ -0,0 +1,200 @@ +import shutil +from pathlib import Path +from contextlib import asynccontextmanager + +from fastapi import FastAPI, UploadFile, File, HTTPException, Depends, Header +from fastapi.staticfiles import StaticFiles +from fastapi.responses import FileResponse +from pydantic import BaseModel +from dotenv import load_dotenv + +from ingest import ingest_pdf, load_vector_store, DOCUMENTS_PATH, IMAGES_PATH +from rag import build_engine +import db + +load_dotenv(Path(__file__).parent.parent / ".env") + +FRONTEND_PATH = Path(__file__).parent.parent / "frontend" + +# Global RAG state loaded once at startup and refreshed after uploads +_engine = None + + +def refresh_rag(): + global _engine + store = load_vector_store() + _engine = build_engine(store) if store is not None else None + + +@asynccontextmanager +async def lifespan(app: FastAPI): + refresh_rag() + yield + + +app = FastAPI(title="Docent AI — Policy Chatbot", lifespan=lifespan) + +# Serve frontend static files and extracted images +app.mount("/static", StaticFiles(directory=str(FRONTEND_PATH)), name="static") +app.mount("/images", StaticFiles(directory=str(IMAGES_PATH)), name="images") + + +# ---------- Models ---------- + +class ChatRequest(BaseModel): + question: str + session_id: str | None = None + + +class ChatResponse(BaseModel): + answer: str + sources: list[dict] + session_id: str + title: str + + +# ---------- Auth dependency ---------- + +async def get_current_user(authorization: str | None = Header(default=None)): + if not authorization or not authorization.lower().startswith("bearer "): + raise HTTPException(status_code=401, detail="Not authenticated.") + token = authorization.split(" ", 1)[1].strip() + user = db.verify_token(token) + if user is None: + raise HTTPException(status_code=401, detail="Invalid or expired session.") + return user + + +def _attach_image_urls(sources: list[dict]) -> list[dict]: + for src in sources: + src["image_urls"] = [f"/images/{fname}" for fname in src.get("images", [])] + return sources + + +# ---------- Routes ---------- + +@app.get("/") +async def root(): + return FileResponse(str(FRONTEND_PATH / "index.html")) + + +@app.get("/config") +async def config(): + """Public config the frontend needs to initialise Supabase auth.""" + return { + "supabaseUrl": db.SUPABASE_URL, + "supabaseAnonKey": db.SUPABASE_ANON_KEY, + "configured": db.is_configured(), + } + + +@app.post("/upload") +async def upload_documents( + files: list[UploadFile] = File(...), + user=Depends(get_current_user), +): + """Accept one or more PDF files, ingest them into the FAISS store.""" + if not files: + raise HTTPException(status_code=400, detail="No files provided.") + + results = [] + for upload in files: + if not upload.filename.lower().endswith(".pdf"): + results.append({"file": upload.filename, "status": "skipped — not a PDF"}) + continue + + dest = DOCUMENTS_PATH / upload.filename + with open(dest, "wb") as f: + shutil.copyfileobj(upload.file, f) + + try: + chunks = ingest_pdf(str(dest)) + results.append({"file": upload.filename, "status": "ingested", "chunks": chunks}) + except Exception as e: + results.append({"file": upload.filename, "status": f"error: {e}"}) + + refresh_rag() + return {"results": results} + + +@app.get("/documents") +async def list_documents(user=Depends(get_current_user)): + """List all PDF filenames stored in the documents folder.""" + pdfs = sorted( + p.name for p in DOCUMENTS_PATH.iterdir() if p.suffix.lower() == ".pdf" + ) + return {"documents": pdfs} + + +# ---------- Sessions / history ---------- + +@app.get("/sessions") +async def get_sessions(user=Depends(get_current_user)): + return {"sessions": db.list_sessions(user.id)} + + +@app.post("/sessions") +async def new_session(user=Depends(get_current_user)): + sess = db.create_session(user.id, "New chat") + return sess + + +@app.get("/sessions/{session_id}/messages") +async def get_session_messages(session_id: str, user=Depends(get_current_user)): + if db.get_session(session_id, user.id) is None: + raise HTTPException(status_code=404, detail="Conversation not found.") + messages = db.list_messages(session_id) + for m in messages: + if m.get("sources"): + _attach_image_urls(m["sources"]) + return {"messages": messages} + + +@app.delete("/sessions/{session_id}") +async def remove_session(session_id: str, user=Depends(get_current_user)): + db.delete_session(session_id, user.id) + return {"ok": True} + + +@app.post("/chat", response_model=ChatResponse) +async def chat(req: ChatRequest, user=Depends(get_current_user)): + if not req.question.strip(): + raise HTTPException(status_code=400, detail="Question cannot be empty.") + + if _engine is None: + raise HTTPException( + status_code=503, + detail="No documents have been ingested yet. Please upload policy PDFs first.", + ) + + # Resolve or create the conversation + if req.session_id: + session = db.get_session(req.session_id, user.id) + if session is None: + raise HTTPException(status_code=404, detail="Conversation not found.") + else: + title = req.question.strip()[:60] + session = db.create_session(user.id, title) + + session_id = session["id"] + + # Load prior turns BEFORE storing the new question, to use as memory + history = db.list_messages(session_id) + + db.add_message(session_id, "user", req.question) + + try: + answer, sources = _engine.answer(req.question, history) + except Exception as e: + raise HTTPException(status_code=500, detail=f"LLM error: {e}") + + _attach_image_urls(sources) + db.add_message(session_id, "assistant", answer, sources) + db.touch_session(session_id) + + return ChatResponse( + answer=answer, + sources=sources, + session_id=session_id, + title=session["title"], + ) diff --git a/backend/rag.py b/backend/rag.py new file mode 100644 index 0000000000000000000000000000000000000000..06e6d60877e1459fd6b06d0dbf5691dc84215567 --- /dev/null +++ b/backend/rag.py @@ -0,0 +1,139 @@ +import os +import json +from pathlib import Path +from dotenv import load_dotenv +from langchain_nvidia_ai_endpoints import ChatNVIDIA +from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder +from langchain_core.messages import HumanMessage, AIMessage +from langchain_core.output_parsers import StrOutputParser +from langchain_community.vectorstores import FAISS + +load_dotenv(Path(__file__).parent.parent / ".env") + +# A larger instruction-tuned model gives noticeably better policy reasoning and +# more reliable "I don't know" refusals than the 8B model. Free on NVIDIA NIM. +CHAT_MODEL = os.environ.get("CHAT_MODEL", "meta/llama-3.3-70b-instruct") +RETRIEVE_K = 5 +HISTORY_TURNS = 6 # how many prior messages to feed back as conversation memory + +SYSTEM_PROMPT = """You are a strict policy assistant. Your ONLY job is to answer questions \ +using the document excerpts provided below as context. + +Rules you must NEVER break: +1. Answer ONLY using information found in the context below. +2. Do NOT use any outside knowledge, assumptions, or information not present in the context. +3. Do NOT make up, infer, or guess any information that is not explicitly stated in the context. +4. If the answer is not present in the context, respond with exactly: + "I don't have information about that in the provided documents." +5. When answering, be concise and quote or closely paraphrase the relevant policy text. +6. Do not greet the user or add filler phrases. +7. The conversation history is provided only to resolve references (e.g. "it", "that policy"). + You must STILL answer the latest question solely from the context excerpts below. + +Context from documents: +{context} +""" + +# Used to turn a follow-up question into a standalone one for retrieval. +CONDENSE_PROMPT = """Given the conversation history and a follow-up question, rewrite the \ +follow-up as a single standalone question that can be understood without the history. +Only output the rewritten question — no preamble, no explanation. +If the question is already standalone, return it unchanged.""" + + +def format_docs(docs: list) -> str: + parts = [] + for i, doc in enumerate(docs, 1): + source = doc.metadata.get("source", "unknown") + page = doc.metadata.get("page", "?") + parts.append(f"[Excerpt {i} | File: {source} | Page: {page}]\n{doc.page_content}") + return "\n\n---\n\n".join(parts) + + +def _to_lc_messages(history: list[dict]) -> list: + """Convert stored {role, content} dicts into LangChain message objects.""" + msgs = [] + for h in history[-HISTORY_TURNS:]: + if h.get("role") == "user": + msgs.append(HumanMessage(content=h.get("content", ""))) + elif h.get("role") == "assistant": + msgs.append(AIMessage(content=h.get("content", ""))) + return msgs + + +def _sources_from_docs(docs: list) -> list[dict]: + seen = set() + sources = [] + for doc in docs: + source = doc.metadata.get("source", "unknown") + page = doc.metadata.get("page", "?") + key = (source, page) + if key in seen: + continue + seen.add(key) + raw_imgs = doc.metadata.get("images", "[]") + try: + images = json.loads(raw_imgs) if isinstance(raw_imgs, str) else raw_imgs + except Exception: + images = [] + sources.append({"file": source, "page": page, "images": images}) + return sources + + +class RagEngine: + """Holds the retriever + LLM and answers questions with optional memory.""" + + def __init__(self, vector_store: FAISS): + self.retriever = vector_store.as_retriever( + search_type="similarity", + search_kwargs={"k": RETRIEVE_K}, + ) + self.llm = ChatNVIDIA( + model=CHAT_MODEL, + api_key=os.environ["NVIDIA_API_KEY"], + temperature=0.0, + max_tokens=1024, + ) + + self.answer_prompt = ChatPromptTemplate.from_messages([ + ("system", SYSTEM_PROMPT), + MessagesPlaceholder("history"), + ("human", "{question}"), + ]) + + self.condense_prompt = ChatPromptTemplate.from_messages([ + ("system", CONDENSE_PROMPT), + MessagesPlaceholder("history"), + ("human", "{question}"), + ]) + self.condense_chain = self.condense_prompt | self.llm | StrOutputParser() + + def _standalone_question(self, question: str, history_msgs: list) -> str: + if not history_msgs: + return question + try: + rewritten = self.condense_chain.invoke({"history": history_msgs, "question": question}) + return rewritten.strip() or question + except Exception: + return question + + def answer(self, question: str, history: list[dict] | None = None) -> tuple[str, list[dict]]: + """Return (answer_text, sources). History is a list of {role, content}.""" + history_msgs = _to_lc_messages(history or []) + search_query = self._standalone_question(question, history_msgs) + + docs = self.retriever.invoke(search_query) + context = format_docs(docs) + sources = _sources_from_docs(docs) + + chain = self.answer_prompt | self.llm | StrOutputParser() + answer = chain.invoke({ + "context": context, + "history": history_msgs, + "question": question, + }) + return answer, sources + + +def build_engine(vector_store: FAISS) -> RagEngine: + return RagEngine(vector_store) diff --git a/documents/.gitkeep b/documents/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/documents/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3.pdf b/documents/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..01f006a7b6e99060249a49187f24f083047c2f11 --- /dev/null +++ b/documents/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:732dfcfa873e0cf2cbde055ed485e63e1636dbc6cf495f3c0381cca7fba45b77 +size 278891 diff --git a/documents/A013-Policy-for-Workload-Relief-of-PhD-Scholars-V2.pdf b/documents/A013-Policy-for-Workload-Relief-of-PhD-Scholars-V2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a59177b206e759db6f9f4749db41a5031e34bf71 --- /dev/null +++ b/documents/A013-Policy-for-Workload-Relief-of-PhD-Scholars-V2.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:461dfaa73def42665a09ca375fcbfe61b5e8fc1b8918b9f668eeee71df8e5295 +size 151344 diff --git a/documents/A014-Policy-for-Honorarium-on-Research-Project-Grants-V1-16-08-2021.pdf b/documents/A014-Policy-for-Honorarium-on-Research-Project-Grants-V1-16-08-2021.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8dc9aba02bbf2c8e69606094e3077ce512e0196a --- /dev/null +++ b/documents/A014-Policy-for-Honorarium-on-Research-Project-Grants-V1-16-08-2021.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e59f2e75e468dc5822e3f10dbdcf3b086287149d4d9e42e9a0e1816929dc3a4e +size 43067 diff --git a/documents/A014-Policy-for-Honorarium-on-Research-Project-Grants-V2-08-05-2023.pdf b/documents/A014-Policy-for-Honorarium-on-Research-Project-Grants-V2-08-05-2023.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c8141b7e427805d68e4c602fece7a11ac65f2690 --- /dev/null +++ b/documents/A014-Policy-for-Honorarium-on-Research-Project-Grants-V2-08-05-2023.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6575d4cc5e51aaf4071b4e034e0e90523dc0226829476fc317514673ccfa8569 +size 41673 diff --git a/documents/A015-Semester-Rules-for-Post-Graduate-Programs-V2.pdf b/documents/A015-Semester-Rules-for-Post-Graduate-Programs-V2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..635f44e9847532c2d59cf535d4b1d207d6aa7c39 --- /dev/null +++ b/documents/A015-Semester-Rules-for-Post-Graduate-Programs-V2.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9dd903284ad0afdec0f7353a6612984e0032bc177aed4d00bbd1901e502e3272 +size 86177 diff --git a/documents/A024-Policy-for-Transfer-of-Credit-Hours-Student-Mobility-12-08-2021-min.pdf b/documents/A024-Policy-for-Transfer-of-Credit-Hours-Student-Mobility-12-08-2021-min.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fa9df42b563f9b0b3bfc52631b9a76657fc2c4d0 --- /dev/null +++ b/documents/A024-Policy-for-Transfer-of-Credit-Hours-Student-Mobility-12-08-2021-min.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e37cfac63e5cffb5944bb76e64addc1421d0869adfbae5c8036311efca9f5a4 +size 55645 diff --git a/documents/A025-Admission-Policy-Fall-2021-12-08-2021-min.pdf b/documents/A025-Admission-Policy-Fall-2021-12-08-2021-min.pdf new file mode 100644 index 0000000000000000000000000000000000000000..57e9d45c6cb7470deedb3000e6813269971f4ca9 --- /dev/null +++ b/documents/A025-Admission-Policy-Fall-2021-12-08-2021-min.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a06432fdba8ff6fae5b2e08388b80a64b190480d3ce1d41a862b5bf92df0b0a +size 257233 diff --git a/documents/A026-Policy-for-Role-and-Responsibility-of-Academic-Advisor-V1.pdf b/documents/A026-Policy-for-Role-and-Responsibility-of-Academic-Advisor-V1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3409dedc75fb72b9d469c5325b85200aa141ee47 --- /dev/null +++ b/documents/A026-Policy-for-Role-and-Responsibility-of-Academic-Advisor-V1.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7e73aa5c6620d716af9de7fbe5ba26000c6a9ef0f88f8bf1f43c0d8b2ea8efd +size 56946 diff --git a/documents/A028-Internship-Policy-and-Mechanism-V1.pdf b/documents/A028-Internship-Policy-and-Mechanism-V1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fcfc09c92b08a81fba02fbbc0eec96d7341965d9 --- /dev/null +++ b/documents/A028-Internship-Policy-and-Mechanism-V1.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15369e7cb11dcbfe8f2d6c561f56b00168db88d921e335fc2b24053ec3935e68 +size 123415 diff --git a/documents/A07-Rules-Regulations-for-the-Degree-of-Masters-in-Science-V2.pdf b/documents/A07-Rules-Regulations-for-the-Degree-of-Masters-in-Science-V2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..84220b181aad2e69d46d50ac990d6423da8fd98f --- /dev/null +++ b/documents/A07-Rules-Regulations-for-the-Degree-of-Masters-in-Science-V2.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59edc50f8e4cd191758229ec2c24aa36682312d53a611a78f1f4a01cddba1850 +size 91612 diff --git a/documents/A08-Rules-and-Regulations-for-the-degree-of-PhD-V5.pdf b/documents/A08-Rules-and-Regulations-for-the-degree-of-PhD-V5.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d422abc314d3bedb32efc0e62378688e77f2f097 --- /dev/null +++ b/documents/A08-Rules-and-Regulations-for-the-degree-of-PhD-V5.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f25dc36501fa2a2b7f5244476dcc988a2cb9ea1fe31d59a9fb212a1434b5e43 +size 87795 diff --git a/documents/A21-Attendance-Policy-for-Online-Classes-Fall-2020-1-converted.pdf b/documents/A21-Attendance-Policy-for-Online-Classes-Fall-2020-1-converted.pdf new file mode 100644 index 0000000000000000000000000000000000000000..db916f6ba8e00e7af77e5214cd191f0b4506703e --- /dev/null +++ b/documents/A21-Attendance-Policy-for-Online-Classes-Fall-2020-1-converted.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:739a16d52b647a3785dfedc8cf16db6e1440c370202864372b177c0d49d55c96 +size 140968 diff --git a/documents/Academic-Freedom-Policy.pdf b/documents/Academic-Freedom-Policy.pdf new file mode 100644 index 0000000000000000000000000000000000000000..45327b0ca52b91ec2186524d6239b8be6e1c9555 --- /dev/null +++ b/documents/Academic-Freedom-Policy.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10bceaff7de2f7df9ca9230027f548b877591cb5add8ed19067fe21209d040ba +size 117739 diff --git a/documents/Academic-Rules-Regulations.pdf b/documents/Academic-Rules-Regulations.pdf new file mode 100644 index 0000000000000000000000000000000000000000..31938a9f4792dd7357d223caebafd92887130cb5 --- /dev/null +++ b/documents/Academic-Rules-Regulations.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dcfbc2094a5bc28691a2f3d51fbe348d779aa9cb6beb2289656f8cef0a48dec +size 388427 diff --git a/documents/Admission-Policy-2021-2022-12-06-2021-V0-converted-min.pdf b/documents/Admission-Policy-2021-2022-12-06-2021-V0-converted-min.pdf new file mode 100644 index 0000000000000000000000000000000000000000..99df206c309a27922b3916f15338d8f9b60e18d1 --- /dev/null +++ b/documents/Admission-Policy-2021-2022-12-06-2021-V0-converted-min.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ccb2c3e47e98fb20c9bc8328043d48ebbeb490c4d153a2c58a424dc429d5849 +size 238362 diff --git a/documents/Admission-Policy-2022-2023-14-11-2022-min.pdf b/documents/Admission-Policy-2022-2023-14-11-2022-min.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2f1c45ec3bd186545e5ff294c6bd11f0c43e4bfc --- /dev/null +++ b/documents/Admission-Policy-2022-2023-14-11-2022-min.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:883646c4c435e07dbfaa36be162f9dcd59648fe5f2195dd9a4c04c921fac551f +size 267282 diff --git a/documents/Admission-Policy-2024-2025.pdf b/documents/Admission-Policy-2024-2025.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9c2d4568f26c5a637cdd76f011ddc7c037a4227b --- /dev/null +++ b/documents/Admission-Policy-2024-2025.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abfaf5f0a3deb2e42b04cf2c88c98b806bf79be176c184c09d0fd5513075ade2 +size 446737 diff --git a/documents/Amendment_Policy_Sexual_Harassment-ACT-2022.pdf b/documents/Amendment_Policy_Sexual_Harassment-ACT-2022.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4289968d000a7826796702fb6154698ae25ebaf0 --- /dev/null +++ b/documents/Amendment_Policy_Sexual_Harassment-ACT-2022.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01873b14d9030e5b007ffb5073c67d879aec7dc6c930f236203f794fd336cf56 +size 565207 diff --git a/documents/Annex-F-SSUET-MBA-Rules-Regulations-Ver-2.pdf b/documents/Annex-F-SSUET-MBA-Rules-Regulations-Ver-2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4a64a6aa79679d2cf40943f1106617b29bded1c6 --- /dev/null +++ b/documents/Annex-F-SSUET-MBA-Rules-Regulations-Ver-2.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:caea79e26388e183398432ba75ae3878828cd5bdefeb9a5258685d83427e9d5c +size 107679 diff --git a/documents/Appeals-Procedure-Policy.pdf b/documents/Appeals-Procedure-Policy.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ea90f30f11086c69c2232bf1bc93de50c2dd95eb --- /dev/null +++ b/documents/Appeals-Procedure-Policy.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5758411fb218fde918eaa4a6a12f1bdee39e47ea6ded834e3089bc3e498d7fdd +size 97719 diff --git a/documents/Application-Form-for-Publication-Honorarium-1-converted.pdf b/documents/Application-Form-for-Publication-Honorarium-1-converted.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d5a0304945f6491c83bac3078d74db707dc439e1 --- /dev/null +++ b/documents/Application-Form-for-Publication-Honorarium-1-converted.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb934965735cb85aa66a87f4378d23a22695acb183bb20599251eacfb7ded13d +size 115719 diff --git a/documents/Arrangements-to-Prevent-Fradulent-Claims-of-Degree-Policy (1).pdf b/documents/Arrangements-to-Prevent-Fradulent-Claims-of-Degree-Policy (1).pdf new file mode 100644 index 0000000000000000000000000000000000000000..104819bdce7431e49f6ad9c22e3dc835f3a13365 --- /dev/null +++ b/documents/Arrangements-to-Prevent-Fradulent-Claims-of-Degree-Policy (1).pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf4e78c65636f7a2c9d9470d2432720a8471304a21dd890293099e3676f005e8 +size 124016 diff --git a/documents/Arrangements-to-Prevent-Fradulent-Claims-of-Degree-Policy.pdf b/documents/Arrangements-to-Prevent-Fradulent-Claims-of-Degree-Policy.pdf new file mode 100644 index 0000000000000000000000000000000000000000..104819bdce7431e49f6ad9c22e3dc835f3a13365 --- /dev/null +++ b/documents/Arrangements-to-Prevent-Fradulent-Claims-of-Degree-Policy.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf4e78c65636f7a2c9d9470d2432720a8471304a21dd890293099e3676f005e8 +size 124016 diff --git a/documents/Conflict-of-Interest-Policy.pdf b/documents/Conflict-of-Interest-Policy.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8d0cf32b66b312a7f8a8369207de51f784455b93 --- /dev/null +++ b/documents/Conflict-of-Interest-Policy.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37274cb945db6f812dad9c2807c58a6aa9e99c05cc51c9f37729ff7c59373118 +size 332389 diff --git a/documents/Environment-Health-and-Safety-Policy.pdf b/documents/Environment-Health-and-Safety-Policy.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2db3c237a475f4a4837d0f171d7985b420876aa2 --- /dev/null +++ b/documents/Environment-Health-and-Safety-Policy.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c8cbafb6d312790c9cefe1162a1ae8bc884b4140aadaa8aaa77e9da34506c65 +size 49024 diff --git a/documents/Evaluation-of-University-Performance-by-Stakeholders-Policy.pdf b/documents/Evaluation-of-University-Performance-by-Stakeholders-Policy.pdf new file mode 100644 index 0000000000000000000000000000000000000000..23354b0ac4a96b539c6902973f56b4a98c4c7d87 --- /dev/null +++ b/documents/Evaluation-of-University-Performance-by-Stakeholders-Policy.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:833a1f4a9435ed81817b51b1145a693338af5ecb6cd19f1b4373fdb4927346b9 +size 676313 diff --git a/documents/G009-Employee-Separation-Policy-and-Procedure-V1-14-02-2023.pdf b/documents/G009-Employee-Separation-Policy-and-Procedure-V1-14-02-2023.pdf new file mode 100644 index 0000000000000000000000000000000000000000..06c93dae5fa132de5282cb5cccd30fece93a72ef --- /dev/null +++ b/documents/G009-Employee-Separation-Policy-and-Procedure-V1-14-02-2023.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79b80a98f25cc42c40f7beb48d42119367b33e19130c5336263adc1846140f5d +size 94130 diff --git a/documents/G023-Policy-and-Procedure-for-Flexible-Working-Hours-V1-12-11-21.pdf b/documents/G023-Policy-and-Procedure-for-Flexible-Working-Hours-V1-12-11-21.pdf new file mode 100644 index 0000000000000000000000000000000000000000..984b877919c3fe1784d0f83a2087df72b8b1f3d0 --- /dev/null +++ b/documents/G023-Policy-and-Procedure-for-Flexible-Working-Hours-V1-12-11-21.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fb33dbb16a65d5bcee5b9d73683a554cde4dcaa21305f5e2ee01eab196c1295 +size 80467 diff --git a/documents/G024-Policy-and-Procedure-for-Engaging-Interns.pdf b/documents/G024-Policy-and-Procedure-for-Engaging-Interns.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9bd1eb6c5a54c38a95f4115300c66e8306e4af78 --- /dev/null +++ b/documents/G024-Policy-and-Procedure-for-Engaging-Interns.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:597098c0c8099a3d8666011f9a6e30b82c7713e350f47059687a3aac778ecd72 +size 58899 diff --git a/documents/G025-Policy-Against-Drug-and-Tobacco-Abuse-at-SSUET-12-08-2021-min (1).pdf b/documents/G025-Policy-Against-Drug-and-Tobacco-Abuse-at-SSUET-12-08-2021-min (1).pdf new file mode 100644 index 0000000000000000000000000000000000000000..e1aa79e48911b0bd229900b2498ee2f209b136a1 --- /dev/null +++ b/documents/G025-Policy-Against-Drug-and-Tobacco-Abuse-at-SSUET-12-08-2021-min (1).pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45cb5427ee8c9eb9294a1e723d0c06ca876cce77fa569f8570cd019f26cda499 +size 193738 diff --git a/documents/G025-Policy-Against-Drug-and-Tobacco-Abuse-at-SSUET-12-08-2021-min.pdf b/documents/G025-Policy-Against-Drug-and-Tobacco-Abuse-at-SSUET-12-08-2021-min.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e1aa79e48911b0bd229900b2498ee2f209b136a1 --- /dev/null +++ b/documents/G025-Policy-Against-Drug-and-Tobacco-Abuse-at-SSUET-12-08-2021-min.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45cb5427ee8c9eb9294a1e723d0c06ca876cce77fa569f8570cd019f26cda499 +size 193738 diff --git a/documents/G029-Policy-and-Procedures-for-Engaging-Temporary-Teaching-Staff-V2_2.pdf b/documents/G029-Policy-and-Procedures-for-Engaging-Temporary-Teaching-Staff-V2_2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..29bf8c214a43a327e0ac3fd3cab811f606fe265e --- /dev/null +++ b/documents/G029-Policy-and-Procedures-for-Engaging-Temporary-Teaching-Staff-V2_2.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c604be700b8fd9c8060f9f18e703a592f8216c9768fdc327c4eae40fafe16366 +size 151863 diff --git a/documents/G03-Policy-for-Students-with-Disabilities-V2-12-08-2021-min.pdf b/documents/G03-Policy-for-Students-with-Disabilities-V2-12-08-2021-min.pdf new file mode 100644 index 0000000000000000000000000000000000000000..174f96d695de5515a664e733cfb418c070664dce --- /dev/null +++ b/documents/G03-Policy-for-Students-with-Disabilities-V2-12-08-2021-min.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fefa472f783ddd7ca6577a561adb31764fe2c799c0bf253d5a835df9ba902734 +size 190171 diff --git a/documents/G033-Onboarding-Staff-Induction-Policy-Procedures-V1-11-01-2023.pdf b/documents/G033-Onboarding-Staff-Induction-Policy-Procedures-V1-11-01-2023.pdf new file mode 100644 index 0000000000000000000000000000000000000000..647df4e8750148f06c6187cd176625dbe4418ccd --- /dev/null +++ b/documents/G033-Onboarding-Staff-Induction-Policy-Procedures-V1-11-01-2023.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f07680f54d654a8e8028d4f0dbb7a7060acb2793be03748dc5699a43817d4a5 +size 95270 diff --git a/documents/G051-Patent-Support-Policy-V1.pdf b/documents/G051-Patent-Support-Policy-V1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0a1c165e4c0f5b9aa6331f6abf4b0045bfb055ea --- /dev/null +++ b/documents/G051-Patent-Support-Policy-V1.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bf4d928fdb0f211cbcc7f6083431ab9ecc0da92d39b63cb7ceeb1ff62e551a1 +size 529925 diff --git a/documents/G30-Policy-for-Authorization-of-Cellular-Phone-and-Calling-Cards-V1-07-12-21.pdf b/documents/G30-Policy-for-Authorization-of-Cellular-Phone-and-Calling-Cards-V1-07-12-21.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a7a593fc0fe0107f1824e701f9550b0085117b81 --- /dev/null +++ b/documents/G30-Policy-for-Authorization-of-Cellular-Phone-and-Calling-Cards-V1-07-12-21.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b271062192268c2a9bbeef1aed99d1846a09183be04281209ba764d9b394d458 +size 42092 diff --git a/documents/Grading-System.pdf b/documents/Grading-System.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e330061f7521e0af3ae4bf6cd888c1ce54417054 --- /dev/null +++ b/documents/Grading-System.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e59b7656ccdd8c1448fe66fb6d4bf3ddc6a9d8de3d80932e304d821f9be6569e +size 2263152 diff --git a/documents/HEC-Refund-Policy-2024.pdf b/documents/HEC-Refund-Policy-2024.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4b458eb14825f228f5a08912a39cc59217bfc890 --- /dev/null +++ b/documents/HEC-Refund-Policy-2024.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6519e9bf56422db3be3855f61eefe92c5ca86973a11b047fe85b06ae757a1dd3 +size 279896 diff --git a/documents/Members-of-Inquiry-Committee-for-Protection-against-Sexual-Harassment-at-SSUET.pdf b/documents/Members-of-Inquiry-Committee-for-Protection-against-Sexual-Harassment-at-SSUET.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6834a78373b2ed95291918af84be75e228a7e2e2 --- /dev/null +++ b/documents/Members-of-Inquiry-Committee-for-Protection-against-Sexual-Harassment-at-SSUET.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a23b704ee66fefbd1428bec9af9f2a6ad46ff635e6b466f06dd5f2fb8e9dc652 +size 25137 diff --git a/documents/Migration-Policy.pdf b/documents/Migration-Policy.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3bfb71cbd8f126aee7b988dfb07427bbf39b9cd9 --- /dev/null +++ b/documents/Migration-Policy.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb21f6abd089aea9fd4ad10bc47ea7c5896f098d26f3635c0c13a27ff2447630 +size 290949 diff --git a/documents/ORIC-Policy.pdf b/documents/ORIC-Policy.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6969d736bdc5ab9d932051a9f6dfc523f0221ac8 --- /dev/null +++ b/documents/ORIC-Policy.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f130d882c3f4ae4a911f5b914f23036b2169be9ee8b7a84935c87777c90c751b +size 489686 diff --git a/documents/PGP-Semester-Rules.pdf b/documents/PGP-Semester-Rules.pdf new file mode 100644 index 0000000000000000000000000000000000000000..521d3147f4d0edc6bafda3d0bee1ab6aa3cf234b --- /dev/null +++ b/documents/PGP-Semester-Rules.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d65cb2976f8f077cf8bff0f4a0ec2b98af05fb90da0be907d99e2ea99ba264e +size 736278 diff --git a/documents/Plagiarism-Policy-of-SSUET.pdf b/documents/Plagiarism-Policy-of-SSUET.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d4ec605e03cde0e51c8eee4545264e0b2911fbf8 --- /dev/null +++ b/documents/Plagiarism-Policy-of-SSUET.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9831b6c6f0ee21c369b4c28637b6a156012996304841294c60e0162d9b905279 +size 884934 diff --git a/documents/Policy-Communication-of-Approved-Policies-and-SOPs-to-all-Stakeholders.pdf b/documents/Policy-Communication-of-Approved-Policies-and-SOPs-to-all-Stakeholders.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e537d0e90153b6b87be19dbdadcf660aef9bc5cd --- /dev/null +++ b/documents/Policy-Communication-of-Approved-Policies-and-SOPs-to-all-Stakeholders.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9ba2c4a759bb3d28d3a631996b24b4697454241010b6e5191e926b5e5c03d98 +size 493759 diff --git a/documents/Policy-Procedure-for-KPI-for-Academic-Staff-V1.pdf b/documents/Policy-Procedure-for-KPI-for-Academic-Staff-V1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9e465def2e0bbbbfccce66af0e9b2de021b3eaf4 --- /dev/null +++ b/documents/Policy-Procedure-for-KPI-for-Academic-Staff-V1.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7d0a93fe445f53eaa28a04a99f5010ec7eea20afaeb49b3db5736510bc4a9ed +size 614145 diff --git a/documents/Policy-Procedures-for-Resolving-Grievances.pdf b/documents/Policy-Procedures-for-Resolving-Grievances.pdf new file mode 100644 index 0000000000000000000000000000000000000000..16a1e7b348145fc9113f73eeb0fc8860ca1b02b8 --- /dev/null +++ b/documents/Policy-Procedures-for-Resolving-Grievances.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d39792351b0fa76678ee97fc1cd3293962f6299790aaf19f1456a0833f680095 +size 753149 diff --git a/documents/Policy-Procedures-of-Examinations-Assessment-V1.pdf b/documents/Policy-Procedures-of-Examinations-Assessment-V1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..158f5d975599bea21d619a86599b76cd8d75f5d4 --- /dev/null +++ b/documents/Policy-Procedures-of-Examinations-Assessment-V1.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f9c2e1e97c019128a7ce8e04a45b6e001c2ea3386343fe27432e6018a1ba8d9 +size 773770 diff --git a/documents/Policy-and-Procedures-for-online-education-1.pdf b/documents/Policy-and-Procedures-for-online-education-1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4d5276eb3e7d8c4cb7a3f75560eb90b847abc444 --- /dev/null +++ b/documents/Policy-and-Procedures-for-online-education-1.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad3dc089a51bdffec9fc953cb023820a687f7cb7252f8b3b97a06c517da46e04 +size 536717 diff --git a/documents/Policy-for-Center-for-GCPP.pdf b/documents/Policy-for-Center-for-GCPP.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d55085c85febf046bb972dcea60caab90fd196d5 --- /dev/null +++ b/documents/Policy-for-Center-for-GCPP.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62aed072132112b9b4cc76010da0071a2f8246b5d0a6d2a31294b9aa8c31c46c +size 317435 diff --git a/documents/Policy-for-Faculty-Appointment-and-Promotion-Criteria.pdf b/documents/Policy-for-Faculty-Appointment-and-Promotion-Criteria.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4bd54c3ae7d9425ce380125e388294a0034c535c --- /dev/null +++ b/documents/Policy-for-Faculty-Appointment-and-Promotion-Criteria.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fefdc88b95c4daebcc36a90597f005cae45e40313bd7fbeffa1e91ec82e0fee5 +size 278317 diff --git a/documents/Policy-for-Faculty-Members-Involved-with-Services-to-Industry.pdf b/documents/Policy-for-Faculty-Members-Involved-with-Services-to-Industry.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f5ff7390975d7b8c9333a30345ab7c6d0bfff154 --- /dev/null +++ b/documents/Policy-for-Faculty-Members-Involved-with-Services-to-Industry.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07edd846a82031a55f7e95b885d1336a8cf004d7f49ec27d3f7a490bf6bf9469 +size 197258 diff --git a/documents/Policy-for-Modes-of-Formal-Communication.pdf b/documents/Policy-for-Modes-of-Formal-Communication.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5ab3ebe7e9963b8e9cafb0df8731d83bd68ba92a --- /dev/null +++ b/documents/Policy-for-Modes-of-Formal-Communication.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b59a990360a41d9aa0dc112eb61a7441e50c87ea9b272a3213d3555f4494777a +size 511000 diff --git a/documents/Policy-for-Online-First-Publication-of-SSURJET-Articles.pdf b/documents/Policy-for-Online-First-Publication-of-SSURJET-Articles.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5d84f31c4902b2f7073800d865b7edb23cf06b91 --- /dev/null +++ b/documents/Policy-for-Online-First-Publication-of-SSURJET-Articles.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78c0dbc79e2d215bc3158f3fe1c3d8bac2a0bcabea4f83f077991f9c43d007b0 +size 477919 diff --git a/documents/Policy-of-Resolution-Number-for-Meetings.pdf b/documents/Policy-of-Resolution-Number-for-Meetings.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8be80ae335cf9a0fedd3128f45e05e552ffd57e7 --- /dev/null +++ b/documents/Policy-of-Resolution-Number-for-Meetings.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc76b331e2df487bf0206d2d0e41cb9678f4ef14e47e0f69807cef3e467d6ce9 +size 401939 diff --git a/documents/Quality-Assurance-Policy.pdf b/documents/Quality-Assurance-Policy.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6b611e9c2d8c77caef5e51a83bbd639b8bf89781 --- /dev/null +++ b/documents/Quality-Assurance-Policy.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5e4fc51bc401f688d1b43fdbb41cbed65d24c1f5570c13812346baa632bca9a +size 563821 diff --git a/documents/Recruitment-Promotion-Policy-Procedure-V1.pdf b/documents/Recruitment-Promotion-Policy-Procedure-V1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fab5934790bbd061b1ca3c508b9b27131d921ea6 --- /dev/null +++ b/documents/Recruitment-Promotion-Policy-Procedure-V1.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6935c890a56abf89feabf1052f34c8d502670cc6041e7a4456724a4f326d9e87 +size 513833 diff --git a/documents/Research-Honorarium-and-Conference-Assistance-Policy-V2.pdf b/documents/Research-Honorarium-and-Conference-Assistance-Policy-V2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..45df88e083788bd2fab28e09d55c1a9ade3d8593 --- /dev/null +++ b/documents/Research-Honorarium-and-Conference-Assistance-Policy-V2.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1806c5a3fb69dc6608ea000fd5c6406a1696c17b1a0e2fa250b9583989ec3a2f +size 522150 diff --git a/documents/Rules-Regulations-of-MS.pdf b/documents/Rules-Regulations-of-MS.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b64b6122c8215e97e81832d6f870b39e040436f1 --- /dev/null +++ b/documents/Rules-Regulations-of-MS.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5523d66deb84bdc64133c2b4f914654684766aac61aa8727266f162064d63323 +size 180216 diff --git a/documents/SSUET-HSE-Safety-Manual-V3 (1).pdf b/documents/SSUET-HSE-Safety-Manual-V3 (1).pdf new file mode 100644 index 0000000000000000000000000000000000000000..813fa70cacdbbcb93ccea284cf0ce563a22b58df --- /dev/null +++ b/documents/SSUET-HSE-Safety-Manual-V3 (1).pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:08a941c443aa01b29be680b404e5de264c9d9fb3ac36c47d37cc742b683e9544 +size 592698 diff --git a/documents/SSUET-HSE-Safety-Manual-V3.pdf b/documents/SSUET-HSE-Safety-Manual-V3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..813fa70cacdbbcb93ccea284cf0ce563a22b58df --- /dev/null +++ b/documents/SSUET-HSE-Safety-Manual-V3.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:08a941c443aa01b29be680b404e5de264c9d9fb3ac36c47d37cc742b683e9544 +size 592698 diff --git a/documents/SSUET-Intellectual-Property-Rights-Policy-V1.pdf b/documents/SSUET-Intellectual-Property-Rights-Policy-V1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..142c99dd9b40e01c8282938ad8f8bb419b6b5370 --- /dev/null +++ b/documents/SSUET-Intellectual-Property-Rights-Policy-V1.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:530bcefd47a6bd6fb6f82ce5aef90a88bf8e6b68a4af0c5d36cc934df6781bc4 +size 315777 diff --git a/documents/SSUET-MS-Policy-Ver-4.pdf b/documents/SSUET-MS-Policy-Ver-4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..75618ca451a8eca23bc63b52bee61922a98fd52d --- /dev/null +++ b/documents/SSUET-MS-Policy-Ver-4.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d9f7342f91cafca1b403091205c79cb26542e482fb23bc2da00ab018c21423f +size 75015 diff --git a/documents/SSUET-PhD-Policy-Ver-8-For-Batches-2024-Spring-and-Onwards.pdf b/documents/SSUET-PhD-Policy-Ver-8-For-Batches-2024-Spring-and-Onwards.pdf new file mode 100644 index 0000000000000000000000000000000000000000..23cfc239f4babb30f8372e6259c5247781178ca8 --- /dev/null +++ b/documents/SSUET-PhD-Policy-Ver-8-For-Batches-2024-Spring-and-Onwards.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b05001af06c860a2261e27a37e24e8017b531a2664ec858013e479e9dcfd0c4 +size 112646 diff --git a/documents/Smoking-Undertaking-Students.pdf b/documents/Smoking-Undertaking-Students.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c52e2aab3a6b5a99c37dc34d8d8097a2a8ebd760 --- /dev/null +++ b/documents/Smoking-Undertaking-Students.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d88227f65865ad0d4c9d1c56692f48230a29eb287a7bfd7cbf7aba82f37b5ba8 +size 77622 diff --git a/documents/Social-Media-Policy-V2.pdf b/documents/Social-Media-Policy-V2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6af9195eb110bf8a53f6c33ff51f81b978d3865f --- /dev/null +++ b/documents/Social-Media-Policy-V2.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f68630815b7e70e777eaf7486195be453bd35131cd1c380be1e2f8dfe165244 +size 837723 diff --git a/documents/Transport-Policy-V1.pdf b/documents/Transport-Policy-V1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..34f9547b14c4f5bda4a3230a65a9044db48f647d --- /dev/null +++ b/documents/Transport-Policy-V1.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:705904b2a33baa9700a5d8ef88fff706bc41c3f1b6559a7a3aca42093f0a9a24 +size 532617 diff --git a/documents/Travelling-and-Accomodation-Policy-V1.pdf b/documents/Travelling-and-Accomodation-Policy-V1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..76799afa4ad80b227384a58e4bd99ea4b8e16567 --- /dev/null +++ b/documents/Travelling-and-Accomodation-Policy-V1.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7c4e80cbaaed74daaa73dd75051e224833613fcf84dbde98e677c2b35951ac0 +size 513084 diff --git a/documents/protection-agaainst-harassment-of-women-at-the-workplace-2010.pdf b/documents/protection-agaainst-harassment-of-women-at-the-workplace-2010.pdf new file mode 100644 index 0000000000000000000000000000000000000000..43d60646152eccf00ed024a946fc19c62e899269 --- /dev/null +++ b/documents/protection-agaainst-harassment-of-women-at-the-workplace-2010.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c636b303bce727c07b6dd00819216d9378603598f07c7eeab92c1bf3bb82b9e3 +size 84959 diff --git a/frontend/index.html b/frontend/index.html new file mode 100644 index 0000000000000000000000000000000000000000..6279a404073301e756806679f03516bb5cccc425 --- /dev/null +++ b/frontend/index.html @@ -0,0 +1,131 @@ + + + + + + Docent AI — Policy Assistant + + + + + + +
+
+
+ ◆ + Docent AI +
+

Sign in to your policy assistant

+ +
+ + +
+ +
+ + + + + + + + +
+
+
+ + + + + + + diff --git a/frontend/script.js b/frontend/script.js new file mode 100644 index 0000000000000000000000000000000000000000..7bff00e67096a4ea32ec19f291bd1aa0821439f3 --- /dev/null +++ b/frontend/script.js @@ -0,0 +1,460 @@ +/* ── Supabase client (initialised from /config) ── */ +let sb = null; +let currentSessionId = null; +let authMode = 'login'; // 'login' | 'signup' + +/* ── DOM refs ── */ +const authOverlay = document.getElementById('authOverlay'); +const appShell = document.getElementById('appShell'); +const tabLogin = document.getElementById('tabLogin'); +const tabSignup = document.getElementById('tabSignup'); +const authForm = document.getElementById('authForm'); +const authEmail = document.getElementById('authEmail'); +const authPassword = document.getElementById('authPassword'); +const authSubmit = document.getElementById('authSubmit'); +const authSubmitText= document.getElementById('authSubmitText'); +const authSpinner = document.getElementById('authSpinner'); +const authMessage = document.getElementById('authMessage'); + +const accountEmail = document.getElementById('accountEmail'); +const logoutBtn = document.getElementById('logoutBtn'); +const newChatBtn = document.getElementById('newChatBtn'); +const sessionList = document.getElementById('sessionList'); +const chatTitle = document.getElementById('chatTitle'); + +const messagesEl = document.getElementById('messages'); +const chatForm = document.getElementById('chatForm'); +const questionInput = document.getElementById('questionInput'); +const sendBtn = document.getElementById('sendBtn'); +const sendIcon = document.getElementById('sendIcon'); +const sendSpinner = document.getElementById('sendSpinner'); + +const dropZone = document.getElementById('dropZone'); +const fileInput = document.getElementById('fileInput'); +const uploadBtn = document.getElementById('uploadBtn'); +const uploadBtnText = document.getElementById('uploadBtnText'); +const uploadSpinner = document.getElementById('uploadSpinner'); +const uploadStatus = document.getElementById('uploadStatus'); +const docList = document.getElementById('docList'); + +const WELCOME_HTML = ` +
+
+ Hello! Upload your policy PDFs in the sidebar, then ask me any question about them. + I will only answer from the documents — no guessing. +
+
`; + +/* ── Helpers ── */ +function scrollToBottom() { messagesEl.scrollTop = messagesEl.scrollHeight; } + +function setUISending(busy) { + sendBtn.disabled = busy; + sendIcon.classList.toggle('hidden', busy); + sendSpinner.classList.toggle('hidden', !busy); + questionInput.disabled = busy; +} + +function escapeHTML(str) { + return str + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"'); +} + +async function getToken() { + if (!sb) return null; + const { data } = await sb.auth.getSession(); + return data.session ? data.session.access_token : null; +} + +/* Authenticated fetch — attaches the Supabase access token */ +async function authedFetch(url, options = {}) { + const token = await getToken(); + const headers = { ...(options.headers || {}) }; + if (token) headers['Authorization'] = `Bearer ${token}`; + const res = await fetch(url, { ...options, headers }); + if (res.status === 401) { + await handleSignOut(); + throw new Error('Session expired. Please log in again.'); + } + return res; +} + +/* ── Render messages ── */ +function appendMessage(role, text, sources = []) { + const row = document.createElement('div'); + row.className = `message ${role}`; + + const bubble = document.createElement('div'); + bubble.className = 'bubble'; + bubble.textContent = text; + row.appendChild(bubble); + + if (sources && sources.length > 0) { + const sourcesEl = document.createElement('div'); + sourcesEl.className = 'sources'; + sources.forEach(s => { + const tag = document.createElement('span'); + tag.className = 'source-tag'; + tag.innerHTML = `${escapeHTML(s.file)} p.${s.page}`; + sourcesEl.appendChild(tag); + }); + row.appendChild(sourcesEl); + + const allImages = sources.flatMap(s => s.image_urls || []); + const uniqueImages = [...new Set(allImages)]; + + if (uniqueImages.length > 0) { + const imgLabel = document.createElement('p'); + imgLabel.className = 'ref-img-label'; + imgLabel.textContent = 'Reference images from documents:'; + row.appendChild(imgLabel); + + const imgGrid = document.createElement('div'); + imgGrid.className = 'ref-img-grid'; + + uniqueImages.forEach(url => { + const wrapper = document.createElement('div'); + wrapper.className = 'ref-img-wrapper'; + const img = document.createElement('img'); + img.src = url; + img.className = 'ref-img'; + img.alt = 'Document reference image'; + img.loading = 'lazy'; + img.addEventListener('click', () => window.open(url, '_blank')); + wrapper.appendChild(img); + imgGrid.appendChild(wrapper); + }); + row.appendChild(imgGrid); + } + } + + messagesEl.appendChild(row); + scrollToBottom(); + return row; +} + +function appendTypingIndicator() { + const row = document.createElement('div'); + row.className = 'message assistant'; + row.id = 'typingIndicator'; + const bubble = document.createElement('div'); + bubble.className = 'bubble typing-dots'; + bubble.innerHTML = ''; + row.appendChild(bubble); + messagesEl.appendChild(row); + scrollToBottom(); + return row; +} + +function removeTypingIndicator() { + const el = document.getElementById('typingIndicator'); + if (el) el.remove(); +} + +function resetMessages() { + messagesEl.innerHTML = WELCOME_HTML; +} + +/* ── Sessions ── */ +async function loadSessions() { + try { + const res = await authedFetch('/sessions'); + const data = await res.json(); + renderSessions(data.sessions || []); + } catch { /* ignore */ } +} + +function renderSessions(sessions) { + sessionList.innerHTML = ''; + if (sessions.length === 0) { + sessionList.innerHTML = '
  • No conversations yet
  • '; + return; + } + sessions.forEach(s => { + const li = document.createElement('li'); + li.className = 'session-item' + (s.id === currentSessionId ? ' active' : ''); + li.dataset.id = s.id; + + const titleSpan = document.createElement('span'); + titleSpan.className = 'session-title'; + titleSpan.textContent = s.title || 'New chat'; + titleSpan.addEventListener('click', () => openSession(s.id, s.title)); + + const del = document.createElement('button'); + del.className = 'session-del'; + del.innerHTML = '×'; + del.title = 'Delete conversation'; + del.addEventListener('click', (e) => { e.stopPropagation(); deleteSession(s.id); }); + + li.appendChild(titleSpan); + li.appendChild(del); + sessionList.appendChild(li); + }); +} + +async function openSession(sessionId, title) { + currentSessionId = sessionId; + chatTitle.textContent = title || 'Conversation'; + resetMessages(); + try { + const res = await authedFetch(`/sessions/${sessionId}/messages`); + const data = await res.json(); + const msgs = data.messages || []; + if (msgs.length > 0) messagesEl.innerHTML = ''; + msgs.forEach(m => appendMessage(m.role, m.content, m.sources || [])); + } catch { /* ignore */ } + highlightActiveSession(); +} + +function highlightActiveSession() { + [...sessionList.querySelectorAll('.session-item')].forEach(li => { + li.classList.toggle('active', li.dataset.id === currentSessionId); + }); +} + +function startNewChat() { + currentSessionId = null; + chatTitle.textContent = 'New chat'; + resetMessages(); + highlightActiveSession(); + questionInput.focus(); +} + +async function deleteSession(sessionId) { + try { + await authedFetch(`/sessions/${sessionId}`, { method: 'DELETE' }); + if (sessionId === currentSessionId) startNewChat(); + await loadSessions(); + } catch { /* ignore */ } +} + +/* ── Chat submit ── */ +chatForm.addEventListener('submit', async (e) => { + e.preventDefault(); + const question = questionInput.value.trim(); + if (!question) return; + + // Clear the welcome bubble on first real message + const welcome = messagesEl.querySelector('.welcome'); + if (welcome) welcome.remove(); + + appendMessage('user', question); + questionInput.value = ''; + questionInput.style.height = 'auto'; + setUISending(true); + appendTypingIndicator(); + + try { + const res = await authedFetch('/chat', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ question, session_id: currentSessionId }), + }); + + removeTypingIndicator(); + + if (!res.ok) { + const err = await res.json().catch(() => ({ detail: res.statusText })); + appendMessage('assistant', `Error: ${err.detail || 'Something went wrong.'}`); + } else { + const data = await res.json(); + const isNew = !currentSessionId; + currentSessionId = data.session_id; + chatTitle.textContent = data.title || 'Conversation'; + appendMessage('assistant', data.answer, data.sources || []); + if (isNew) await loadSessions(); + highlightActiveSession(); + } + } catch (err) { + removeTypingIndicator(); + appendMessage('assistant', err.message || 'Network error. Is the server running?'); + } finally { + setUISending(false); + questionInput.focus(); + } +}); + +questionInput.addEventListener('input', () => { + questionInput.style.height = 'auto'; + questionInput.style.height = Math.min(questionInput.scrollHeight, 140) + 'px'; +}); + +questionInput.addEventListener('keydown', (e) => { + if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault(); + chatForm.dispatchEvent(new Event('submit')); + } +}); + +newChatBtn.addEventListener('click', startNewChat); +logoutBtn.addEventListener('click', handleSignOut); + +/* ── File selection / upload ── */ +fileInput.addEventListener('change', () => { + uploadBtn.disabled = fileInput.files.length === 0; +}); + +dropZone.addEventListener('click', () => fileInput.click()); +dropZone.addEventListener('dragover', (e) => { e.preventDefault(); dropZone.classList.add('dragover'); }); +dropZone.addEventListener('dragleave', () => dropZone.classList.remove('dragover')); +dropZone.addEventListener('drop', (e) => { + e.preventDefault(); + dropZone.classList.remove('dragover'); + const dt = e.dataTransfer; + if (dt.files.length > 0) { + fileInput.files = dt.files; + uploadBtn.disabled = false; + } +}); + +uploadBtn.addEventListener('click', async () => { + if (!fileInput.files.length) return; + + uploadBtn.disabled = true; + uploadBtnText.textContent = 'Uploading…'; + uploadSpinner.classList.remove('hidden'); + uploadStatus.classList.add('hidden'); + + const form = new FormData(); + for (const file of fileInput.files) form.append('files', file); + + try { + const res = await authedFetch('/upload', { method: 'POST', body: form }); + const data = await res.json(); + const lines = (data.results || []).map(r => + r.status === 'ingested' ? `\u2713 ${r.file} (${r.chunks} chunks)` : `\u2717 ${r.file}: ${r.status}` + ); + uploadStatus.textContent = lines.join('\n'); + uploadStatus.classList.remove('hidden'); + fileInput.value = ''; + await loadDocumentList(); + } catch { + uploadStatus.textContent = 'Upload failed. Check the server.'; + uploadStatus.classList.remove('hidden'); + } finally { + uploadBtnText.textContent = 'Upload'; + uploadSpinner.classList.add('hidden'); + uploadBtn.disabled = false; + } +}); + +async function loadDocumentList() { + try { + const res = await authedFetch('/documents'); + const data = await res.json(); + const docs = data.documents || []; + docList.innerHTML = ''; + if (docs.length === 0) { + docList.innerHTML = '
  • No documents yet
  • '; + } else { + docs.forEach(name => { + const li = document.createElement('li'); + li.textContent = name; + docList.appendChild(li); + }); + } + } catch { /* ignore */ } +} + +/* ── Auth UI ── */ +function setAuthMode(mode) { + authMode = mode; + tabLogin.classList.toggle('active', mode === 'login'); + tabSignup.classList.toggle('active', mode === 'signup'); + authSubmitText.textContent = mode === 'login' ? 'Log in' : 'Create account'; + hideAuthMessage(); +} + +function showAuthMessage(text, kind = 'error') { + authMessage.textContent = text; + authMessage.className = `auth-message ${kind}`; +} +function hideAuthMessage() { authMessage.className = 'auth-message hidden'; } + +function setAuthBusy(busy) { + authSubmit.disabled = busy; + authSpinner.classList.toggle('hidden', !busy); +} + +tabLogin.addEventListener('click', () => setAuthMode('login')); +tabSignup.addEventListener('click', () => setAuthMode('signup')); + +authForm.addEventListener('submit', async (e) => { + e.preventDefault(); + if (!sb) { + showAuthMessage('Auth is not ready yet. Reload the page; if it persists, the Supabase library failed to load.'); + return; + } + const email = authEmail.value.trim(); + const password = authPassword.value; + setAuthBusy(true); + hideAuthMessage(); + + try { + if (authMode === 'signup') { + const { data, error } = await sb.auth.signUp({ email, password }); + if (error) { showAuthMessage(error.message); return; } + if (data.session) { + await enterApp(); + } else { + showAuthMessage('Account created. If email confirmation is on, check your inbox, then log in.', 'success'); + setAuthMode('login'); + } + } else { + const { error } = await sb.auth.signInWithPassword({ email, password }); + if (error) { showAuthMessage(error.message); return; } + await enterApp(); + } + } catch (err) { + showAuthMessage(err.message || 'Authentication failed.'); + } finally { + setAuthBusy(false); + } +}); + +async function handleSignOut() { + if (sb) await sb.auth.signOut(); + currentSessionId = null; + appShell.classList.add('hidden'); + authOverlay.classList.remove('hidden'); + resetMessages(); +} + +async function enterApp() { + const { data } = await sb.auth.getUser(); + if (!data.user) return; + accountEmail.textContent = data.user.email || 'Signed in'; + authOverlay.classList.add('hidden'); + appShell.classList.remove('hidden'); + startNewChat(); + await Promise.all([loadSessions(), loadDocumentList()]); +} + +/* ── Boot ── */ +async function boot() { + try { + if (!window.supabase || !window.supabase.createClient) { + showAuthMessage('Could not load the Supabase library (check your network / ad-blocker), then reload.', 'error'); + return; + } + const res = await fetch('/config'); + const cfg = await res.json(); + if (!cfg.configured) { + showAuthMessage('Server is missing Supabase configuration. Check the .env file.', 'error'); + return; + } + sb = window.supabase.createClient(cfg.supabaseUrl, cfg.supabaseAnonKey); + + const { data } = await sb.auth.getSession(); + if (data.session) { + await enterApp(); + } + } catch (err) { + showAuthMessage('Could not reach the server.', 'error'); + } +} + +boot(); diff --git a/frontend/style.css b/frontend/style.css new file mode 100644 index 0000000000000000000000000000000000000000..7b075fe45bca7027dfe54598415907b09bac9550 --- /dev/null +++ b/frontend/style.css @@ -0,0 +1,604 @@ +/* ── Reset & Base ── */ +*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } + +:root { + --bg: #0f1117; + --surface: #1a1d27; + --surface2: #22263a; + --border: #2e3350; + --accent: #76b900; /* NVIDIA green */ + --accent-dk: #5c9100; + --text: #e8eaf0; + --text-muted:#8b90a8; + --user-bg: #1e3a5f; + --user-text: #cce4ff; + --ai-bg: #1e2235; + --radius: 12px; + --font: 'Segoe UI', system-ui, sans-serif; +} + +html, body { height: 100%; overflow: hidden; } +body { font-family: var(--font); background: var(--bg); color: var(--text); } + +/* ── Layout ── */ +.app-shell { + display: flex; + height: 100vh; +} + +/* ── Sidebar ── */ +.sidebar { + width: 280px; + min-width: 240px; + background: var(--surface); + border-right: 1px solid var(--border); + display: flex; + flex-direction: column; + padding: 24px 16px; + gap: 24px; + overflow-y: auto; +} + +.sidebar-header { display: flex; flex-direction: column; gap: 4px; } + +.logo { + display: flex; + align-items: center; + gap: 8px; + font-size: 1.25rem; + font-weight: 700; +} + +.logo-icon { color: var(--accent); font-size: 1rem; } +.logo-text { letter-spacing: .04em; } + +.logo-sub { + font-size: .78rem; + color: var(--text-muted); + letter-spacing: .06em; + text-transform: uppercase; +} + +.section-label { + font-size: .72rem; + font-weight: 600; + letter-spacing: .08em; + text-transform: uppercase; + color: var(--text-muted); + margin-bottom: 8px; +} + +/* Drop zone */ +.drop-zone { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 4px; + border: 2px dashed var(--border); + border-radius: var(--radius); + padding: 20px 12px; + cursor: pointer; + transition: border-color .2s, background .2s; + text-align: center; +} + +.drop-zone:hover, +.drop-zone.dragover { border-color: var(--accent); background: rgba(118,185,0,.06); } + +.drop-icon { font-size: 1.6rem; } +.drop-primary { font-size: .85rem; font-weight: 600; color: var(--text); } +.drop-secondary{ font-size: .75rem; color: var(--text-muted); } + +/* Upload button */ +.btn-upload { + display: flex; + align-items: center; + justify-content: center; + gap: 8px; + width: 100%; + margin-top: 10px; + padding: 10px; + background: var(--accent); + color: #000; + border: none; + border-radius: var(--radius); + font-size: .9rem; + font-weight: 700; + cursor: pointer; + transition: background .2s, opacity .2s; +} + +.btn-upload:disabled { opacity: .45; cursor: not-allowed; } +.btn-upload:not(:disabled):hover { background: var(--accent-dk); } + +/* Upload status */ +.upload-status { + margin-top: 8px; + font-size: .78rem; + padding: 8px 10px; + border-radius: 8px; + background: var(--surface2); + color: var(--text-muted); + line-height: 1.5; +} + +/* Doc list */ +.doc-list { + list-style: none; + display: flex; + flex-direction: column; + gap: 6px; +} + +.doc-list li { + font-size: .8rem; + padding: 7px 10px; + background: var(--surface2); + border-radius: 8px; + color: var(--text); + border-left: 3px solid var(--accent); + word-break: break-all; +} + +.doc-empty { + color: var(--text-muted) !important; + border-left-color: var(--border) !important; + font-style: italic; +} + +.sidebar-footer { + margin-top: auto; + display: flex; + flex-direction: column; + gap: 4px; + font-size: .72rem; + color: var(--text-muted); +} + +.model-tag { + font-size: .7rem; + padding: 2px 8px; + background: var(--surface2); + border-radius: 20px; + width: fit-content; + color: var(--accent); +} + +/* ── Chat Area ── */ +.chat-area { + flex: 1; + display: flex; + flex-direction: column; + overflow: hidden; +} + +.chat-header { + padding: 20px 28px 16px; + border-bottom: 1px solid var(--border); + background: var(--surface); +} + +.chat-header h1 { font-size: 1.1rem; font-weight: 700; } +.chat-header p { font-size: .8rem; color: var(--text-muted); margin-top: 2px; } + +/* Messages */ +.messages { + flex: 1; + overflow-y: auto; + padding: 24px 28px; + display: flex; + flex-direction: column; + gap: 18px; + scroll-behavior: smooth; +} + +.messages::-webkit-scrollbar { width: 6px; } +.messages::-webkit-scrollbar-track { background: transparent; } +.messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; } + +/* Message rows */ +.message { display: flex; flex-direction: column; max-width: 78%; } +.message.user { align-self: flex-end; align-items: flex-end; } +.message.assistant { align-self: flex-start; align-items: flex-start; } + +.bubble { + padding: 12px 16px; + border-radius: 16px; + font-size: .92rem; + line-height: 1.6; + white-space: pre-wrap; + word-break: break-word; +} + +.message.user .bubble { + background: var(--user-bg); + color: var(--user-text); + border-bottom-right-radius: 4px; +} + +.message.assistant .bubble { + background: var(--ai-bg); + color: var(--text); + border-bottom-left-radius: 4px; + border: 1px solid var(--border); +} + +.message.welcome .bubble { + background: transparent; + border: 1px dashed var(--border); + color: var(--text-muted); + font-style: italic; +} + +/* Sources */ +.sources { + margin-top: 6px; + display: flex; + flex-wrap: wrap; + gap: 6px; +} + +.source-tag { + font-size: .72rem; + padding: 3px 9px; + border-radius: 20px; + background: var(--surface2); + border: 1px solid var(--border); + color: var(--text-muted); +} + +.source-tag strong { color: var(--accent); } + +/* Typing indicator */ +.typing-dots span { + display: inline-block; + width: 7px; height: 7px; + margin: 0 2px; + background: var(--text-muted); + border-radius: 50%; + animation: bounce 1.2s infinite; +} +.typing-dots span:nth-child(2) { animation-delay: .2s; } +.typing-dots span:nth-child(3) { animation-delay: .4s; } + +@keyframes bounce { + 0%, 80%, 100% { transform: translateY(0); opacity: .5; } + 40% { transform: translateY(-6px); opacity: 1; } +} + +/* ── Input Bar ── */ +.input-bar { + display: flex; + align-items: flex-end; + gap: 10px; + padding: 16px 28px 20px; + border-top: 1px solid var(--border); + background: var(--surface); +} + +.question-input { + flex: 1; + resize: none; + background: var(--surface2); + border: 1px solid var(--border); + border-radius: var(--radius); + color: var(--text); + font-family: var(--font); + font-size: .92rem; + line-height: 1.5; + padding: 11px 14px; + max-height: 140px; + overflow-y: auto; + transition: border-color .2s; +} + +.question-input:focus { outline: none; border-color: var(--accent); } +.question-input::placeholder { color: var(--text-muted); } + +.btn-send { + display: flex; + align-items: center; + justify-content: center; + width: 44px; + height: 44px; + background: var(--accent); + border: none; + border-radius: 50%; + color: #000; + font-size: 1.1rem; + cursor: pointer; + flex-shrink: 0; + transition: background .2s, transform .1s; +} + +.btn-send:hover:not(:disabled) { background: var(--accent-dk); } +.btn-send:active:not(:disabled){ transform: scale(.93); } +.btn-send:disabled { opacity: .45; cursor: not-allowed; } + +/* ── Reference images ── */ +.ref-img-label { + margin-top: 10px; + font-size: .72rem; + font-weight: 600; + letter-spacing: .06em; + text-transform: uppercase; + color: var(--text-muted); +} + +.ref-img-grid { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin-top: 6px; +} + +.ref-img-wrapper { + border-radius: 8px; + overflow: hidden; + border: 1px solid var(--border); + background: var(--surface2); + flex: 0 0 auto; +} + +.ref-img { + display: block; + max-width: 240px; + max-height: 180px; + object-fit: contain; + cursor: zoom-in; + transition: opacity .15s; +} + +.ref-img:hover { opacity: .85; } + +/* ── Utility ── */ +.hidden { display: none !important; } + +.spinner { + width: 16px; height: 16px; + border: 2px solid rgba(0,0,0,.3); + border-top-color: #000; + border-radius: 50%; + animation: spin .7s linear infinite; +} + +@keyframes spin { to { transform: rotate(360deg); } } + +/* ── Auth overlay ── */ +.auth-overlay { + position: fixed; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + background: radial-gradient(circle at 30% 20%, #16202b, var(--bg)); + z-index: 50; + padding: 20px; +} + +.auth-card { + width: 100%; + max-width: 380px; + background: var(--surface); + border: 1px solid var(--border); + border-radius: 16px; + padding: 32px 28px; + display: flex; + flex-direction: column; + gap: 6px; + box-shadow: 0 24px 60px rgba(0,0,0,.45); +} + +.auth-brand { + display: flex; + align-items: center; + gap: 8px; + font-size: 1.4rem; + font-weight: 700; + justify-content: center; +} + +.auth-sub { + text-align: center; + color: var(--text-muted); + font-size: .85rem; + margin-bottom: 18px; +} + +.auth-tabs { + display: flex; + background: var(--surface2); + border-radius: 10px; + padding: 4px; + margin-bottom: 18px; +} + +.auth-tab { + flex: 1; + padding: 8px; + border: none; + background: transparent; + color: var(--text-muted); + font-size: .85rem; + font-weight: 600; + border-radius: 8px; + cursor: pointer; + transition: background .2s, color .2s; +} + +.auth-tab.active { background: var(--accent); color: #000; } + +.auth-form { display: flex; flex-direction: column; gap: 6px; } + +.auth-label { + font-size: .74rem; + font-weight: 600; + letter-spacing: .05em; + text-transform: uppercase; + color: var(--text-muted); + margin-top: 8px; +} + +.auth-input { + background: var(--surface2); + border: 1px solid var(--border); + border-radius: var(--radius); + color: var(--text); + font-family: var(--font); + font-size: .92rem; + padding: 11px 14px; + transition: border-color .2s; +} +.auth-input:focus { outline: none; border-color: var(--accent); } + +.auth-submit { + display: flex; + align-items: center; + justify-content: center; + gap: 8px; + margin-top: 18px; + padding: 12px; + background: var(--accent); + color: #000; + border: none; + border-radius: var(--radius); + font-size: .92rem; + font-weight: 700; + cursor: pointer; + transition: background .2s, opacity .2s; +} +.auth-submit:hover:not(:disabled) { background: var(--accent-dk); } +.auth-submit:disabled { opacity: .6; cursor: not-allowed; } + +.auth-message { + margin-top: 14px; + font-size: .82rem; + padding: 10px 12px; + border-radius: 8px; + line-height: 1.5; +} +.auth-message.error { background: rgba(220,70,70,.12); color: #ff9c9c; border: 1px solid rgba(220,70,70,.3); } +.auth-message.success { background: rgba(118,185,0,.12); color: #b6e26a; border: 1px solid rgba(118,185,0,.3); } + +/* ── New chat button ── */ +.btn-new-chat { + display: flex; + align-items: center; + justify-content: center; + gap: 6px; + width: 100%; + padding: 10px; + background: var(--surface2); + color: var(--text); + border: 1px solid var(--border); + border-radius: var(--radius); + font-size: .88rem; + font-weight: 600; + cursor: pointer; + transition: border-color .2s, background .2s; +} +.btn-new-chat:hover { border-color: var(--accent); background: rgba(118,185,0,.06); } +.btn-new-chat span { color: var(--accent); font-size: 1.1rem; line-height: 1; } + +/* ── Session list ── */ +.sessions-section { display: flex; flex-direction: column; min-height: 0; flex: 1; } + +.session-list { + list-style: none; + display: flex; + flex-direction: column; + gap: 4px; + overflow-y: auto; +} + +.session-item { + display: flex; + align-items: center; + justify-content: space-between; + gap: 6px; + padding: 8px 10px; + background: var(--surface2); + border-radius: 8px; + cursor: pointer; + border-left: 3px solid transparent; + transition: border-color .15s, background .15s; +} +.session-item:hover { background: #272c43; } +.session-item.active { border-left-color: var(--accent); background: #272c43; } + +.session-title { + flex: 1; + font-size: .82rem; + color: var(--text); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.session-del { + background: none; + border: none; + color: var(--text-muted); + font-size: 1.1rem; + line-height: 1; + cursor: pointer; + padding: 0 2px; + opacity: 0; + transition: opacity .15s, color .15s; +} +.session-item:hover .session-del { opacity: 1; } +.session-del:hover { color: #ff9c9c; } + +.session-empty { + color: var(--text-muted); + font-style: italic; + font-size: .8rem; + padding: 6px 4px; +} + +/* ── Documents (collapsible) ── */ +.upload-details summary { + cursor: pointer; + list-style: none; + user-select: none; +} +.upload-details summary::-webkit-details-marker { display: none; } +.upload-details summary::before { content: "\25B8 "; color: var(--text-muted); } +.upload-details[open] summary::before { content: "\25BE "; } +.upload-section { margin-top: 10px; } + +/* ── Account footer ── */ +.account { + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; +} +.account-email { + font-size: .76rem; + color: var(--text); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.btn-logout { + background: var(--surface2); + border: 1px solid var(--border); + color: var(--text-muted); + font-size: .72rem; + padding: 4px 10px; + border-radius: 8px; + cursor: pointer; + flex-shrink: 0; + transition: border-color .2s, color .2s; +} +.btn-logout:hover { border-color: var(--accent); color: var(--text); } + +/* ── Responsive ── */ +@media (max-width: 640px) { + .sidebar { width: 220px; padding: 16px 12px; } + .messages { padding: 16px; } + .input-bar { padding: 12px 16px 16px; } + .message { max-width: 92%; } +} diff --git a/images/.gitkeep b/images/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/images/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3_p11_i1.jpeg b/images/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3_p11_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..70f99b16251642576c7a8ed402706771b25f8798 --- /dev/null +++ b/images/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3_p11_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a39eb2a854706b0cfb8ec0b60bf6612cc6997cbde49a4f8dc56f0e45b0b13c04 +size 19560 diff --git a/images/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3_p13_i1.jpeg b/images/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3_p13_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..df49850d3d42a5161d3d0a77e7f5903a9140ef94 --- /dev/null +++ b/images/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3_p13_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc45b4eb87b36e531c7678151be4982fb6f942512cf9dd07cc226725f48990a8 +size 14601 diff --git a/images/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3_p1_i1.jpeg b/images/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..befd6666e742e7eab20643250559445f9ff8aed0 --- /dev/null +++ b/images/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ca8575a2c6653a59214015316954cc42468443087c414dfbd2b650898cfe4fb +size 5596 diff --git a/images/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3_p9_i1.jpeg b/images/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3_p9_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..70f99b16251642576c7a8ed402706771b25f8798 --- /dev/null +++ b/images/A011-Research-Honorarium-and-Conference-Assistance-Policy-V3_p9_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a39eb2a854706b0cfb8ec0b60bf6612cc6997cbde49a4f8dc56f0e45b0b13c04 +size 19560 diff --git a/images/A013-Policy-for-Workload-Relief-of-PhD-Scholars-V2_p1_i1.jpeg b/images/A013-Policy-for-Workload-Relief-of-PhD-Scholars-V2_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0417f6813f339ac2665a4f0b99794692cadf1cfb --- /dev/null +++ b/images/A013-Policy-for-Workload-Relief-of-PhD-Scholars-V2_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d579b7308388df49bc6b92aa8c5c32d4186cda9cc019a10b6edc799974c31764 +size 6980 diff --git a/images/A014-Policy-for-Honorarium-on-Research-Project-Grants-V1-16-08-2021_p1_i1.jpeg b/images/A014-Policy-for-Honorarium-on-Research-Project-Grants-V1-16-08-2021_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0b05401b9f3259555d81c5118c2f479f72ba2629 --- /dev/null +++ b/images/A014-Policy-for-Honorarium-on-Research-Project-Grants-V1-16-08-2021_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fd27cb2cd07d95349b5211e2417fa6ac538d80e43df13c455acd6647441fc89 +size 5493 diff --git a/images/A014-Policy-for-Honorarium-on-Research-Project-Grants-V2-08-05-2023_p1_i1.jpeg b/images/A014-Policy-for-Honorarium-on-Research-Project-Grants-V2-08-05-2023_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..2d4dcc254985123b420d337e12ed0e8ab6ceed58 --- /dev/null +++ b/images/A014-Policy-for-Honorarium-on-Research-Project-Grants-V2-08-05-2023_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d50b99d318304017fe0b2322d958d795dff1151f77d754c82946e34f10400ff7 +size 5493 diff --git a/images/A015-Semester-Rules-for-Post-Graduate-Programs-V2_p1_i1.jpeg b/images/A015-Semester-Rules-for-Post-Graduate-Programs-V2_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..e09df458ec05f9cbf2f016ca51d1371716002afe --- /dev/null +++ b/images/A015-Semester-Rules-for-Post-Graduate-Programs-V2_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:810d8a53c8b85f4c41327f3a9f65c5909e34a3afd4a48362e944c800506a2e10 +size 6974 diff --git a/images/A024-Policy-for-Transfer-of-Credit-Hours-Student-Mobility-12-08-2021-min_p1_i1.jpeg b/images/A024-Policy-for-Transfer-of-Credit-Hours-Student-Mobility-12-08-2021-min_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..2e0b44102929019f3b0ae70c7b1f6ad2f437a892 --- /dev/null +++ b/images/A024-Policy-for-Transfer-of-Credit-Hours-Student-Mobility-12-08-2021-min_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ac81b0a36d248f04b5ee2705b0f0a699f484cb2ce994befbe2f3c8d24b7d395 +size 5611 diff --git a/images/A025-Admission-Policy-Fall-2021-12-08-2021-min_p1_i1.jpeg b/images/A025-Admission-Policy-Fall-2021-12-08-2021-min_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..dea84e7ffe0da381fef4fd9e8b1f5e15f6abadc6 --- /dev/null +++ b/images/A025-Admission-Policy-Fall-2021-12-08-2021-min_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84d75930aa4fdb39740c1ae830b633ca6a70b03fd62306050162b9c228532b44 +size 5393 diff --git a/images/A026-Policy-for-Role-and-Responsibility-of-Academic-Advisor-V1_p1_i2.jpeg b/images/A026-Policy-for-Role-and-Responsibility-of-Academic-Advisor-V1_p1_i2.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..a79bac6c2d6182adc2407c98285b2291089b7044 --- /dev/null +++ b/images/A026-Policy-for-Role-and-Responsibility-of-Academic-Advisor-V1_p1_i2.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5e3a491aaa24936d224bdab2e9d525508e541bae7cb8724bf464c2ee13b42e6 +size 5892 diff --git a/images/A028-Internship-Policy-and-Mechanism-V1_p1_i1.jpeg b/images/A028-Internship-Policy-and-Mechanism-V1_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5488f1d6f83b8708d3c5e6e3f98135e475760c1b --- /dev/null +++ b/images/A028-Internship-Policy-and-Mechanism-V1_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e21094ba2d0b4725495ebc5aef90e5d054f4b640c6bfdfaf51d2c5ce87561427 +size 6100 diff --git a/images/A028-Internship-Policy-and-Mechanism-V1_p4_i5.png b/images/A028-Internship-Policy-and-Mechanism-V1_p4_i5.png new file mode 100644 index 0000000000000000000000000000000000000000..c11847f05819097658e3907793a7f4c490bc624b --- /dev/null +++ b/images/A028-Internship-Policy-and-Mechanism-V1_p4_i5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94166e5f9ad9bb922175af334a070f81d0ad0df248168c72c8a0d39d7eedd4b6 +size 600 diff --git a/images/A028-Internship-Policy-and-Mechanism-V1_p5_i1.jpeg b/images/A028-Internship-Policy-and-Mechanism-V1_p5_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..24b1878eab017aca08df129089af29771ffbef96 --- /dev/null +++ b/images/A028-Internship-Policy-and-Mechanism-V1_p5_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4ea480008d0ae7e4d3230392848afdacea2c741c801cae1e18cb6582e2d8012 +size 66475 diff --git a/images/A07-Rules-Regulations-for-the-Degree-of-Masters-in-Science-V2_p1_i1.jpeg b/images/A07-Rules-Regulations-for-the-Degree-of-Masters-in-Science-V2_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..e09df458ec05f9cbf2f016ca51d1371716002afe --- /dev/null +++ b/images/A07-Rules-Regulations-for-the-Degree-of-Masters-in-Science-V2_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:810d8a53c8b85f4c41327f3a9f65c5909e34a3afd4a48362e944c800506a2e10 +size 6974 diff --git a/images/A08-Rules-and-Regulations-for-the-degree-of-PhD-V5_p1_i1.jpeg b/images/A08-Rules-and-Regulations-for-the-degree-of-PhD-V5_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..ec1e125c05a3e88b7cad0102841f7fb6ae78bee7 --- /dev/null +++ b/images/A08-Rules-and-Regulations-for-the-degree-of-PhD-V5_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5b89a48b2edce942a6caf9d51cf13c20b72b7b0b438e693184ab5c005e0cb9f +size 5623 diff --git a/images/A21-Attendance-Policy-for-Online-Classes-Fall-2020-1-converted_p1_i1.jpeg b/images/A21-Attendance-Policy-for-Online-Classes-Fall-2020-1-converted_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..25feae9b2db4638e1b3bd51887113ed294e42f2c --- /dev/null +++ b/images/A21-Attendance-Policy-for-Online-Classes-Fall-2020-1-converted_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da699ca19fc1d81517c4268862520b9b0fe09f610d79c98d597684015662906f +size 7025 diff --git a/images/Academic-Freedom-Policy_p1_i1.jpeg b/images/Academic-Freedom-Policy_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0417f6813f339ac2665a4f0b99794692cadf1cfb --- /dev/null +++ b/images/Academic-Freedom-Policy_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d579b7308388df49bc6b92aa8c5c32d4186cda9cc019a10b6edc799974c31764 +size 6980 diff --git a/images/Academic-Rules-Regulations_p1_i1.jpeg b/images/Academic-Rules-Regulations_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..25feae9b2db4638e1b3bd51887113ed294e42f2c --- /dev/null +++ b/images/Academic-Rules-Regulations_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da699ca19fc1d81517c4268862520b9b0fe09f610d79c98d597684015662906f +size 7025 diff --git a/images/Admission-Policy-2021-2022-12-06-2021-V0-converted-min_p1_i1.jpeg b/images/Admission-Policy-2021-2022-12-06-2021-V0-converted-min_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..902f61c6afdb9d21431392817d2254964c9d6fc1 --- /dev/null +++ b/images/Admission-Policy-2021-2022-12-06-2021-V0-converted-min_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bae5d4480a6a807bed84951e302fb082ad40f289d7abf90a43a2bf7ba809be71 +size 7001 diff --git a/images/Admission-Policy-2022-2023-14-11-2022-min_p1_i1.jpeg b/images/Admission-Policy-2022-2023-14-11-2022-min_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..baeb52ce7e7c8c23403f36312d3543381039cdb8 --- /dev/null +++ b/images/Admission-Policy-2022-2023-14-11-2022-min_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f23d1d8ae31760a1072e10227f17633dbe683ddfb82f8b879c4a571caafe45e4 +size 5640 diff --git a/images/Admission-Policy-2022-2023-14-11-2022-min_p24_i1.jpeg b/images/Admission-Policy-2022-2023-14-11-2022-min_p24_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..505ccc4432d4abbe23aede2de77afb318299e7e2 --- /dev/null +++ b/images/Admission-Policy-2022-2023-14-11-2022-min_p24_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:863b6cf540686a2225e29baae502ec8ee18f15ce4cab39946431dc9ddc59438c +size 31338 diff --git a/images/Admission-Policy-2024-2025_p16_i1.jpeg b/images/Admission-Policy-2024-2025_p16_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5afaf96758454ade7c64144595de2173f5a071e7 --- /dev/null +++ b/images/Admission-Policy-2024-2025_p16_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e86620e5d9532efba70150864503ebb1fc234aa4ca761f52624aa2da379b9490 +size 102389 diff --git a/images/Admission-Policy-2024-2025_p1_i1.jpeg b/images/Admission-Policy-2024-2025_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..902f61c6afdb9d21431392817d2254964c9d6fc1 --- /dev/null +++ b/images/Admission-Policy-2024-2025_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bae5d4480a6a807bed84951e302fb082ad40f289d7abf90a43a2bf7ba809be71 +size 7001 diff --git a/images/Admission-Policy-2024-2025_p22_i1.jpeg b/images/Admission-Policy-2024-2025_p22_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..cc7fd5d315b603bff3e906f6f6f31da1d0e31415 --- /dev/null +++ b/images/Admission-Policy-2024-2025_p22_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52b594332d728f3898f2873c03ba4a72bcf6a36cf4182dcc61b4f4654996c64a +size 41766 diff --git a/images/Admission-Policy-2024-2025_p23_i1.jpeg b/images/Admission-Policy-2024-2025_p23_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..67ee50f6ffa9e54be674fc51b3d1071595b8d118 --- /dev/null +++ b/images/Admission-Policy-2024-2025_p23_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5ab637e8897a9f45c4d72a8b0ff1ae48a188c1c3b9d2f8d3e6bf208e59ed845 +size 88837 diff --git a/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p1_i1.jpeg b/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..114935ff6cabb40bf7115c28451b4b67df060752 --- /dev/null +++ b/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c617c306d9d031c689095126d39517e35c5f053a3f79fd20adcfc17cf1289027 +size 84076 diff --git a/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p2_i1.jpeg b/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p2_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d21cdc48b9a1e6512847d69b0fb530c2af40c1e1 --- /dev/null +++ b/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p2_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c50a2aeace2e14b588882da4149a98dd51e51c620dc51fa4fbfd919470f79848 +size 135574 diff --git a/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p3_i1.jpeg b/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p3_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d300e7e6c25edc5971098324052dabd1336d3766 --- /dev/null +++ b/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p3_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a06b210e8e946a5ccfcfa1f7d2be9bb3041bfa46f7cc2b073ebdb0d5765f84ac +size 123897 diff --git a/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p4_i1.jpeg b/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p4_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3e205b53e9507f8b70ae11dc9678fb3f0799e32e --- /dev/null +++ b/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p4_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7e950fd7ed381e1c82872154bb8e66951e0007ac377453037740faf4cb6afe7 +size 113280 diff --git a/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p5_i1.jpeg b/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p5_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..e1a640c01cfb33079815de9c7b6ee37e31c33087 --- /dev/null +++ b/images/Amendment_Policy_Sexual_Harassment-ACT-2022_p5_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:919b26ce46b8915da47d4241c5d394202a001ed501279c421d402f5a17f2576f +size 130290 diff --git a/images/Annex-F-SSUET-MBA-Rules-Regulations-Ver-2_p1_i1.jpeg b/images/Annex-F-SSUET-MBA-Rules-Regulations-Ver-2_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7dc84bdb66aa8e31618c951b640be665fcdc48b1 --- /dev/null +++ b/images/Annex-F-SSUET-MBA-Rules-Regulations-Ver-2_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0aa2077286ac29362ef0a5c96950d364a673e8df9ed7293686fe37c79e332a5 +size 12195 diff --git a/images/Appeals-Procedure-Policy_p1_i1.jpeg b/images/Appeals-Procedure-Policy_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0417f6813f339ac2665a4f0b99794692cadf1cfb --- /dev/null +++ b/images/Appeals-Procedure-Policy_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d579b7308388df49bc6b92aa8c5c32d4186cda9cc019a10b6edc799974c31764 +size 6980 diff --git a/images/Application-Form-for-Publication-Honorarium-1-converted_p1_i1.jpeg b/images/Application-Form-for-Publication-Honorarium-1-converted_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..608d15a40fbe4a525951cf02172f5def9024b4e8 --- /dev/null +++ b/images/Application-Form-for-Publication-Honorarium-1-converted_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5854b6bfdcd67e69f92eea37b7d7c8187f50600d3b80018c9fa0f1eb1bc52da +size 23417 diff --git a/images/Application-Form-for-Publication-Honorarium-1-converted_p2_i1.jpeg b/images/Application-Form-for-Publication-Honorarium-1-converted_p2_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..608d15a40fbe4a525951cf02172f5def9024b4e8 --- /dev/null +++ b/images/Application-Form-for-Publication-Honorarium-1-converted_p2_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5854b6bfdcd67e69f92eea37b7d7c8187f50600d3b80018c9fa0f1eb1bc52da +size 23417 diff --git a/images/Arrangements-to-Prevent-Fradulent-Claims-of-Degree-Policy (1)_p1_i1.jpeg b/images/Arrangements-to-Prevent-Fradulent-Claims-of-Degree-Policy (1)_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..f8f760d169fd607e683e7838b2e23b7466a53a79 --- /dev/null +++ b/images/Arrangements-to-Prevent-Fradulent-Claims-of-Degree-Policy (1)_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d527a7d0773e2896b0349ab34e0fbf419437bd1c6f0187b6504fe1ef5ba6e88 +size 6977 diff --git a/images/Arrangements-to-Prevent-Fradulent-Claims-of-Degree-Policy_p1_i1.jpeg b/images/Arrangements-to-Prevent-Fradulent-Claims-of-Degree-Policy_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..f8f760d169fd607e683e7838b2e23b7466a53a79 --- /dev/null +++ b/images/Arrangements-to-Prevent-Fradulent-Claims-of-Degree-Policy_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d527a7d0773e2896b0349ab34e0fbf419437bd1c6f0187b6504fe1ef5ba6e88 +size 6977 diff --git a/images/Conflict-of-Interest-Policy_p1_i1.jpeg b/images/Conflict-of-Interest-Policy_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0417f6813f339ac2665a4f0b99794692cadf1cfb --- /dev/null +++ b/images/Conflict-of-Interest-Policy_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d579b7308388df49bc6b92aa8c5c32d4186cda9cc019a10b6edc799974c31764 +size 6980 diff --git a/images/Environment-Health-and-Safety-Policy_p1_i1.jpeg b/images/Environment-Health-and-Safety-Policy_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..25feae9b2db4638e1b3bd51887113ed294e42f2c --- /dev/null +++ b/images/Environment-Health-and-Safety-Policy_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da699ca19fc1d81517c4268862520b9b0fe09f610d79c98d597684015662906f +size 7025 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p10_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p10_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7aa2afbc9c87c659880a02d4b0dbd50f53015a77 --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p10_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b725f4742fe0189010c844955f61aa624298abef7a32df8cd46fd2248478221 +size 15605 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p11_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p11_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..bfdea37f6acc9c8af65db4f88b4a1e4e0eeb0689 --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p11_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26e812d117f2638422988fd0c768c8fbe61ee906bb0019da7a09d1b6bb9b7ed2 +size 14248 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p13_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p13_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5bc2c70fe8273df784ad82f50571572f9aed684f --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p13_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04bc68812e81093783e9b2a7f48ac2584a5545670f94d4f6fb50159f00b1d97a +size 14023 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p15_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p15_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d3839cb57ce0d8e88241f2991c4b1820403df807 --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p15_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7a5dc53df5ce410445f037618279219063441bf353416ee18192fb0597df5da +size 11916 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p17_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p17_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..fe9b3c1121c88c91062d4bc152fd9e072aac2263 --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p17_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fd12a049a0d782aee21451856d0529fd072b24ced174e4f992a75928d1f1fd6 +size 12225 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p1_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0417f6813f339ac2665a4f0b99794692cadf1cfb --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d579b7308388df49bc6b92aa8c5c32d4186cda9cc019a10b6edc799974c31764 +size 6980 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p20_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p20_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..fe9b3c1121c88c91062d4bc152fd9e072aac2263 --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p20_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fd12a049a0d782aee21451856d0529fd072b24ced174e4f992a75928d1f1fd6 +size 12225 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p22_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p22_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..4dc44d0ab8fb27796c76bf4b6cc8737adba4b632 --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p22_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ef43936ed876614ee8cff0c594fe237c263301af0d36a24f330d3284f0d6153 +size 16262 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p24_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p24_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..8658a7e27eb1c4f0807efba681e02c666754f5f8 --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p24_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a1b76bef1c6d6f11e7d0151cd145bdcfbee73ef835fb1314a08c53de4122753 +size 13526 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p27_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p27_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..ebbd2db0b88566a6cd8e0e02c9eee011aa27fc7f --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p27_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b81f105e5e8be40a5e3eea203a6f22a5b71a83ba324a039d557206790c8e1544 +size 15643 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p30_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p30_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..ebbd2db0b88566a6cd8e0e02c9eee011aa27fc7f --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p30_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b81f105e5e8be40a5e3eea203a6f22a5b71a83ba324a039d557206790c8e1544 +size 15643 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p33_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p33_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..ebbd2db0b88566a6cd8e0e02c9eee011aa27fc7f --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p33_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b81f105e5e8be40a5e3eea203a6f22a5b71a83ba324a039d557206790c8e1544 +size 15643 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p35_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p35_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..ebbd2db0b88566a6cd8e0e02c9eee011aa27fc7f --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p35_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b81f105e5e8be40a5e3eea203a6f22a5b71a83ba324a039d557206790c8e1544 +size 15643 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p37_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p37_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..ebbd2db0b88566a6cd8e0e02c9eee011aa27fc7f --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p37_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b81f105e5e8be40a5e3eea203a6f22a5b71a83ba324a039d557206790c8e1544 +size 15643 diff --git a/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p38_i1.jpeg b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p38_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..8658a7e27eb1c4f0807efba681e02c666754f5f8 --- /dev/null +++ b/images/Evaluation-of-University-Performance-by-Stakeholders-Policy_p38_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a1b76bef1c6d6f11e7d0151cd145bdcfbee73ef835fb1314a08c53de4122753 +size 13526 diff --git a/images/G009-Employee-Separation-Policy-and-Procedure-V1-14-02-2023_p1_i1.jpeg b/images/G009-Employee-Separation-Policy-and-Procedure-V1-14-02-2023_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..befd6666e742e7eab20643250559445f9ff8aed0 --- /dev/null +++ b/images/G009-Employee-Separation-Policy-and-Procedure-V1-14-02-2023_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ca8575a2c6653a59214015316954cc42468443087c414dfbd2b650898cfe4fb +size 5596 diff --git a/images/G023-Policy-and-Procedure-for-Flexible-Working-Hours-V1-12-11-21_p1_i1.jpeg b/images/G023-Policy-and-Procedure-for-Flexible-Working-Hours-V1-12-11-21_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..902f61c6afdb9d21431392817d2254964c9d6fc1 --- /dev/null +++ b/images/G023-Policy-and-Procedure-for-Flexible-Working-Hours-V1-12-11-21_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bae5d4480a6a807bed84951e302fb082ad40f289d7abf90a43a2bf7ba809be71 +size 7001 diff --git a/images/G024-Policy-and-Procedure-for-Engaging-Interns_p1_i1.jpeg b/images/G024-Policy-and-Procedure-for-Engaging-Interns_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..902f61c6afdb9d21431392817d2254964c9d6fc1 --- /dev/null +++ b/images/G024-Policy-and-Procedure-for-Engaging-Interns_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bae5d4480a6a807bed84951e302fb082ad40f289d7abf90a43a2bf7ba809be71 +size 7001 diff --git a/images/G025-Policy-Against-Drug-and-Tobacco-Abuse-at-SSUET-12-08-2021-min (1)_p1_i1.jpeg b/images/G025-Policy-Against-Drug-and-Tobacco-Abuse-at-SSUET-12-08-2021-min (1)_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..befd6666e742e7eab20643250559445f9ff8aed0 --- /dev/null +++ b/images/G025-Policy-Against-Drug-and-Tobacco-Abuse-at-SSUET-12-08-2021-min (1)_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ca8575a2c6653a59214015316954cc42468443087c414dfbd2b650898cfe4fb +size 5596 diff --git a/images/G025-Policy-Against-Drug-and-Tobacco-Abuse-at-SSUET-12-08-2021-min_p1_i1.jpeg b/images/G025-Policy-Against-Drug-and-Tobacco-Abuse-at-SSUET-12-08-2021-min_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..befd6666e742e7eab20643250559445f9ff8aed0 --- /dev/null +++ b/images/G025-Policy-Against-Drug-and-Tobacco-Abuse-at-SSUET-12-08-2021-min_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ca8575a2c6653a59214015316954cc42468443087c414dfbd2b650898cfe4fb +size 5596 diff --git a/images/G029-Policy-and-Procedures-for-Engaging-Temporary-Teaching-Staff-V2_2_p1_i1.jpeg b/images/G029-Policy-and-Procedures-for-Engaging-Temporary-Teaching-Staff-V2_2_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..9aa1f0cfd5be953f3e9d329d8079cf6f340bf505 --- /dev/null +++ b/images/G029-Policy-and-Procedures-for-Engaging-Temporary-Teaching-Staff-V2_2_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:579ace31126cfd90492d03b4905b9929ad1bf642b0e2fc199b327f06aef02da6 +size 6946 diff --git a/images/G029-Policy-and-Procedures-for-Engaging-Temporary-Teaching-Staff-V2_2_p8_i1.jpx b/images/G029-Policy-and-Procedures-for-Engaging-Temporary-Teaching-Staff-V2_2_p8_i1.jpx new file mode 100644 index 0000000000000000000000000000000000000000..af08245b95628ed97500a561d31bed7ed11eee58 Binary files /dev/null and b/images/G029-Policy-and-Procedures-for-Engaging-Temporary-Teaching-Staff-V2_2_p8_i1.jpx differ diff --git a/images/G03-Policy-for-Students-with-Disabilities-V2-12-08-2021-min_p1_i1.jpeg b/images/G03-Policy-for-Students-with-Disabilities-V2-12-08-2021-min_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..befd6666e742e7eab20643250559445f9ff8aed0 --- /dev/null +++ b/images/G03-Policy-for-Students-with-Disabilities-V2-12-08-2021-min_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ca8575a2c6653a59214015316954cc42468443087c414dfbd2b650898cfe4fb +size 5596 diff --git a/images/G03-Policy-for-Students-with-Disabilities-V2-12-08-2021-min_p3_i1.jpeg b/images/G03-Policy-for-Students-with-Disabilities-V2-12-08-2021-min_p3_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..2851efa34f44ce3afe06e81b9a4381260fad851d --- /dev/null +++ b/images/G03-Policy-for-Students-with-Disabilities-V2-12-08-2021-min_p3_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92de69d981b6c5fcf04b3cab7b64cb71de3dbc335ddc6d7a7034186a8aa47f4e +size 9324 diff --git a/images/G033-Onboarding-Staff-Induction-Policy-Procedures-V1-11-01-2023_p1_i1.jpeg b/images/G033-Onboarding-Staff-Induction-Policy-Procedures-V1-11-01-2023_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1b9b2a3d759fc317fcf8fe61eedb8e6567f3a3a5 --- /dev/null +++ b/images/G033-Onboarding-Staff-Induction-Policy-Procedures-V1-11-01-2023_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8330e0e8a169842ec8f2351f03c61f9196b03b36a63063720af64ae0884601c +size 6757 diff --git a/images/G033-Onboarding-Staff-Induction-Policy-Procedures-V1-11-01-2023_p5_i1.jpeg b/images/G033-Onboarding-Staff-Induction-Policy-Procedures-V1-11-01-2023_p5_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d1c1ced7bf28cb2d0e94f1b7b359deba5a5a3c73 --- /dev/null +++ b/images/G033-Onboarding-Staff-Induction-Policy-Procedures-V1-11-01-2023_p5_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf0b1f8b119dd86f342ac6d25d0d620a23ef70d965f34d82194ae16931e44af7 +size 3575 diff --git a/images/G051-Patent-Support-Policy-V1_p1_i1.jpeg b/images/G051-Patent-Support-Policy-V1_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..b24815fc7036278a5803b6890eeb7ebb17943c7b --- /dev/null +++ b/images/G051-Patent-Support-Policy-V1_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffe04d0e3f0b92f99bd175240139798cd35bb835825f6c8735af08bc660da50c +size 32586 diff --git a/images/G30-Policy-for-Authorization-of-Cellular-Phone-and-Calling-Cards-V1-07-12-21_p1_i1.jpeg b/images/G30-Policy-for-Authorization-of-Cellular-Phone-and-Calling-Cards-V1-07-12-21_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..baeb52ce7e7c8c23403f36312d3543381039cdb8 --- /dev/null +++ b/images/G30-Policy-for-Authorization-of-Cellular-Phone-and-Calling-Cards-V1-07-12-21_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f23d1d8ae31760a1072e10227f17633dbe683ddfb82f8b879c4a571caafe45e4 +size 5640 diff --git a/images/Grading-System_p10_i1.png b/images/Grading-System_p10_i1.png new file mode 100644 index 0000000000000000000000000000000000000000..db02e15270a8b243c318de5e7681e710a1012826 --- /dev/null +++ b/images/Grading-System_p10_i1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29d6b45a104ff92172b61dd5ad4df7c652b2b5b017fd8fb9393d48771bcd0823 +size 191745 diff --git a/images/Grading-System_p12_i1.png b/images/Grading-System_p12_i1.png new file mode 100644 index 0000000000000000000000000000000000000000..167c0d05400f9a8968af23a12b12858d2843d47f --- /dev/null +++ b/images/Grading-System_p12_i1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14db4a9284c8dad456a2c6b559420d9badf27685ec1edfc0a84d0eb796a52b09 +size 56046 diff --git a/images/Grading-System_p12_i2.png b/images/Grading-System_p12_i2.png new file mode 100644 index 0000000000000000000000000000000000000000..c6b5c8dd4a038874fae0aa62b4de91b8fd806b90 --- /dev/null +++ b/images/Grading-System_p12_i2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52109f4f60e8773a8bf47f38ef5b4a30fdeaa63ddde656e9387bddb5a380184a +size 60016 diff --git a/images/Grading-System_p15_i1.png b/images/Grading-System_p15_i1.png new file mode 100644 index 0000000000000000000000000000000000000000..123321abbbc6b12441713f6c5039704d38b3372b --- /dev/null +++ b/images/Grading-System_p15_i1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a89ddbabc9f69f6e6640ee57a92dd8167e22acfcbb8b642170304c59c3defcdb +size 191063 diff --git a/images/Grading-System_p18_i1.png b/images/Grading-System_p18_i1.png new file mode 100644 index 0000000000000000000000000000000000000000..6a6fb61b7b0a8fe4f0201a74dcfbe4dc6b25436d --- /dev/null +++ b/images/Grading-System_p18_i1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:012ae134d03362ff28c48fc5e639ff276a2b585e97fe3500497f226f5babc91b +size 153533 diff --git a/images/Grading-System_p1_i1.jpeg b/images/Grading-System_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0417f6813f339ac2665a4f0b99794692cadf1cfb --- /dev/null +++ b/images/Grading-System_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d579b7308388df49bc6b92aa8c5c32d4186cda9cc019a10b6edc799974c31764 +size 6980 diff --git a/images/Grading-System_p5_i1.png b/images/Grading-System_p5_i1.png new file mode 100644 index 0000000000000000000000000000000000000000..8740064ad0154d59c719cba174e5334fe79839e9 --- /dev/null +++ b/images/Grading-System_p5_i1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:037e6b62b26f23bbaf83d8f66a4ea7f9c2a64319c69f41658179230653af96fb +size 196567 diff --git a/images/HEC-Refund-Policy-2024_p1_i1.jpeg b/images/HEC-Refund-Policy-2024_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..fed4260ae7d7deaee14f7c4cd7290df6dd261093 --- /dev/null +++ b/images/HEC-Refund-Policy-2024_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eeda7531cdc397706aa525a2b6b50ec8eb8eac7d31e5e5c7a661e01ee495d50a +size 43080 diff --git a/images/Members-of-Inquiry-Committee-for-Protection-against-Sexual-Harassment-at-SSUET_p1_i1.png b/images/Members-of-Inquiry-Committee-for-Protection-against-Sexual-Harassment-at-SSUET_p1_i1.png new file mode 100644 index 0000000000000000000000000000000000000000..1d490e5855a51191059c551a494208dfdacdfb17 --- /dev/null +++ b/images/Members-of-Inquiry-Committee-for-Protection-against-Sexual-Harassment-at-SSUET_p1_i1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa7bb2ae307d94c0504f72570f35852fd1879d4e406ddc2e4baf50f019575464 +size 93730 diff --git a/images/Migration-Policy_p1_i1.jpeg b/images/Migration-Policy_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..f8f760d169fd607e683e7838b2e23b7466a53a79 --- /dev/null +++ b/images/Migration-Policy_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d527a7d0773e2896b0349ab34e0fbf419437bd1c6f0187b6504fe1ef5ba6e88 +size 6977 diff --git a/images/ORIC-Policy_p10_i1.jpeg b/images/ORIC-Policy_p10_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..c11f581dc7f66bc082cc4adb29efb64a9a4b63d9 --- /dev/null +++ b/images/ORIC-Policy_p10_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca72e2e907a3b91a914d025bb1c6e7085e306784db08d285eab90e37b02787db +size 20238 diff --git a/images/ORIC-Policy_p1_i1.jpeg b/images/ORIC-Policy_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0417f6813f339ac2665a4f0b99794692cadf1cfb --- /dev/null +++ b/images/ORIC-Policy_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d579b7308388df49bc6b92aa8c5c32d4186cda9cc019a10b6edc799974c31764 +size 6980 diff --git a/images/ORIC-Policy_p4_i5.png b/images/ORIC-Policy_p4_i5.png new file mode 100644 index 0000000000000000000000000000000000000000..9b5423d39e200d77dbf07af87b0f634b58aa7215 --- /dev/null +++ b/images/ORIC-Policy_p4_i5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb49bb92486a69d36d33540940f9c567741218cb0ea24b85974ac92039e825ac +size 18257 diff --git a/images/PGP-Semester-Rules_p1_i1.jpeg b/images/PGP-Semester-Rules_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..25feae9b2db4638e1b3bd51887113ed294e42f2c --- /dev/null +++ b/images/PGP-Semester-Rules_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da699ca19fc1d81517c4268862520b9b0fe09f610d79c98d597684015662906f +size 7025 diff --git a/images/Plagiarism-Policy-of-SSUET_p1_i1.jpeg b/images/Plagiarism-Policy-of-SSUET_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..25feae9b2db4638e1b3bd51887113ed294e42f2c --- /dev/null +++ b/images/Plagiarism-Policy-of-SSUET_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da699ca19fc1d81517c4268862520b9b0fe09f610d79c98d597684015662906f +size 7025 diff --git a/images/Plagiarism-Policy-of-SSUET_p2_i1.jpeg b/images/Plagiarism-Policy-of-SSUET_p2_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..950ac89fb188a32deca891d7737839e81677fa3f --- /dev/null +++ b/images/Plagiarism-Policy-of-SSUET_p2_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2127e649720c9f0533dc6ef7b53031aa90f4c6e6fd9a5409d3169686a1458cf2 +size 246330 diff --git a/images/Policy-Communication-of-Approved-Policies-and-SOPs-to-all-Stakeholders_p1_i1.jpeg b/images/Policy-Communication-of-Approved-Policies-and-SOPs-to-all-Stakeholders_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..412e96b56084493bdac85719ca85daa10221663d --- /dev/null +++ b/images/Policy-Communication-of-Approved-Policies-and-SOPs-to-all-Stakeholders_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b5347d1af06afce1b215d8e86dda9495df13dfb6743cc38b72e8429984929ca +size 6980 diff --git a/images/Policy-Procedure-for-KPI-for-Academic-Staff-V1_p1_i1.jpeg b/images/Policy-Procedure-for-KPI-for-Academic-Staff-V1_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0104a4fb9cfa54061ca4302b5b2c88bd44abaf35 --- /dev/null +++ b/images/Policy-Procedure-for-KPI-for-Academic-Staff-V1_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db7509bf32decc08f9999b36d5c7eacc2a267665f48a10661bd47f6d2c6076c5 +size 5639 diff --git a/images/Policy-Procedures-for-Resolving-Grievances_p10_i1.jpeg b/images/Policy-Procedures-for-Resolving-Grievances_p10_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d21332170b8e76de92f6a9274a3d41c85d0e461c --- /dev/null +++ b/images/Policy-Procedures-for-Resolving-Grievances_p10_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3192598db45c14e0d5dc841a67179f29a8687b2979f1fa706c0a0985a834acac +size 5357 diff --git a/images/Policy-Procedures-for-Resolving-Grievances_p1_i1.jpeg b/images/Policy-Procedures-for-Resolving-Grievances_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..25feae9b2db4638e1b3bd51887113ed294e42f2c --- /dev/null +++ b/images/Policy-Procedures-for-Resolving-Grievances_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da699ca19fc1d81517c4268862520b9b0fe09f610d79c98d597684015662906f +size 7025 diff --git a/images/Policy-Procedures-for-Resolving-Grievances_p9_i1.jpeg b/images/Policy-Procedures-for-Resolving-Grievances_p9_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d21332170b8e76de92f6a9274a3d41c85d0e461c --- /dev/null +++ b/images/Policy-Procedures-for-Resolving-Grievances_p9_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3192598db45c14e0d5dc841a67179f29a8687b2979f1fa706c0a0985a834acac +size 5357 diff --git a/images/Policy-Procedures-of-Examinations-Assessment-V1_p1_i1.jpeg b/images/Policy-Procedures-of-Examinations-Assessment-V1_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..71e2b8b8bf24cefbc6cb6f9f697a0160698cc616 --- /dev/null +++ b/images/Policy-Procedures-of-Examinations-Assessment-V1_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d1516682edacf140a79c94e3ed2e7191a220049f9c6fd02bd227023bdc19334 +size 7038 diff --git a/images/Policy-Procedures-of-Examinations-Assessment-V1_p1_i2.png b/images/Policy-Procedures-of-Examinations-Assessment-V1_p1_i2.png new file mode 100644 index 0000000000000000000000000000000000000000..18dd691c98db5853bb92dfe6c7c4a802089eebb7 --- /dev/null +++ b/images/Policy-Procedures-of-Examinations-Assessment-V1_p1_i2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63f9590eb4fc91eac9ee4f3021751554bff6b54b6bd2c95f8510f2d7e8b0cdfc +size 1487 diff --git a/images/Policy-and-Procedures-for-online-education-1_p1_i1.jpeg b/images/Policy-and-Procedures-for-online-education-1_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0417f6813f339ac2665a4f0b99794692cadf1cfb --- /dev/null +++ b/images/Policy-and-Procedures-for-online-education-1_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d579b7308388df49bc6b92aa8c5c32d4186cda9cc019a10b6edc799974c31764 +size 6980 diff --git a/images/Policy-for-Center-for-GCPP_p1_i1.jpeg b/images/Policy-for-Center-for-GCPP_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0417f6813f339ac2665a4f0b99794692cadf1cfb --- /dev/null +++ b/images/Policy-for-Center-for-GCPP_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d579b7308388df49bc6b92aa8c5c32d4186cda9cc019a10b6edc799974c31764 +size 6980 diff --git a/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p1_i1.jpeg b/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..8d06a5c51d4d7eb9b09b864906f43a3ca006c7a0 --- /dev/null +++ b/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32eb56aa95ccf69c302cfc14d7da5c6aa3655ef535c5566ff8fb0cc8d84b4460 +size 5665 diff --git a/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p1_i3.jpeg b/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p1_i3.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..b0d4fb5a003eb1eebe2b312888a43865b18a7ae5 --- /dev/null +++ b/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p1_i3.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:548f7e834599e167d572764c59e455168f67385b02684f18af1fd53a7748a58c +size 6166 diff --git a/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p9_i2.jpeg b/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p9_i2.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1e804672a53dd337049d62c1937e0a7e3e8671ff --- /dev/null +++ b/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p9_i2.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e70f0a4f5df533499f8b657bb3d93fcbe4c14ede7948d4ae48e5fde7b67eacb +size 75412 diff --git a/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p9_i3.jpeg b/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p9_i3.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..ab9448159cf0426325660bcaf233e1512cea211f --- /dev/null +++ b/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p9_i3.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99f857197a5c7dc71fe7ccebf5815f26fcaccfdf3d7b555f11d8d5b1653adef1 +size 71509 diff --git a/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p9_i4.jpeg b/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p9_i4.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..60456daa8c3f346713b3589bd6c27d787dda8a05 --- /dev/null +++ b/images/Policy-for-Faculty-Appointment-and-Promotion-Criteria_p9_i4.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6bb26e2b539f34219875cbaea34b75b7484d699fbac43222684753435880f04 +size 82683 diff --git a/images/Policy-for-Faculty-Members-Involved-with-Services-to-Industry_p1_i1.jpeg b/images/Policy-for-Faculty-Members-Involved-with-Services-to-Industry_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..f8f760d169fd607e683e7838b2e23b7466a53a79 --- /dev/null +++ b/images/Policy-for-Faculty-Members-Involved-with-Services-to-Industry_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d527a7d0773e2896b0349ab34e0fbf419437bd1c6f0187b6504fe1ef5ba6e88 +size 6977 diff --git a/images/Policy-for-Modes-of-Formal-Communication_p1_i1.jpeg b/images/Policy-for-Modes-of-Formal-Communication_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0417f6813f339ac2665a4f0b99794692cadf1cfb --- /dev/null +++ b/images/Policy-for-Modes-of-Formal-Communication_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d579b7308388df49bc6b92aa8c5c32d4186cda9cc019a10b6edc799974c31764 +size 6980 diff --git a/images/Policy-for-Online-First-Publication-of-SSURJET-Articles_p1_i1.jpeg b/images/Policy-for-Online-First-Publication-of-SSURJET-Articles_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..683d65a4a320ac6b4bd0102a471c82741dab89bc --- /dev/null +++ b/images/Policy-for-Online-First-Publication-of-SSURJET-Articles_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4a540e709001f12c2ecc6bb2d4f711bfe2ecf90ef6ab23af94c3b6e23b371f9 +size 8478 diff --git a/images/Policy-for-Online-First-Publication-of-SSURJET-Articles_p5_i2.jpeg b/images/Policy-for-Online-First-Publication-of-SSURJET-Articles_p5_i2.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1c9709cb4bebbaa0c7cf3326f4ef2c5b4b214204 --- /dev/null +++ b/images/Policy-for-Online-First-Publication-of-SSURJET-Articles_p5_i2.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1bc8bd57dc2a3712dadfb07ca1b0bf6153ee91e51c963da23faeb1ab1af65a65 +size 5402 diff --git a/images/Policy-for-Online-First-Publication-of-SSURJET-Articles_p5_i3.jpeg b/images/Policy-for-Online-First-Publication-of-SSURJET-Articles_p5_i3.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..6a3cafc4f506be2789a2f2fdedd997194cb1311f --- /dev/null +++ b/images/Policy-for-Online-First-Publication-of-SSURJET-Articles_p5_i3.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be00cb28291b343f091f0e74635a0f6f05f57c85456cf74944404004e27de739 +size 4910 diff --git a/images/Policy-for-Online-First-Publication-of-SSURJET-Articles_p6_i1.jpeg b/images/Policy-for-Online-First-Publication-of-SSURJET-Articles_p6_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7b5ce0386388bad8fd8636f0eb5cff719a29c029 --- /dev/null +++ b/images/Policy-for-Online-First-Publication-of-SSURJET-Articles_p6_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c2614d1822de41cd79197ba3d9f2cb1e86b4637d50704c2dd3ca81e96eb5115 +size 10842 diff --git a/images/Policy-of-Resolution-Number-for-Meetings_p1_i1.jpeg b/images/Policy-of-Resolution-Number-for-Meetings_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0417f6813f339ac2665a4f0b99794692cadf1cfb --- /dev/null +++ b/images/Policy-of-Resolution-Number-for-Meetings_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d579b7308388df49bc6b92aa8c5c32d4186cda9cc019a10b6edc799974c31764 +size 6980 diff --git a/images/Quality-Assurance-Policy_p1_i1.jpeg b/images/Quality-Assurance-Policy_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..91f12586d42fc51d6b02ebd997256ab28d591413 --- /dev/null +++ b/images/Quality-Assurance-Policy_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca2be200a5f23c9bd2acd62d0a7c0948a819cd49c28777143fb9202d04dd0605 +size 32983 diff --git a/images/Recruitment-Promotion-Policy-Procedure-V1_p1_i1.jpeg b/images/Recruitment-Promotion-Policy-Procedure-V1_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..baeb52ce7e7c8c23403f36312d3543381039cdb8 --- /dev/null +++ b/images/Recruitment-Promotion-Policy-Procedure-V1_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f23d1d8ae31760a1072e10227f17633dbe683ddfb82f8b879c4a571caafe45e4 +size 5640 diff --git a/images/Research-Honorarium-and-Conference-Assistance-Policy-V2_p1_i1.jpeg b/images/Research-Honorarium-and-Conference-Assistance-Policy-V2_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..befd6666e742e7eab20643250559445f9ff8aed0 --- /dev/null +++ b/images/Research-Honorarium-and-Conference-Assistance-Policy-V2_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ca8575a2c6653a59214015316954cc42468443087c414dfbd2b650898cfe4fb +size 5596 diff --git a/images/Rules-Regulations-of-MS_p1_i1.jpeg b/images/Rules-Regulations-of-MS_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..25feae9b2db4638e1b3bd51887113ed294e42f2c --- /dev/null +++ b/images/Rules-Regulations-of-MS_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da699ca19fc1d81517c4268862520b9b0fe09f610d79c98d597684015662906f +size 7025 diff --git a/images/SSUET-HSE-Safety-Manual-V3 (1)_p13_i1.jpeg b/images/SSUET-HSE-Safety-Manual-V3 (1)_p13_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1466ff4c8df6ac9ac189111d1b521df7b089e211 --- /dev/null +++ b/images/SSUET-HSE-Safety-Manual-V3 (1)_p13_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:346085aab92060668e801b0a435cb49b0224041026e44832c09f408ae309711c +size 15502 diff --git a/images/SSUET-HSE-Safety-Manual-V3 (1)_p13_i2.jpeg b/images/SSUET-HSE-Safety-Manual-V3 (1)_p13_i2.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..cacc478a6c432a9bb2f1253d43c69144154099ab --- /dev/null +++ b/images/SSUET-HSE-Safety-Manual-V3 (1)_p13_i2.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcba6ce875d1873cf9e502bee877b9e688349fa19b1f2bacc287cf5a357bf798 +size 85967 diff --git a/images/SSUET-HSE-Safety-Manual-V3 (1)_p14_i1.jpeg b/images/SSUET-HSE-Safety-Manual-V3 (1)_p14_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d97d2eb103d5e36e4ca8c553154e49a1faf84b6d --- /dev/null +++ b/images/SSUET-HSE-Safety-Manual-V3 (1)_p14_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:248ada5af56e380e4fcb6e40cffb63ed3dff334d569c0f57dc9bac06960788cb +size 127964 diff --git a/images/SSUET-HSE-Safety-Manual-V3 (1)_p14_i2.jpeg b/images/SSUET-HSE-Safety-Manual-V3 (1)_p14_i2.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1e9b88d857b7aeadbfe8fdfdc54959f30e1569fa --- /dev/null +++ b/images/SSUET-HSE-Safety-Manual-V3 (1)_p14_i2.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6352c8441c9456f4dba400c33bcb3ed81ffb7b160d99db89c27c221c8ccad02 +size 34572 diff --git a/images/SSUET-HSE-Safety-Manual-V3 (1)_p18_i1.jpeg b/images/SSUET-HSE-Safety-Manual-V3 (1)_p18_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..8a10246cb3c8dd9798f494c3d19fbd6ff3d72ed5 --- /dev/null +++ b/images/SSUET-HSE-Safety-Manual-V3 (1)_p18_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:996e8b7dbc30188a67bee5d2d4104da2e06dbf30e40066ea9a3fe8543e6d4c89 +size 49143 diff --git a/images/SSUET-HSE-Safety-Manual-V3 (1)_p1_i1.jpeg b/images/SSUET-HSE-Safety-Manual-V3 (1)_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..2c8a711340dc11ecf908aa238976d28e6f6910a1 --- /dev/null +++ b/images/SSUET-HSE-Safety-Manual-V3 (1)_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fc6d0660dcb5decdcda78dfa2f2e174bd979287eff2f25851fb4fd37d494289 +size 23384 diff --git a/images/SSUET-HSE-Safety-Manual-V3_p13_i1.jpeg b/images/SSUET-HSE-Safety-Manual-V3_p13_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1466ff4c8df6ac9ac189111d1b521df7b089e211 --- /dev/null +++ b/images/SSUET-HSE-Safety-Manual-V3_p13_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:346085aab92060668e801b0a435cb49b0224041026e44832c09f408ae309711c +size 15502 diff --git a/images/SSUET-HSE-Safety-Manual-V3_p13_i2.jpeg b/images/SSUET-HSE-Safety-Manual-V3_p13_i2.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..cacc478a6c432a9bb2f1253d43c69144154099ab --- /dev/null +++ b/images/SSUET-HSE-Safety-Manual-V3_p13_i2.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcba6ce875d1873cf9e502bee877b9e688349fa19b1f2bacc287cf5a357bf798 +size 85967 diff --git a/images/SSUET-HSE-Safety-Manual-V3_p14_i1.jpeg b/images/SSUET-HSE-Safety-Manual-V3_p14_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d97d2eb103d5e36e4ca8c553154e49a1faf84b6d --- /dev/null +++ b/images/SSUET-HSE-Safety-Manual-V3_p14_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:248ada5af56e380e4fcb6e40cffb63ed3dff334d569c0f57dc9bac06960788cb +size 127964 diff --git a/images/SSUET-HSE-Safety-Manual-V3_p14_i2.jpeg b/images/SSUET-HSE-Safety-Manual-V3_p14_i2.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1e9b88d857b7aeadbfe8fdfdc54959f30e1569fa --- /dev/null +++ b/images/SSUET-HSE-Safety-Manual-V3_p14_i2.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6352c8441c9456f4dba400c33bcb3ed81ffb7b160d99db89c27c221c8ccad02 +size 34572 diff --git a/images/SSUET-HSE-Safety-Manual-V3_p18_i1.jpeg b/images/SSUET-HSE-Safety-Manual-V3_p18_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..8a10246cb3c8dd9798f494c3d19fbd6ff3d72ed5 --- /dev/null +++ b/images/SSUET-HSE-Safety-Manual-V3_p18_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:996e8b7dbc30188a67bee5d2d4104da2e06dbf30e40066ea9a3fe8543e6d4c89 +size 49143 diff --git a/images/SSUET-HSE-Safety-Manual-V3_p1_i1.jpeg b/images/SSUET-HSE-Safety-Manual-V3_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..2c8a711340dc11ecf908aa238976d28e6f6910a1 --- /dev/null +++ b/images/SSUET-HSE-Safety-Manual-V3_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fc6d0660dcb5decdcda78dfa2f2e174bd979287eff2f25851fb4fd37d494289 +size 23384 diff --git a/images/SSUET-Intellectual-Property-Rights-Policy-V1_p1_i1.jpeg b/images/SSUET-Intellectual-Property-Rights-Policy-V1_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..befd6666e742e7eab20643250559445f9ff8aed0 --- /dev/null +++ b/images/SSUET-Intellectual-Property-Rights-Policy-V1_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ca8575a2c6653a59214015316954cc42468443087c414dfbd2b650898cfe4fb +size 5596 diff --git a/images/SSUET-MS-Policy-Ver-4_p1_i1.jpeg b/images/SSUET-MS-Policy-Ver-4_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7dc84bdb66aa8e31618c951b640be665fcdc48b1 --- /dev/null +++ b/images/SSUET-MS-Policy-Ver-4_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0aa2077286ac29362ef0a5c96950d364a673e8df9ed7293686fe37c79e332a5 +size 12195 diff --git a/images/SSUET-PhD-Policy-Ver-8-For-Batches-2024-Spring-and-Onwards_p1_i1.jpeg b/images/SSUET-PhD-Policy-Ver-8-For-Batches-2024-Spring-and-Onwards_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7dc84bdb66aa8e31618c951b640be665fcdc48b1 --- /dev/null +++ b/images/SSUET-PhD-Policy-Ver-8-For-Batches-2024-Spring-and-Onwards_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0aa2077286ac29362ef0a5c96950d364a673e8df9ed7293686fe37c79e332a5 +size 12195 diff --git a/images/Social-Media-Policy-V2_p1_i1.jpeg b/images/Social-Media-Policy-V2_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..baeb52ce7e7c8c23403f36312d3543381039cdb8 --- /dev/null +++ b/images/Social-Media-Policy-V2_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f23d1d8ae31760a1072e10227f17633dbe683ddfb82f8b879c4a571caafe45e4 +size 5640 diff --git a/images/Transport-Policy-V1_p1_i1.jpeg b/images/Transport-Policy-V1_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..befd6666e742e7eab20643250559445f9ff8aed0 --- /dev/null +++ b/images/Transport-Policy-V1_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ca8575a2c6653a59214015316954cc42468443087c414dfbd2b650898cfe4fb +size 5596 diff --git a/images/Travelling-and-Accomodation-Policy-V1_p1_i1.jpeg b/images/Travelling-and-Accomodation-Policy-V1_p1_i1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..baeb52ce7e7c8c23403f36312d3543381039cdb8 --- /dev/null +++ b/images/Travelling-and-Accomodation-Policy-V1_p1_i1.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f23d1d8ae31760a1072e10227f17633dbe683ddfb82f8b879c4a571caafe45e4 +size 5640 diff --git a/ingest_all.py b/ingest_all.py new file mode 100644 index 0000000000000000000000000000000000000000..5536941cfd4f4f4aef0b336ca60f1387a6cec765 --- /dev/null +++ b/ingest_all.py @@ -0,0 +1,48 @@ +""" +Bulk pre-ingestion script. + +Usage: + 1. Copy all your PDF files into the documents/ folder. + 2. Run from the project root: + python ingest_all.py + +The script embeds every PDF and saves the FAISS index to vector_db/. +You only need to run this once (or whenever you add a new batch of PDFs). +The server loads the saved index automatically on startup. +""" + +import sys +from pathlib import Path + +# Allow importing from backend/ +sys.path.insert(0, str(Path(__file__).parent / "backend")) + +from ingest import ingest_pdf, DOCUMENTS_PATH, VECTOR_DB_PATH + + +def main(): + pdfs = sorted(DOCUMENTS_PATH.glob("*.pdf")) + + if not pdfs: + print(f"No PDF files found in {DOCUMENTS_PATH} ") + print("Copy your PDFs there and run this script again.") + return + + print(f"Found {len(pdfs)} PDF(s) to ingest.\n") + + total_chunks = 0 + for i, pdf in enumerate(pdfs, 1): + print(f"[{i}/{len(pdfs)}] Ingesting: {pdf.name} ...", end=" ", flush=True) + try: + chunks = ingest_pdf(str(pdf)) + total_chunks += chunks + print(f"{chunks} chunks") + except Exception as e: + print(f"ERROR — {e}") + + print(f"\nDone. {total_chunks} total chunks saved to {VECTOR_DB_PATH} ") + print("Start the server and the index will be loaded automatically.") + + +if __name__ == "__main__": + main() diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..1144ff1744150f3469d6c5cdeaa87e552adc45ad --- /dev/null +++ b/requirements.txt @@ -0,0 +1,13 @@ +fastapi>=0.115.0 +uvicorn[standard]>=0.30.1 +python-multipart>=0.0.9 +python-dotenv>=1.0.1 +langchain>=0.3.7 +langchain-community>=0.3.5 +langchain-nvidia-ai-endpoints>=0.3.0 +faiss-cpu>=1.12.0 +pypdf>=4.2.0 +pymupdf>=1.24.5 +numpy>=2.0.0 +pydantic>=2.9.0 +supabase>=2.7.0 diff --git a/run.bat b/run.bat new file mode 100644 index 0000000000000000000000000000000000000000..2f234c82a0824e3608dad05688d54b33bf9546a9 --- /dev/null +++ b/run.bat @@ -0,0 +1,16 @@ +@echo off +title Docent AI Server +cd /d "%~dp0backend" + +echo. +echo Docent AI running at http://localhost:8000 +echo Press Ctrl+C to stop. +echo. + +py -m uvicorn main:app --reload --host 0.0.0.0 --port 8000 + +if errorlevel 1 ( + echo. + echo Server exited with an error. + pause +) diff --git a/supabase_schema.sql b/supabase_schema.sql new file mode 100644 index 0000000000000000000000000000000000000000..24de70c0d5a891eae5e2113aab7c8e0a09235a83 --- /dev/null +++ b/supabase_schema.sql @@ -0,0 +1,51 @@ +-- ============================================================================ +-- Docent AI — Supabase schema for authentication-backed chat history +-- Run this ONCE in your Supabase project: +-- Dashboard → SQL Editor → New query → paste this file → Run +-- ============================================================================ + +-- ── Conversations (one row per chat) ─────────────────────────────────────── +create table if not exists public.chat_sessions ( + id uuid primary key default gen_random_uuid(), + user_id uuid not null references auth.users (id) on delete cascade, + title text not null default 'New chat', + created_at timestamptz not null default now(), + updated_at timestamptz not null default now() +); + +-- ── Messages (user + assistant turns) ────────────────────────────────────── +create table if not exists public.messages ( + id uuid primary key default gen_random_uuid(), + session_id uuid not null references public.chat_sessions (id) on delete cascade, + role text not null check (role in ('user', 'assistant')), + content text not null, + sources jsonb not null default '[]'::jsonb, + created_at timestamptz not null default now() +); + +create index if not exists idx_sessions_user on public.chat_sessions (user_id, updated_at desc); +create index if not exists idx_messages_session on public.messages (session_id, created_at); + +-- ── Row Level Security ────────────────────────────────────────────────────── +-- The backend uses the service-role key (which bypasses RLS), but we still +-- enable RLS so the public anon key can never read another user's data. +alter table public.chat_sessions enable row level security; +alter table public.messages enable row level security; + +drop policy if exists "own sessions" on public.chat_sessions; +create policy "own sessions" on public.chat_sessions + for all + using (auth.uid() = user_id) + with check (auth.uid() = user_id); + +drop policy if exists "own messages" on public.messages; +create policy "own messages" on public.messages + for all + using (exists ( + select 1 from public.chat_sessions s + where s.id = messages.session_id and s.user_id = auth.uid() + )) + with check (exists ( + select 1 from public.chat_sessions s + where s.id = messages.session_id and s.user_id = auth.uid() + )); diff --git a/vector_db/.gitkeep b/vector_db/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vector_db/index.faiss b/vector_db/index.faiss new file mode 100644 index 0000000000000000000000000000000000000000..8073e83fbbfd3872f1f95bb45f8c54e0b055836e --- /dev/null +++ b/vector_db/index.faiss @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0810bcd710c1b69a75592ea836ba17dff316f4168ac8c8e256641b24818434d3 +size 6340653 diff --git a/vector_db/index.pkl b/vector_db/index.pkl new file mode 100644 index 0000000000000000000000000000000000000000..d7dc746a45b944a9a56027efbe590c374219c5a2 --- /dev/null +++ b/vector_db/index.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5bc3425b4d84694291cbe1b1d91062f45d733124a9e3919d4e8f87c202b9fa34 +size 1683761