# mohamednasih/attendo architecture

> Architecture diagram of the GitHub repository mohamednasih/attendo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mohamednasih/attendo
- Repository: https://github.com/mohamednasih/attendo

## Overview

Xattendo is a local attendance and workstation lock-history dashboard. Users authenticate to Attendo and 42 Intra, then view daily/weekly attendance estimates, lock records, and workstation clusters; they can also use terminal and desktop indicators. The graph focuses on the browser workflow and distinct data sources, with supporting cluster parsing, local SQLite history, and desktop entry points. Source excerpts support the cited calls; README documents broader dashboard features and interfaces, while several paths are represented at directory level where implementation was not sampled.

Main entry points: [`website.py`](https://github.com/mohamednasih/attendo/blob/master/website.py) (Local web server), [`daily.py`](https://github.com/mohamednasih/attendo/blob/master/daily.py) (Daily reports), [`intra_client.py`](https://github.com/mohamednasih/attendo/blob/master/intra_client.py) (Intra reader), [`shared_history.py`](https://github.com/mohamednasih/attendo/blob/master/shared_history.py) (Lock history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Service access"]
  node_attendo["Attendo reader<br/>[attendo_client.py]"]
  node_intra["Intra reader<br/>[intra_client.py]"]
  node_floor["Floor geometry<br/>[cluster_layout.py]"]
  node_profile["Profile parser<br/>[cluster_profile.py]"]
end

subgraph group_accounting["Attendance accounting"]
  node_locks[("Lock history<br/>[shared_history.py]")]
  node_accounting["Daily reports<br/>[daily.py]"]
  node_legacy["Lock accounting<br/>[logged_time.py]"]
end

subgraph group_dashboard["Dashboard experience"]
  node_server["Local web server<br/>[website.py]"]
  node_app["Dashboard UI<br/>[app.js]"]
  node_clusterui["Cluster map UI<br/>[clusters.js]"]
  node_webstyles["Theme settings<br/>[theme.js]"]
end

subgraph group_desktop["Desktop access"]
  node_desktopcontrol["Startup settings<br/>[desktop_startup.py]"]
  node_control["Server launcher<br/>[server_control.py]"]
  node_widget["Desktop widget<br/>[desktop_widget.py]"]
  node_dock["Dock dashboard<br/>[dock_dashboard.py]"]
  node_notify["Notifications"]
end

node_student(("Student"))
node_intra_service{{"42 Intra"}}
node_attendo_service{{"Attendo"}}
node_browser(("Web browser"))

node_student -->|"opens dashboard"| node_browser
node_browser -->|"requests pages"| node_server
node_app -->|"fetches reports"| node_server
node_app -->|"checks sessions"| node_server
node_server -->|"checks status"| node_attendo
node_server -->|"checks status"| node_intra
node_attendo -->|"reads attendance"| node_attendo_service
node_intra -->|"reads totals"| node_intra_service
node_intra -->|"fetches plans"| node_floor
node_intra -->|"parses profiles"| node_profile
node_server -->|"runs reports"| node_accounting
node_accounting -->|"reads attendance"| node_attendo
node_accounting -->|"reads logged totals"| node_intra
node_accounting -->|"reads lock intervals"| node_locks
node_locks -->|"stores observations"| node_locks
node_server -->|"serves cluster data"| node_intra
node_clusterui -->|"loads cluster data"| node_server
node_app -->|"loads cluster view"| node_clusterui
node_clusterui -->|"requests profiles"| node_server
node_student -->|"runs terminal stats"| node_accounting
node_student -->|"views desktop stats"| node_widget
node_widget -->|"requests reports"| node_accounting
node_widget -->|"requests lock list"| node_accounting
node_student -->|"opens dock view"| node_dock
node_student -->|"receives alerts"| node_notify
node_server -->|"updates startup"| node_desktopcontrol
node_desktopcontrol -->|"configures launch"| node_control
node_control -.->|"starts collector"| node_locks
node_browser -.->|"saves theme"| node_webstyles

click node_attendo "https://github.com/mohamednasih/attendo/blob/master/attendo_client.py"
click node_intra "https://github.com/mohamednasih/attendo/blob/master/intra_client.py"
click node_floor "https://github.com/mohamednasih/attendo/blob/master/cluster_layout.py"
click node_profile "https://github.com/mohamednasih/attendo/blob/master/cluster_profile.py"
click node_locks "https://github.com/mohamednasih/attendo/blob/master/shared_history.py"
click node_accounting "https://github.com/mohamednasih/attendo/blob/master/daily.py"
click node_legacy "https://github.com/mohamednasih/attendo/blob/master/logged_time.py"
click node_server "https://github.com/mohamednasih/attendo/blob/master/website.py"
click node_app "https://github.com/mohamednasih/attendo/blob/master/web/app.js"
click node_clusterui "https://github.com/mohamednasih/attendo/blob/master/web/clusters.js"
click node_webstyles "https://github.com/mohamednasih/attendo/blob/master/web/theme.js"
click node_desktopcontrol "https://github.com/mohamednasih/attendo/blob/master/desktop_startup.py"
click node_control "https://github.com/mohamednasih/attendo/blob/master/server_control.py"
click node_widget "https://github.com/mohamednasih/attendo/blob/master/desktop_widget.py"
click node_dock "https://github.com/mohamednasih/attendo/blob/master/dock_dashboard.py"
click node_notify "https://github.com/mohamednasih/attendo/blob/master/desktop_notification.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_attendo,node_intra,node_floor,node_profile,node_browser toneBlue
class node_locks,node_accounting,node_legacy toneAmber
class node_server,node_app,node_clusterui,node_webstyles toneMint
class node_desktopcontrol,node_control,node_widget,node_dock,node_notify toneRose
class node_student,node_intra_service,node_attendo_service toneIndigo
```

## Components

### Service access

- [Attendo reader](https://github.com/mohamednasih/attendo/blob/master/attendo_client.py): `attendo_client.py`
- [Intra reader](https://github.com/mohamednasih/attendo/blob/master/intra_client.py): `intra_client.py`
- [Floor geometry](https://github.com/mohamednasih/attendo/blob/master/cluster_layout.py): `cluster_layout.py`
- [Profile parser](https://github.com/mohamednasih/attendo/blob/master/cluster_profile.py): `cluster_profile.py`

### Attendance accounting

- [Lock history](https://github.com/mohamednasih/attendo/blob/master/shared_history.py): `shared_history.py`
- [Daily reports](https://github.com/mohamednasih/attendo/blob/master/daily.py): `daily.py`
- [Lock accounting](https://github.com/mohamednasih/attendo/blob/master/logged_time.py): `logged_time.py`

### Dashboard experience

- [Local web server](https://github.com/mohamednasih/attendo/blob/master/website.py): `website.py`
- [Dashboard UI](https://github.com/mohamednasih/attendo/blob/master/web/app.js): `web/app.js`
- [Cluster map UI](https://github.com/mohamednasih/attendo/blob/master/web/clusters.js): `web/clusters.js`
- [Theme settings](https://github.com/mohamednasih/attendo/blob/master/web/theme.js): `web/theme.js`

### Desktop access

- [Startup settings](https://github.com/mohamednasih/attendo/blob/master/desktop_startup.py): `desktop_startup.py`
- [Server launcher](https://github.com/mohamednasih/attendo/blob/master/server_control.py): `server_control.py`
- [Desktop widget](https://github.com/mohamednasih/attendo/blob/master/desktop_widget.py): `desktop_widget.py`
- [Dock dashboard](https://github.com/mohamednasih/attendo/blob/master/dock_dashboard.py): `dock_dashboard.py`
- [Notifications](https://github.com/mohamednasih/attendo/blob/master/desktop_notification.py): `desktop_notification.py`

### Other components

- **Student**
- **42 Intra**
- **Attendo**
- **Web browser**

## Connections

- Student → Web browser: opens dashboard (evidence: `README.md`)
- Web browser → Local web server: requests pages (evidence: `README.md`)
- Dashboard UI → Local web server: fetches reports (evidence: `web/app.js`)
- Dashboard UI → Local web server: checks sessions (evidence: `web/app.js`)
- Local web server → Attendo reader: checks status (evidence: `website.py`)
- Local web server → Intra reader: checks status (evidence: `website.py`)
- Attendo reader → Attendo: reads attendance (evidence: `README.md`)
- Intra reader → 42 Intra: reads totals (evidence: `intra_client.py`)
- Intra reader → Floor geometry: fetches plans (evidence: `intra_client.py`)
- Intra reader → Profile parser: parses profiles (evidence: `intra_client.py`)
- Local web server → Daily reports: runs reports (evidence: `website.py`)
- Daily reports → Attendo reader: reads attendance (evidence: `daily.py`)
- Daily reports → Intra reader: reads logged totals (evidence: `daily.py`)
- Daily reports → Lock history: reads lock intervals (evidence: `daily.py`)
- Lock history → Lock history: stores observations (evidence: `shared_history.py`)
- Local web server → Intra reader: serves cluster data (evidence: `website.py`)
- Cluster map UI → Local web server: loads cluster data (evidence: `web/clusters.js`)
- Dashboard UI → Cluster map UI: loads cluster view (evidence: `web/app.js`)
- Cluster map UI → Local web server: requests profiles (evidence: `web/clusters.js`)
- Student → Daily reports: runs terminal stats (evidence: `README.md`)
- Student → Desktop widget: views desktop stats (evidence: `README.md`)
- Desktop widget → Daily reports: requests reports (evidence: `desktop_widget.py`)
- Desktop widget → Daily reports: requests lock list (evidence: `desktop_widget.py`)
- Student → Dock dashboard: opens dock view (evidence: `README.md`)
- Student → Notifications: receives alerts (evidence: `README.md`)
- Local web server → Startup settings: updates startup (evidence: `website.py`)
- Startup settings → Server launcher: configures launch (evidence: `desktop_startup.py`)
- Server launcher → Lock history: starts collector
- Web browser → Theme settings: saves theme (evidence: `README.md`)
