# aakku106/codetracker architecture

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

- Interactive diagram: https://gitdiagram.com/aakku106/codetracker
- Repository: https://github.com/aakku106/codetracker

## Overview

##### Project type and purpose
- This is a small full-stack web application built in Python (likely using Flask, given the typical file names) whose purpose is to track, display, and periodically update a chronological work log. It uses server-side templates, a simple CSV file as its data store, and a Git repository update mechanism.

##### File structure
Top-level:
- app.py           – main web server application
- update_repo.py   – script that pulls changes from a Git repo and updates local logs
- logs.csv         – primary data store for work-log entries
- git_update.log   – audit of the Git-pull/update operations
- __pycache__      – compiled Python modules (auto-generated)
Directories:
- static/          – static assets (CSS, images, JS)
– style.css
- templates/       – Jinja2 (or Flask) templates for server-side rendering
– index.html   (homepage showing latest entries)
– logs.html    (detailed listing view)

##### README for additional insights
- README.md contains only a log table of entries (S.N, function description, timestamp).
- A browser-based UI
- Server logic to read/write logs.csv
- A background or on-demand Git-update process

##### Detail
- Don’t omit minor but essential pieces: the scheduler, log file, static-asset serving.
- End-to-end flow of a user viewing logs and the background update process.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Frontend Layer"
        Browser["Browser Client(s)"]:::ui
        StaticAssets["style.css"]:::ui
    end

    subgraph "Backend Layer"
        WebServer["Web Server (app.py)"]:::server
        TemplatesIndex["templates/index.html"]:::server
        TemplatesLogs["templates/logs.html"]:::server
        DataStore[(logs.csv)]:::data
        LogFile[(git_update.log)]:::data
        UpdateScript["update_repo.py"]:::external
    end

    Scheduler["Scheduler / Cron Service"]:::external
    GitRepo["Git Repository (remote origin)"]:::external

    Browser -->|"HTTP GET/POST"| WebServer
    WebServer -->|"read/write"| DataStore
    WebServer -->|"renders view"| TemplatesIndex
    WebServer -->|"renders view"| TemplatesLogs
    WebServer -->|"serves static"| StaticAssets
    StaticAssets --> Browser

    Scheduler -->|"triggers"| UpdateScript
    UpdateScript -->|"git pull/push"| GitRepo
    UpdateScript -->|"append entry"| DataStore
    UpdateScript -->|"append audit"| LogFile
    UpdateScript -->|"reload signal"| WebServer

    click WebServer "https://github.com/aakku106/codetracker/blob/main/app.py"
    click TemplatesIndex "https://github.com/aakku106/codetracker/blob/main/templates/index.html"
    click TemplatesLogs "https://github.com/aakku106/codetracker/blob/main/templates/logs.html"
    click StaticAssets "https://github.com/aakku106/codetracker/blob/main/static/style.css"
    click DataStore "https://github.com/aakku106/codetracker/blob/main/logs.csv"
    click UpdateScript "https://github.com/aakku106/codetracker/blob/main/update_repo.py"
    click LogFile "https://github.com/aakku106/codetracker/blob/main/git_update.log"

    classDef ui fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef server fill:#90EE90,stroke:#000,stroke-width:1px
    classDef data fill:#FFA500,stroke:#000,stroke-width:1px
    classDef external fill:#DDA0DD,stroke:#000,stroke-width:1px
```
