# ryucel/tufe_hesaplama architecture

> Architecture diagram of the GitHub repository ryucel/tufe_hesaplama, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ryucel/tufe_hesaplama
- Repository: https://github.com/ryucel/tufe_hesaplama

## Overview

##### Project Type and Purpose
- This is a full-stack web application aimed at computing the inflation (TÜFE) changes and the corresponding value shifts of Turkish Lira over a selected period. The application uses historical inflation data from KKTC and leverages Python/Flask for the backend and HTML/CSS (with Bootstrap) for the frontend.
- The purpose is to allow users to select a start date, an end date, and an optional TL amount, and then display the calculated inflation change along with a descriptive summary.

##### Analyzing the File Structure
- At the top level, you have:
- app.py: This is the main Flask application file.
- cpi_data.csv: The CSV data file containing inflation data.
- requirements.txt: Lists Python dependencies like Flask, pandas, etc.
- The static directory holds all static assets:
- static/css/style.css for styling.
- static/images, manifest.json, and service-worker.js suggest Progressive Web App (PWA) support.
- The templates directory contains index.html, which is used by Flask to render the frontend.
- This simple structure follows a basic MVC pattern where:
- “Models/Controllers” are in app.py (data processing with pandas, handling business logic).
- “Views” are in the templates (HTML) and static assets (CSS, images, JavaScript for client-side interactions).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Client Side"
        CB("Client Browser"):::frontend
    end

    subgraph "Server Side"
        FS("Flask Web Server (app.py)"):::backend
        DP("Data Processor (CSV & pandas)"):::backend
        TE("Template Engine (templates/index.html)"):::view
        subgraph "Static Assets"
            CSS("CSS (static/css/style.css)"):::static
            IMG("Images (static/images)"):::static
            MAN("Manifest (static/manifest.json)"):::static
            SW("Service Worker (static/service-worker.js)"):::static
        end
    end

    CB -->|"HTTP_Request"| FS
    FS -->|"Process_Data"| DP
    FS -->|"Render_HTML"| TE
    TE -->|"HTML_Response"| CB
    FS -->|"Serve_CSS"| CSS
    FS -->|"Serve_Images"| IMG
    FS -->|"Serve_Manifest"| MAN
    FS -->|"Serve_ServiceWorker"| SW
    SW -->|"PWA_Caching"| CB

    click FS "https://github.com/ryucel/tufe_hesaplama/blob/main/app.py"
    click DP "https://github.com/ryucel/tufe_hesaplama/blob/main/cpi_data.csv"
    click TE "https://github.com/ryucel/tufe_hesaplama/blob/main/templates/index.html"
    click CSS "https://github.com/ryucel/tufe_hesaplama/blob/main/static/css/style.css"
    click IMG "https://github.com/ryucel/tufe_hesaplama/tree/main/static/images"
    click MAN "https://github.com/ryucel/tufe_hesaplama/blob/main/static/manifest.json"
    click SW "https://github.com/ryucel/tufe_hesaplama/blob/main/static/service-worker.js"

    classDef frontend fill:#add8e6,stroke:#000,stroke-width:2px;
    classDef backend fill:#ffdead,stroke:#000,stroke-width:2px;
    classDef view fill:#d3ffd3,stroke:#000,stroke-width:2px;
    classDef static fill:#f0e68c,stroke:#000,stroke-width:2px;
```
