# al-wazny/azubiheftapi architecture

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

- Interactive diagram: https://gitdiagram.com/al-wazny/azubiheftapi
- Repository: https://github.com/al-wazny/azubiheftapi

## Overview

AzubiheftAPI is a command-line tool that turns Jira Tempo worklogs into training-log entries. Its primary workflow is: read credentials and a date range, fetch worklogs, map ticket keys or use their descriptions, then log in to Azubiheft and submit entries. A WebUntis client and lesson-topic formatting are implemented for a possible school-entry workflow, but the CLI integration is commented out. A separate Selenium script deletes entries. Relationships reflect the shown calls; WebUntis is not active in the main workflow.

Main entry points: [`myAPI.py`](https://github.com/al-wazny/azubiheftapi/blob/main/myAPI.py) (Worklog CLI), [`helpers/webuntis.py`](https://github.com/al-wazny/azubiheftapi/blob/main/helpers/webuntis.py) (WebUntis client), [`helpers/azubiheft.py`](https://github.com/al-wazny/azubiheftapi/blob/main/helpers/azubiheft.py) (Azubiheft client), [`helpers/delete.py`](https://github.com/al-wazny/azubiheftapi/blob/main/helpers/delete.py) (Entry deleter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_worklog["Worklog processing"]
  node_credentials["Credentials<br/>[credentials.json]"]
  node_cli["Worklog CLI<br/>[myAPI.py]"]
  node_ticket_mapping["Ticket mapping<br/>[myAPI.py]"]
  node_lesson_formatting["Lesson formatting<br/>[myAPI.py]"]
end

subgraph group_integrations["External integrations"]
  node_tempo{{"Tempo API"}}
  node_webuntis_client["WebUntis client<br/>[webuntis.py]"]
  node_azubiheft_client["Azubiheft client<br/>[azubiheft.py]"]
  node_azubiheft_service{{"Azubiheft"}}
end

subgraph group_maintenance["Entry maintenance"]
  node_entry_deleter["Entry deleter<br/>[delete.py]"]
end

node_user(("CLI user"))

node_user -->|"provides dates"| node_cli
node_cli -->|"reads"| node_credentials
node_cli -->|"fetches worklogs"| node_tempo
node_cli -->|"resolves entries"| node_ticket_mapping
node_cli -->|"logs in, submits"| node_azubiheft_client
node_azubiheft_client -->|"posts entries"| node_azubiheft_service
node_lesson_formatting -->|"fetches lesson topics"| node_webuntis_client
node_webuntis_client -->|"requests timetable"| node_webuntis_client
node_webuntis_client -->|"requests lesson details"| node_azubiheft_service
node_entry_deleter -->|"deletes entries"| node_azubiheft_service

click node_credentials "https://github.com/al-wazny/azubiheftapi/blob/main/credentials.json"
click node_cli "https://github.com/al-wazny/azubiheftapi/blob/main/myAPI.py"
click node_ticket_mapping "https://github.com/al-wazny/azubiheftapi/blob/main/myAPI.py"
click node_lesson_formatting "https://github.com/al-wazny/azubiheftapi/blob/main/myAPI.py"
click node_webuntis_client "https://github.com/al-wazny/azubiheftapi/blob/main/helpers/webuntis.py"
click node_azubiheft_client "https://github.com/al-wazny/azubiheftapi/blob/main/helpers/azubiheft.py"
click node_entry_deleter "https://github.com/al-wazny/azubiheftapi/blob/main/helpers/delete.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_credentials,node_cli,node_ticket_mapping,node_lesson_formatting,node_user toneBlue
class node_tempo,node_webuntis_client,node_azubiheft_client,node_azubiheft_service toneAmber
class node_entry_deleter toneMint
```

## Components

### Worklog processing

- [Credentials](https://github.com/al-wazny/azubiheftapi/blob/main/credentials.json): `credentials.json`
- [Worklog CLI](https://github.com/al-wazny/azubiheftapi/blob/main/myAPI.py): `myAPI.py`
- [Ticket mapping](https://github.com/al-wazny/azubiheftapi/blob/main/myAPI.py): `myAPI.py`
- [Lesson formatting](https://github.com/al-wazny/azubiheftapi/blob/main/myAPI.py): `myAPI.py`

### External integrations

- **Tempo API**
- [WebUntis client](https://github.com/al-wazny/azubiheftapi/blob/main/helpers/webuntis.py): `helpers/webuntis.py`
- [Azubiheft client](https://github.com/al-wazny/azubiheftapi/blob/main/helpers/azubiheft.py): `helpers/azubiheft.py`
- **Azubiheft**

### Entry maintenance

- [Entry deleter](https://github.com/al-wazny/azubiheftapi/blob/main/helpers/delete.py): `helpers/delete.py`

### Other components

- **CLI user**

## Connections

- CLI user → Worklog CLI: provides dates (evidence: `README.md`)
- Worklog CLI → Credentials: reads (evidence: `myAPI.py`)
- Worklog CLI → Tempo API: fetches worklogs (evidence: `myAPI.py`)
- Worklog CLI → Ticket mapping: resolves entries (evidence: `myAPI.py`)
- Worklog CLI → Azubiheft client: logs in, submits (evidence: `myAPI.py`)
- Azubiheft client → Azubiheft: posts entries (evidence: `helpers/azubiheft.py`)
- Lesson formatting → WebUntis client: fetches lesson topics (evidence: `myAPI.py`)
- WebUntis client → WebUntis client: requests timetable (evidence: `helpers/webuntis.py`)
- WebUntis client → Azubiheft: requests lesson details (evidence: `helpers/webuntis.py`)
- Entry deleter → Azubiheft: deletes entries (evidence: `helpers/delete.py`)
