# obsercorma/managerscreen architecture

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

- Interactive diagram: https://gitdiagram.com/obsercorma/managerscreen
- Repository: https://github.com/obsercorma/managerscreen

## Overview

##### Project type and purpose
- Project name: ManagerScreen
- Purpose: A Python‐based “dashboard” application intended to display information on a small hardware screen (likely a ST7920 graphic LCD) about tasks, repositories (“dépôts”), code snippets, etc.
- Status: Development paused (INFO: projet mis en pause).

##### File structure
Top‑level scripts and directories:
- main.py         – entry point, orchestrates page navigation and update loop
- *.py (depotPage, gitPage, homePage, snippetsPage, encoder, st7920, testssh, depotPage)
– individual modules implementing display pages, hardware drivers, and utility functions
- snippets.json   – local data source for code snippets
- snippets/       – directory with snippet update/restart scripts
- service.sh      – installation or service startup script
- start_process.txt – possibly a log or PID placeholder
- VERSION, README.md, .gitignore

Patterns:
- Modular “Page” classes for each screen
- Hardware abstraction layer (st7920.py for LCD, encoder.py for input)
- Main controller loop (main.py) ties modules together
- External integration: SSH-based Git info (testssh.py, gitPage.py), local JSON data

##### README for additional insights
- Confirms project role as an information dashboard for tasks and repos

##### Detailed but not over‑engineered
– Hardware Layer
– Abstraction Layer (st7920.py, encoder.py)
– Application Layer (main.py, Page modules)
– Integration Layer (testssh.py, snippets.json)
– Deployment Layer (service.sh)
– Captures all modules in the file tree
– Shows data/control flow relationships
– Is annotated with technology details (e.g., “SSH → Git host”, “GPIO → LCD”)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Hardware Layer
    subgraph "Hardware Layer"
        direction TB
        LCD["ST7920 LCD"]:::hardware
        EncoderHW["Rotary Encoder"]:::hardware
    end

    %% Abstraction Layer
    subgraph "Abstraction Layer"
        direction TB
        ST7920["st7920.py"]:::abstraction
        EncoderDrv["encoder.py"]:::abstraction
    end

    %% Application Layer
    subgraph "Application Layer"
        direction TB
        Controller["main.py"]:::application
        HomePage["homePage.py"]:::application
        DepotPage["depotPage.py"]:::application
        GitPage["gitPage.py"]:::application
        SnippetsPage["snippetsPage.py"]:::application
    end

    %% Integration Layer
    subgraph "Integration Layer"
        direction TB
        SnippetsJSON["snippets.json"]:::data
        SnippetsDir["snippets/"]:::data
        SSHUtility["testssh.py"]:::data
        GitServer["External Git Server"]:::external
    end

    %% Deployment Layer
    subgraph "Deployment"
        direction TB
        ServiceScript["service.sh"]:::deployment
    end

    %% Connections
    ServiceScript -->|"starts"| Controller

    Controller -->|"reads input"| EncoderDrv
    Controller -->|"writes output"| ST7920
    Controller -->|"loads"| HomePage
    Controller -->|"loads"| DepotPage
    Controller -->|"loads"| GitPage
    Controller -->|"loads"| SnippetsPage

    EncoderHW -->|"GPIO events"| EncoderDrv
    ST7920 -->|"GPIO commands"| LCD

    DepotPage -->|"SSH calls"| SSHUtility
    GitPage -->|"SSH calls"| SSHUtility
    SSHUtility -->|"SSH"| GitServer

    SnippetsPage -->|"reads"| SnippetsJSON
    SnippetsPage -->|"executes scripts"| SnippetsDir

    %% Click Events
    click Controller "https://github.com/obsercorma/managerscreen/blob/main/main.py"
    click ST7920 "https://github.com/obsercorma/managerscreen/blob/main/st7920.py"
    click EncoderDrv "https://github.com/obsercorma/managerscreen/blob/main/encoder.py"
    click HomePage "https://github.com/obsercorma/managerscreen/blob/main/homePage.py"
    click DepotPage "https://github.com/obsercorma/managerscreen/blob/main/depotPage.py"
    click GitPage "https://github.com/obsercorma/managerscreen/blob/main/gitPage.py"
    click SnippetsPage "https://github.com/obsercorma/managerscreen/blob/main/snippetsPage.py"
    click SnippetsJSON "https://github.com/obsercorma/managerscreen/blob/main/snippets.json"
    click SnippetsDir "https://github.com/obsercorma/managerscreen/tree/main/snippets/"
    click SSHUtility "https://github.com/obsercorma/managerscreen/blob/main/testssh.py"
    click ServiceScript "https://github.com/obsercorma/managerscreen/blob/main/service.sh"

    %% Styles
    classDef hardware fill:#AED6F1,stroke:#1F618D,color:#1F618D;
    classDef abstraction fill:#A9DFBF,stroke:#196F3D,color:#196F3D;
    classDef application fill:#F9E79F,stroke:#B9770E,color:#B9770E;
    classDef data fill:#F5B7B1,stroke:#922B21,color:#922B21;
    classDef deployment fill:#D5DBDB,stroke:#424949,color:#424949;
    classDef external fill:#D2B4DE,stroke:#6C3483,color:#6C3483;
```
