# palligopi-git/sriindu-csit architecture

> Architecture diagram of the GitHub repository palligopi-git/sriindu-csit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/palligopi-git/sriindu-csit
- Repository: https://github.com/palligopi-git/sriindu-csit

## Overview

This is the CSIT department’s single-page public website, with IGRIS as its interactive study-assistant workflow. Students navigate academic and campus information in the site; for IGRIS, the browser sends a subject- and mode-aware question to the streaming endpoint, which builds a prompt and calls TokenRouter. The browser also has a documented non-streaming fallback endpoint. The README describes the site’s major sections, but their markup and most UI behavior were not sampled; the backend excerpts show no course-material retrieval.

Main entry points: [`script.js`](https://github.com/palligopi-git/sriindu-csit/blob/main/script.js) (Hash navigation), [`api/chat/stream.js`](https://github.com/palligopi-git/sriindu-csit/blob/main/api/chat/stream.js) (Streaming chat), [`api/study/chat.js`](https://github.com/palligopi-git/sriindu-csit/blob/main/api/study/chat.js) (Chat fallback), [`index.html`](https://github.com/palligopi-git/sriindu-csit/blob/main/index.html) (Department site)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Department Website"]
  node_site["Department site<br/>[index.html]"]
  node_router["Hash navigation<br/>[script.js]"]
  node_academics["Academics<br/>[index.html]"]
  node_infrastructure["Infrastructure<br/>[index.html]"]
  node_faculty["Faculty and staff<br/>[index.html]"]
  node_studentcorner["Student resources<br/>[index.html]"]
  node_placement["Placement guide<br/>[index.html]"]
  node_contact["Contact information<br/>[index.html]"]
end

subgraph group_assistant["IGRIS Assistant"]
  node_igrisui["IGRIS chat client<br/>[script.js]"]
end

subgraph group_backend["Chat Backend"]
  node_stream["Streaming chat<br/>[stream.js]"]
  node_fallback["Chat fallback<br/>[chat.js]"]
  node_config["Chat configuration<br/>[config.js]"]
  node_prompt["Context prompt<br/>[prompt.js]"]
  node_http["HTTP responses<br/>[http.js]"]
end

node_student(("Student"))
node_tokenrouter{{"TokenRouter"}}

node_student -->|"visits"| node_site
node_site -->|"loads"| node_router
node_router -->|"routes to"| node_academics
node_router -->|"routes to"| node_infrastructure
node_router -->|"routes to"| node_faculty
node_router -->|"routes to"| node_studentcorner
node_router -->|"routes to"| node_placement
node_router -->|"routes to"| node_contact
node_student -->|"asks questions"| node_igrisui
node_igrisui -->|"posts questions"| node_stream
node_igrisui -->|"posts fallback"| node_fallback
node_stream -->|"reads settings"| node_config
node_stream -->|"builds context"| node_prompt
node_stream -->|"formats errors"| node_http
node_fallback -->|"reads settings"| node_config
node_fallback -->|"builds context"| node_prompt
node_fallback -->|"formats errors"| node_http
node_stream -->|"streams completion"| node_tokenrouter
node_fallback -->|"requests completion"| node_tokenrouter

click node_site "https://github.com/palligopi-git/sriindu-csit/blob/main/index.html"
click node_router "https://github.com/palligopi-git/sriindu-csit/blob/main/script.js"
click node_academics "https://github.com/palligopi-git/sriindu-csit/blob/main/index.html"
click node_infrastructure "https://github.com/palligopi-git/sriindu-csit/blob/main/index.html"
click node_faculty "https://github.com/palligopi-git/sriindu-csit/blob/main/index.html"
click node_studentcorner "https://github.com/palligopi-git/sriindu-csit/blob/main/index.html"
click node_placement "https://github.com/palligopi-git/sriindu-csit/blob/main/index.html"
click node_contact "https://github.com/palligopi-git/sriindu-csit/blob/main/index.html"
click node_igrisui "https://github.com/palligopi-git/sriindu-csit/blob/main/script.js"
click node_stream "https://github.com/palligopi-git/sriindu-csit/blob/main/api/chat/stream.js"
click node_fallback "https://github.com/palligopi-git/sriindu-csit/blob/main/api/study/chat.js"
click node_config "https://github.com/palligopi-git/sriindu-csit/blob/main/api/_lib/config.js"
click node_prompt "https://github.com/palligopi-git/sriindu-csit/blob/main/api/_lib/prompt.js"
click node_http "https://github.com/palligopi-git/sriindu-csit/blob/main/api/_lib/http.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_site,node_router,node_academics,node_infrastructure,node_faculty,node_studentcorner,node_placement,node_contact toneBlue
class node_igrisui toneAmber
class node_stream,node_fallback,node_config,node_prompt,node_http,node_tokenrouter toneMint
class node_student toneIndigo
```

## Components

### Department Website

- [Department site](https://github.com/palligopi-git/sriindu-csit/blob/main/index.html): `index.html`
- [Hash navigation](https://github.com/palligopi-git/sriindu-csit/blob/main/script.js): `script.js`
- [Academics](https://github.com/palligopi-git/sriindu-csit/blob/main/index.html): `index.html`
- [Infrastructure](https://github.com/palligopi-git/sriindu-csit/blob/main/index.html): `index.html`
- [Faculty and staff](https://github.com/palligopi-git/sriindu-csit/blob/main/index.html): `index.html`
- [Student resources](https://github.com/palligopi-git/sriindu-csit/blob/main/index.html): `index.html`
- [Placement guide](https://github.com/palligopi-git/sriindu-csit/blob/main/index.html): `index.html`
- [Contact information](https://github.com/palligopi-git/sriindu-csit/blob/main/index.html): `index.html`

### IGRIS Assistant

- [IGRIS chat client](https://github.com/palligopi-git/sriindu-csit/blob/main/script.js): `script.js`

### Chat Backend

- [Streaming chat](https://github.com/palligopi-git/sriindu-csit/blob/main/api/chat/stream.js): `api/chat/stream.js`
- [Chat fallback](https://github.com/palligopi-git/sriindu-csit/blob/main/api/study/chat.js): `api/study/chat.js`
- [Chat configuration](https://github.com/palligopi-git/sriindu-csit/blob/main/api/_lib/config.js): `api/_lib/config.js`
- [Context prompt](https://github.com/palligopi-git/sriindu-csit/blob/main/api/_lib/prompt.js): `api/_lib/prompt.js`
- [HTTP responses](https://github.com/palligopi-git/sriindu-csit/blob/main/api/_lib/http.js): `api/_lib/http.js`

### Other components

- **Student**
- **TokenRouter**

## Connections

- Student → Department site: visits (evidence: `README.md`)
- Department site → Hash navigation: loads (evidence: `README.md`)
- Hash navigation → Academics: routes to (evidence: `README.md`)
- Hash navigation → Infrastructure: routes to (evidence: `README.md`)
- Hash navigation → Faculty and staff: routes to (evidence: `README.md`)
- Hash navigation → Student resources: routes to (evidence: `README.md`)
- Hash navigation → Placement guide: routes to (evidence: `README.md`)
- Hash navigation → Contact information: routes to (evidence: `README.md`)
- Student → IGRIS chat client: asks questions (evidence: `README.md`)
- IGRIS chat client → Streaming chat: posts questions (evidence: `script.js`)
- IGRIS chat client → Chat fallback: posts fallback (evidence: `script.js`)
- Streaming chat → Chat configuration: reads settings (evidence: `api/chat/stream.js`)
- Streaming chat → Context prompt: builds context (evidence: `api/chat/stream.js`)
- Streaming chat → HTTP responses: formats errors (evidence: `api/chat/stream.js`)
- Chat fallback → Chat configuration: reads settings (evidence: `api/study/chat.js`)
- Chat fallback → Context prompt: builds context (evidence: `api/study/chat.js`)
- Chat fallback → HTTP responses: formats errors (evidence: `api/study/chat.js`)
- Streaming chat → TokenRouter: streams completion (evidence: `api/chat/stream.js`)
- Chat fallback → TokenRouter: requests completion (evidence: `api/study/chat.js`)
