# subhanakbenli/ciftlik-takip-programi architecture

> Architecture diagram of the GitHub repository subhanakbenli/ciftlik-takip-programi, 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/subhanakbenli/ciftlik-takip-programi
- Repository: https://github.com/subhanakbenli/ciftlik-takip-programi

## Overview

This is a PyQt5 desktop animal-tracking application. Users manage animal records from a home listing, add or inspect records, update health and notes, and use QR codes to identify animals and update their location. The runtime is largely concentrated in main.py: it creates the windows, performs database operations, and implements QR handling. The README documents camera-or-file scanning and filtered listings; the sampled source confirms camera scanning and database updates, but does not expose all UI signal wiring or file-reading implementation details.

Main entry points: [`database.db`](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/database.db) (SQLite database), [`main.py`](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py) (Application runtime), [`ui_design/AnaSayfa_ui.py`](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/ui_design/AnaSayfa_ui.py) (Home listing), [`ui_design/hayvanBilgisi_ui.py`](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/ui_design/hayvanBilgisi_ui.py) (Animal details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_runtime["Application runtime<br/>[main.py]"]
  node_home["Home listing<br/>[AnaSayfa_ui.py]"]
  node_addform["Add-animal form<br/>[hayvanEkle_ui.py]"]
  node_detailform["Animal details"]
end

subgraph group_records["Animal records"]
  node_create["Add animal<br/>[main.py]"]
  node_browse["List and filter<br/>[main.py]"]
  node_edit["Update animal<br/>[main.py]"]
  node_remove["Delete animal<br/>[main.py]"]
end

subgraph group_qr["QR operations"]
  node_generate["Generate QR<br/>[main.py]"]
  node_scan["Scan QR<br/>[main.py]"]
  node_qrfiles["QR image files"]
end

subgraph group_storage["Local storage"]
  node_db[("SQLite database<br/>[database.db]")]
end

node_user(("Desktop user"))
node_camera["Camera"]

node_user -->|"starts"| node_runtime
node_runtime -->|"sets up"| node_home
node_runtime -->|"imports"| node_addform
node_runtime -->|"imports"| node_detailform
node_user -->|"uses"| node_home
node_home -->|"filters"| node_browse
node_addform -.->|"submits"| node_create
node_detailform -.->|"edits"| node_edit
node_home -.->|"deletes"| node_remove
node_create -->|"inserts"| node_db
node_browse -->|"queries"| node_db
node_edit -->|"updates"| node_db
node_remove -->|"deletes"| node_db
node_detailform -->|"requests"| node_generate
node_generate -->|"saves image"| node_qrfiles
node_user -->|"scans code"| node_scan
node_camera -->|"provides frames"| node_scan
node_scan -->|"updates location"| node_db
node_scan -.->|"reads image"| node_qrfiles

click node_runtime "https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py"
click node_home "https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/ui_design/AnaSayfa_ui.py"
click node_addform "https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/ui_design/hayvanEkle_ui.py"
click node_detailform "https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/ui_design/hayvanBilgisi_ui.py"
click node_create "https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py"
click node_browse "https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py"
click node_edit "https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py"
click node_remove "https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py"
click node_generate "https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py"
click node_scan "https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py"
click node_qrfiles "https://github.com/subhanakbenli/ciftlik-takip-programi/tree/main/QR"
click node_db "https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/database.db"

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_runtime,node_home,node_addform,node_detailform,node_user toneBlue
class node_create,node_browse,node_edit,node_remove toneAmber
class node_generate,node_scan,node_qrfiles toneMint
class node_db toneRose
class node_camera toneIndigo
```

## Components

### Desktop interface

- [Application runtime](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py): `main.py`
- [Home listing](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/ui_design/AnaSayfa_ui.py): `ui_design/AnaSayfa_ui.py`
- [Add-animal form](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/ui_design/hayvanEkle_ui.py): `ui_design/hayvanEkle_ui.py`
- [Animal details](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/ui_design/hayvanBilgisi_ui.py): `ui_design/hayvanBilgisi_ui.py`

### Animal records

- [Add animal](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py): `main.py`
- [List and filter](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py): `main.py`
- [Update animal](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py): `main.py`
- [Delete animal](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py): `main.py`

### QR operations

- [Generate QR](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py): `main.py`
- [Scan QR](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/main.py): `main.py`
- [QR image files](https://github.com/subhanakbenli/ciftlik-takip-programi/tree/main/QR): `QR`

### Local storage

- [SQLite database](https://github.com/subhanakbenli/ciftlik-takip-programi/blob/main/database.db): `database.db`

### Other components

- **Desktop user**
- **Camera**

## Connections

- Desktop user → Application runtime: starts (evidence: `README.md`)
- Application runtime → Home listing: sets up (evidence: `main.py`)
- Application runtime → Add-animal form: imports (evidence: `main.py`)
- Application runtime → Animal details: imports (evidence: `main.py`)
- Desktop user → Home listing: uses (evidence: `README.md`)
- Home listing → List and filter: filters (evidence: `README.md`)
- Add-animal form → Add animal: submits (evidence: `main.py`)
- Animal details → Update animal: edits (evidence: `main.py`)
- Home listing → Delete animal: deletes (evidence: `main.py`)
- Add animal → SQLite database: inserts (evidence: `main.py`)
- List and filter → SQLite database: queries (evidence: `main.py`)
- Update animal → SQLite database: updates (evidence: `main.py`)
- Delete animal → SQLite database: deletes (evidence: `main.py`)
- Animal details → Generate QR: requests (evidence: `main.py`)
- Generate QR → QR image files: saves image (evidence: `main.py`)
- Desktop user → Scan QR: scans code (evidence: `README.md`)
- Camera → Scan QR: provides frames (evidence: `main.py`)
- Scan QR → SQLite database: updates location (evidence: `main.py`)
- Scan QR → QR image files: reads image
