# eraytundzhaysezgin/coe203-project2 architecture

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

- Interactive diagram: https://gitdiagram.com/eraytundzhaysezgin/coe203-project2
- Repository: https://github.com/eraytundzhaysezgin/coe203-project2

## Overview

This is a single-file campus opportunity monitor. Its workflow accepts a CLI scan request, renders a searchable page in Playwright, parses and validates opportunity records, compares them with persisted state, and sends push alerts for newly available seats. State handling and change detection are distinct internal stages, though all application logic lives in one source file. The README describes retry behavior and local-page fallback; the graph focuses on relationships visible in the excerpt. Runtime state storage and external services are not repository source files.

Main entry points: [`campus_monitor.py`](https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.py) (Scan runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Monitor user"))
node_cli["CLI entry<br/>[campus_monitor.py]"]
node_runner["Scan runner<br/>[campus_monitor.py]"]
node_browser["Page acquisition<br/>[campus_monitor.py]"]
node_page["Target page"]
node_parser["Record parsing<br/>[campus_monitor.py]"]
node_changes["Change detection<br/>[campus_monitor.py]"]
node_state[("Monitor state")]
node_push["Push delivery<br/>[campus_monitor.py]"]
node_ntfy["ntfy service"]

node_user -->|"provides arguments"| node_cli
node_cli -->|"starts scan"| node_runner
node_runner -->|"fetches page"| node_browser
node_browser -->|"searches and reads"| node_page
node_runner -->|"parses HTML"| node_parser
node_runner -->|"loads and saves"| node_state
node_runner -->|"detects transitions"| node_changes
node_runner -->|"sends alerts"| node_push
node_push -->|"posts notification"| node_ntfy

click node_cli "https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.py"
click node_runner "https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.py"
click node_browser "https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.py"
click node_parser "https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.py"
click node_changes "https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.py"
click node_push "https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.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_user toneBlue
class node_cli,node_runner,node_browser,node_parser,node_changes,node_push toneTeal
class node_page,node_ntfy toneIndigo
class node_state toneAmber
```

## Components

### Other components

- **Monitor user**
- [CLI entry](https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.py): `campus_monitor.py`
- [Scan runner](https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.py): `campus_monitor.py`
- [Page acquisition](https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.py): `campus_monitor.py`
- **Target page**
- [Record parsing](https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.py): `campus_monitor.py`
- [Change detection](https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.py): `campus_monitor.py`
- **Monitor state**
- [Push delivery](https://github.com/eraytundzhaysezgin/coe203-project2/blob/main/campus_monitor.py): `campus_monitor.py`
- **ntfy service**

## Connections

- Monitor user → CLI entry: provides arguments (evidence: `campus_monitor.py`)
- CLI entry → Scan runner: starts scan (evidence: `campus_monitor.py`)
- Scan runner → Page acquisition: fetches page (evidence: `campus_monitor.py`)
- Page acquisition → Target page: searches and reads (evidence: `campus_monitor.py`)
- Scan runner → Record parsing: parses HTML (evidence: `campus_monitor.py`)
- Scan runner → Monitor state: loads and saves (evidence: `campus_monitor.py`)
- Scan runner → Change detection: detects transitions (evidence: `campus_monitor.py`)
- Scan runner → Push delivery: sends alerts (evidence: `campus_monitor.py`)
- Push delivery → ntfy service: posts notification (evidence: `campus_monitor.py`)
