# inf1103-project-team-3/inf1103-project architecture

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

- Interactive diagram: https://gitdiagram.com/inf1103-project-team-3/inf1103-project
- Repository: https://github.com/inf1103-project-team-3/inf1103-project

## Overview

This is a feedback collection and analysis application. Users or administrators submit individual feedback or import JSON/CSV; the input manager validates entries, and the intended analysis flow classifies feedback, applies domain rules, aggregates themes, and prepares a review queue and summary. The root runner currently substitutes sample AI records and a local summary for live calls. The README is generic, and the excerpts do not show the missing persistence manager or all output-writing details, so those links are omitted.

Main entry points: [`main.py`](https://github.com/inf1103-project-team-3/inf1103-project/blob/main/main.py) (Pipeline runner), [`ai_manager.py`](https://github.com/inf1103-project-team-3/inf1103-project/blob/main/ai_manager.py) (AI manager), [`src/io_manager.py`](https://github.com/inf1103-project-team-3/inf1103-project/blob/main/src/io_manager.py) (Input manager), [`src/logic_manager.py`](https://github.com/inf1103-project-team-3/inf1103-project/blob/main/src/logic_manager.py) (Rules and aggregation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Feedback collection"]
  node_input["Input manager<br/>[io_manager.py]"]
  node_cli["Collection entrypoint<br/>[main.py]"]
end

subgraph group_analysis["Feedback analysis"]
  node_runner["Pipeline runner<br/>[main.py]"]
  node_logic["Rules and aggregation<br/>[logic_manager.py]"]
  node_review["Review triage<br/>[logic_manager.py]"]
end

subgraph group_ai["AI services"]
  node_ai["AI manager<br/>[ai_manager.py]"]
  node_config["Prompts and themes"]
end

subgraph group_data["Sample and outputs"]
  node_samples["Sample AI records"]
  node_outputs["Analysis output files"]
end

node_submitter(("User or admin"))
node_llm{{"LLM API"}}

node_submitter -->|"submits feedback"| node_input
node_cli -->|"starts collection"| node_input
node_runner -->|"collects entries"| node_input
node_runner -->|"uses placeholder records"| node_samples
node_runner -->|"applies rules"| node_logic
node_runner -->|"aggregates themes"| node_logic
node_runner -->|"ranks review queue"| node_logic
node_runner -.->|"writes results"| node_outputs
node_runner -.->|"classification calls"| node_ai
node_ai -.->|"sends requests"| node_llm
node_ai -.->|"loads prompts and themes"| node_config

click node_input "https://github.com/inf1103-project-team-3/inf1103-project/blob/main/src/io_manager.py"
click node_cli "https://github.com/inf1103-project-team-3/inf1103-project/blob/main/src/main.py"
click node_runner "https://github.com/inf1103-project-team-3/inf1103-project/blob/main/main.py"
click node_logic "https://github.com/inf1103-project-team-3/inf1103-project/blob/main/src/logic_manager.py"
click node_review "https://github.com/inf1103-project-team-3/inf1103-project/blob/main/src/logic_manager.py"
click node_ai "https://github.com/inf1103-project-team-3/inf1103-project/blob/main/ai_manager.py"
click node_samples "https://github.com/inf1103-project-team-3/inf1103-project/blob/main/src/test_data/sample_ai_output.py"
click node_outputs "https://github.com/inf1103-project-team-3/inf1103-project/tree/main/output"
click node_config "https://github.com/inf1103-project-team-3/inf1103-project/tree/main/config"

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_input,node_cli,node_submitter toneBlue
class node_runner,node_logic,node_review toneAmber
class node_ai,node_config,node_llm toneMint
class node_samples,node_outputs toneRose
```

## Components

### Feedback collection

- [Input manager](https://github.com/inf1103-project-team-3/inf1103-project/blob/main/src/io_manager.py): `src/io_manager.py`
- [Collection entrypoint](https://github.com/inf1103-project-team-3/inf1103-project/blob/main/src/main.py): `src/main.py`

### Feedback analysis

- [Pipeline runner](https://github.com/inf1103-project-team-3/inf1103-project/blob/main/main.py): `main.py`
- [Rules and aggregation](https://github.com/inf1103-project-team-3/inf1103-project/blob/main/src/logic_manager.py): `src/logic_manager.py`
- [Review triage](https://github.com/inf1103-project-team-3/inf1103-project/blob/main/src/logic_manager.py): `src/logic_manager.py`

### AI services

- [AI manager](https://github.com/inf1103-project-team-3/inf1103-project/blob/main/ai_manager.py): `ai_manager.py`
- [Prompts and themes](https://github.com/inf1103-project-team-3/inf1103-project/tree/main/config): `config`

### Sample and outputs

- [Sample AI records](https://github.com/inf1103-project-team-3/inf1103-project/blob/main/src/test_data/sample_ai_output.py): `src/test_data/sample_ai_output.py`
- [Analysis output files](https://github.com/inf1103-project-team-3/inf1103-project/tree/main/output): `output`

### Other components

- **User or admin**
- **LLM API**

## Connections

- User or admin → Input manager: submits feedback (evidence: `src/io_manager.py`)
- Collection entrypoint → Input manager: starts collection (evidence: `src/main.py`)
- Pipeline runner → Input manager: collects entries (evidence: `main.py`)
- Pipeline runner → Sample AI records: uses placeholder records (evidence: `main.py`)
- Pipeline runner → Rules and aggregation: applies rules (evidence: `main.py`)
- Pipeline runner → Rules and aggregation: aggregates themes (evidence: `main.py`)
- Pipeline runner → Rules and aggregation: ranks review queue (evidence: `main.py`)
- Pipeline runner → Analysis output files: writes results
- Pipeline runner → AI manager: classification calls (evidence: `main.py`)
- AI manager → LLM API: sends requests
- AI manager → Prompts and themes: loads prompts and themes
