# mehmet-kahraman/okan-uni-ceng413 architecture

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

- Interactive diagram: https://gitdiagram.com/mehmet-kahraman/okan-uni-ceng413
- Repository: https://github.com/mehmet-kahraman/okan-uni-ceng413

## Overview

This tiny Flask service handles three GET endpoints: health status, configurable greetings, and a stateful visit counter. The visit handler obtains a counter-file path, then reads and increments the persisted value. The graph focuses on runtime behavior; Docker and lab materials are not runtime components. Relationships are grounded in the README and the app.py excerpt.

Main entry points: [`app.py`](https://github.com/mehmet-kahraman/okan-uni-ceng413/blob/main/app.py) (Visit Handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_client(("HTTP Client"))
node_health["Health Handler<br/>[app.py]"]
node_greet["Greeting Handler<br/>[app.py]"]
node_visit["Visit Handler<br/>[app.py]"]
node_counter_path["Counter Path Helper<br/>[app.py]"]
node_environment["Environment"]
node_counter_file[("Visit Counter File<br/>[app.py]")]

node_client -->|"GET /health"| node_health
node_health -->|"returns status"| node_client
node_client -->|"GET /greet"| node_greet
node_greet -->|"returns greeting"| node_client
node_environment -->|"sets greeting"| node_greet
node_client -->|"GET /visit"| node_visit
node_visit -->|"returns count"| node_client
node_visit -->|"gets path"| node_counter_path
node_counter_path -->|"creates path"| node_counter_file
node_environment -->|"sets data directory"| node_counter_path
node_visit -->|"reads and writes"| node_counter_file

click node_health "https://github.com/mehmet-kahraman/okan-uni-ceng413/blob/main/app.py"
click node_greet "https://github.com/mehmet-kahraman/okan-uni-ceng413/blob/main/app.py"
click node_visit "https://github.com/mehmet-kahraman/okan-uni-ceng413/blob/main/app.py"
click node_counter_path "https://github.com/mehmet-kahraman/okan-uni-ceng413/blob/main/app.py"
click node_counter_file "https://github.com/mehmet-kahraman/okan-uni-ceng413/blob/main/app.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_client toneBlue
class node_health,node_greet,node_visit toneMint
class node_counter_path toneTeal
class node_environment toneIndigo
class node_counter_file toneAmber
```

## Components

### Other components

- **HTTP Client**
- [Health Handler](https://github.com/mehmet-kahraman/okan-uni-ceng413/blob/main/app.py): `app.py`
- [Greeting Handler](https://github.com/mehmet-kahraman/okan-uni-ceng413/blob/main/app.py): `app.py`
- [Visit Handler](https://github.com/mehmet-kahraman/okan-uni-ceng413/blob/main/app.py): `app.py`
- [Counter Path Helper](https://github.com/mehmet-kahraman/okan-uni-ceng413/blob/main/app.py): `app.py`
- **Environment**
- [Visit Counter File](https://github.com/mehmet-kahraman/okan-uni-ceng413/blob/main/app.py): `app.py`

## Connections

- HTTP Client → Health Handler: GET /health (evidence: `README.md`)
- Health Handler → HTTP Client: returns status (evidence: `app.py`)
- HTTP Client → Greeting Handler: GET /greet (evidence: `README.md`)
- Greeting Handler → HTTP Client: returns greeting (evidence: `app.py`)
- Environment → Greeting Handler: sets greeting (evidence: `app.py`)
- HTTP Client → Visit Handler: GET /visit (evidence: `README.md`)
- Visit Handler → HTTP Client: returns count (evidence: `app.py`)
- Visit Handler → Counter Path Helper: gets path (evidence: `app.py`)
- Counter Path Helper → Visit Counter File: creates path (evidence: `app.py`)
- Environment → Counter Path Helper: sets data directory (evidence: `app.py`)
- Visit Handler → Visit Counter File: reads and writes (evidence: `app.py`)
