# j2ngz/inf1103-p7-team8-project architecture

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

- Interactive diagram: https://gitdiagram.com/j2ngz/inf1103-p7-team8-project
- Repository: https://github.com/j2ngz/inf1103-p7-team8-project

## Overview

This is a terminal-based resume-screening application. Its intended user workflow is to select resume scanning, locate PDFs, extract candidate facts with Gemini, evaluate them against configured job requirements, and view a summary. The sampled code only partially wires that workflow: scanning currently stops after locating files, and summary viewing is a placeholder. Extraction and scoring are implemented as separate modules, with no shown caller connecting them. The graph distinguishes implemented calls from these documented-in-code but unwired stages; no README was provided.

Main entry points: [`ai_manager.py`](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/ai_manager.py) (Extraction batch), [`io_manager.py`](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py) (Scan handler), [`logic_manager.py`](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/logic_manager.py) (Batch evaluator), [`requirements.txt`](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/requirements.txt) (Job requirements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_terminal["Terminal interaction"]
  node_menu["Menu loop<br/>[io_manager.py]"]
  node_scan["Scan handler<br/>[io_manager.py]"]
  node_summary["Summary handler<br/>[io_manager.py]"]
  node_table["Summary table<br/>[io_manager.py]"]
end

subgraph group_extraction["Resume extraction"]
  node_batch["Extraction batch<br/>[ai_manager.py]"]
  node_prompt["Prompt builder<br/>[ai_manager.py]"]
  node_upload["Resume uploader<br/>[ai_manager.py]"]
  node_response["Response parser<br/>[ai_manager.py]"]
  node_validation["Record validator<br/>[ai_manager.py]"]
end

subgraph group_evaluation["Candidate evaluation"]
  node_evaluate_batch["Batch evaluator<br/>[logic_manager.py]"]
  node_requirements["Requirements loader<br/>[logic_manager.py]"]
  node_rules["Job requirements<br/>[requirements.txt]"]
  node_scoring["Scoring and outcome<br/>[logic_manager.py]"]
end

subgraph group_files["Resume files"]
  node_resume_lookup["PDF discovery<br/>[io_manager.py]"]
  node_resume_folder[("Resume folder")]
  node_scanned_folder[("Scanned folder")]
  node_move_files["Move processed PDFs<br/>[io_manager.py]"]
end

node_user(("User"))
node_gemini{{"Gemini API"}}

node_user -->|"chooses option"| node_menu
node_menu -->|"dispatches scan"| node_scan
node_menu -->|"dispatches summary"| node_summary
node_scan -->|"finds PDFs"| node_resume_lookup
node_resume_lookup -->|"lists files"| node_resume_folder
node_batch -->|"builds prompt"| node_prompt
node_batch -->|"uploads paths"| node_upload
node_upload -->|"uploads files"| node_gemini
node_batch -->|"requests extraction"| node_gemini
node_gemini -->|"returns text"| node_response
node_batch -->|"parses response"| node_response
node_batch -->|"validates records"| node_validation
node_evaluate_batch -->|"loads rules"| node_requirements
node_requirements -->|"reads file"| node_rules
node_evaluate_batch -->|"evaluates records"| node_scoring
node_summary -.->|"would display"| node_table
node_scan -.->|"would extract"| node_batch
node_scan -.->|"would evaluate"| node_evaluate_batch
node_scan -.->|"would archive"| node_move_files
node_move_files -->|"moves PDFs"| node_scanned_folder

click node_menu "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py"
click node_scan "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py"
click node_summary "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py"
click node_resume_lookup "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py"
click node_resume_folder "https://github.com/j2ngz/inf1103-p7-team8-project/tree/main/resumes"
click node_scanned_folder "https://github.com/j2ngz/inf1103-p7-team8-project/tree/main/scannedResume"
click node_move_files "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py"
click node_table "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py"
click node_batch "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/ai_manager.py"
click node_prompt "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/ai_manager.py"
click node_upload "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/ai_manager.py"
click node_response "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/ai_manager.py"
click node_validation "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/ai_manager.py"
click node_evaluate_batch "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/logic_manager.py"
click node_requirements "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/logic_manager.py"
click node_rules "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/requirements.txt"
click node_scoring "https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/logic_manager.py"

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_menu,node_scan,node_summary,node_table,node_user toneBlue
class node_batch,node_prompt,node_upload,node_response,node_validation toneAmber
class node_evaluate_batch,node_requirements,node_rules,node_scoring,node_gemini toneMint
class node_resume_lookup,node_resume_folder,node_scanned_folder,node_move_files toneRose
```

## Components

### Terminal interaction

- [Menu loop](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py): `io_manager.py`
- [Scan handler](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py): `io_manager.py`
- [Summary handler](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py): `io_manager.py`
- [Summary table](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py): `io_manager.py`

### Resume extraction

- [Extraction batch](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/ai_manager.py): `ai_manager.py`
- [Prompt builder](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/ai_manager.py): `ai_manager.py`
- [Resume uploader](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/ai_manager.py): `ai_manager.py`
- [Response parser](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/ai_manager.py): `ai_manager.py`
- [Record validator](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/ai_manager.py): `ai_manager.py`

### Candidate evaluation

- [Batch evaluator](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/logic_manager.py): `logic_manager.py`
- [Requirements loader](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/logic_manager.py): `logic_manager.py`
- [Job requirements](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/requirements.txt): `requirements.txt`
- [Scoring and outcome](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/logic_manager.py): `logic_manager.py`

### Resume files

- [PDF discovery](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py): `io_manager.py`
- [Resume folder](https://github.com/j2ngz/inf1103-p7-team8-project/tree/main/resumes): `resumes`
- [Scanned folder](https://github.com/j2ngz/inf1103-p7-team8-project/tree/main/scannedResume): `scannedResume`
- [Move processed PDFs](https://github.com/j2ngz/inf1103-p7-team8-project/blob/main/io_manager.py): `io_manager.py`

### Other components

- **User**
- **Gemini API**

## Connections

- User → Menu loop: chooses option (evidence: `io_manager.py`)
- Menu loop → Scan handler: dispatches scan (evidence: `io_manager.py`)
- Menu loop → Summary handler: dispatches summary (evidence: `io_manager.py`)
- Scan handler → PDF discovery: finds PDFs (evidence: `io_manager.py`)
- PDF discovery → Resume folder: lists files (evidence: `io_manager.py`)
- Extraction batch → Prompt builder: builds prompt (evidence: `ai_manager.py`)
- Extraction batch → Resume uploader: uploads paths (evidence: `ai_manager.py`)
- Resume uploader → Gemini API: uploads files (evidence: `ai_manager.py`)
- Extraction batch → Gemini API: requests extraction (evidence: `ai_manager.py`)
- Gemini API → Response parser: returns text (evidence: `ai_manager.py`)
- Extraction batch → Response parser: parses response (evidence: `ai_manager.py`)
- Extraction batch → Record validator: validates records (evidence: `ai_manager.py`)
- Batch evaluator → Requirements loader: loads rules (evidence: `logic_manager.py`)
- Requirements loader → Job requirements: reads file (evidence: `logic_manager.py`)
- Batch evaluator → Scoring and outcome: evaluates records (evidence: `logic_manager.py`)
- Summary handler → Summary table: would display (evidence: `io_manager.py`)
- Scan handler → Extraction batch: would extract
- Scan handler → Batch evaluator: would evaluate
- Scan handler → Move processed PDFs: would archive (evidence: `io_manager.py`)
- Move processed PDFs → Scanned folder: moves PDFs (evidence: `io_manager.py`)
