# yaoplab/elarc architecture

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

- Interactive diagram: https://gitdiagram.com/yaoplab/elarc
- Repository: https://github.com/yaoplab/elarc

## Overview

This repository is a suite of desktop applications for school administration, sharing LarcCommon infrastructure; it also includes a separate LarcForge quality dashboard and a cloud-sync agent. A representative user workflow is signing in to an app and managing domain records, such as HR staff, leave, and documents. The tree shows additional applications for accounting, configuration, documentation, teaching, and supervision. The available excerpts and source index support only some connections, so unsampled feature links are omitted rather than inferred.

Main entry points: [`LarcRH/main.py`](https://github.com/yaoplab/elarc/blob/main/LarcRH/main.py) (HR app), [`LarcCommon/larccommon/database.py`](https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/database.py) (Shared database), [`LarcCommon/larccommon/error_reporting.py`](https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/error_reporting.py) (Error reporting), [`LarcRH/common/hr_database.py`](https://github.com/yaoplab/elarc/blob/main/LarcRH/common/hr_database.py) (HR records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shared["Shared app services"]
  node_entry["App startup<br/>[bootstrap.py]"]
  node_login["Authentication<br/>[auth.py]"]
  node_session["User session<br/>[session.py]"]
  node_db[("Shared database<br/>[database.py]")]
  node_errors["Error reporting<br/>[error_reporting.py]"]
  node_logging["Logging<br/>[logger.py]"]
  node_theme["Theme manager<br/>[theme.py]"]
  node_design["Design system<br/>[design_system.py]"]
  node_phi["Phi scaling<br/>[scale.py]"]
  node_widgets["Themed widgets<br/>[themed_widget.py]"]
  node_safe["Safe UI slots<br/>[safe_slot.py]"]
end

subgraph group_hr["Human resources"]
  node_hrstart["HR app<br/>[main.py]"]
  node_hrwindow["HR workspace<br/>[main_window.py]"]
  node_hrdata[("HR records<br/>[hr_database.py]")]
  node_documents["Staff documents"]
  node_letters["Letters<br/>[letter_manager.py]"]
end

subgraph group_school["School applications"]
  node_accounting["Accounting app<br/>[main.py]"]
  node_configuration["Configuration app<br/>[main.py]"]
  node_teaching["Teacher app<br/>[main.py]"]
  node_evaluation["Evaluation manager<br/>[eval_manager.py]"]
  node_supervisor["Supervisor app<br/>[main.py]"]
  node_hub["Application hub<br/>[main.py]"]
  node_docs["Documentation app<br/>[main.py]"]
end

subgraph group_tools["Operational tools"]
  node_forge["Quality dashboard<br/>[app.py]"]
  node_sync["Cloud sync agent<br/>[main.py]"]
end

node_user(("Desktop user"))

node_user -->|"launches"| node_hrstart
node_hrstart -->|"authenticates"| node_login
node_hrstart -->|"opens"| node_hrwindow
node_hrstart -->|"uses records"| node_hrdata
node_login -->|"queries users"| node_db
node_login -.->|"sets session"| node_session
node_hrdata -->|"queries database"| node_db
node_documents -->|"uses staff data"| node_hrdata
node_letters -->|"uses HR data"| node_hrdata
node_entry -->|"starts telemetry"| node_errors
node_errors -->|"writes errors"| node_db
node_logging -->|"reports errors"| node_errors
node_safe -->|"reports exceptions"| node_errors
node_db -->|"attaches audit context"| node_session
node_theme -->|"provides theme"| node_design
node_design -->|"reads theme"| node_theme
node_design -->|"uses scale"| node_phi
node_user -->|"launches"| node_accounting
node_user -->|"launches"| node_configuration
node_user -->|"launches"| node_teaching
node_teaching -->|"opens manager"| node_evaluation
node_user -->|"launches"| node_supervisor
node_user -->|"launches"| node_hub
node_user -->|"launches"| node_docs
node_user -.->|"launches"| node_forge
node_user -.->|"starts sync"| node_sync

click node_entry "https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/bootstrap.py"
click node_login "https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/auth.py"
click node_session "https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/session.py"
click node_db "https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/database.py"
click node_errors "https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/error_reporting.py"
click node_logging "https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/logger.py"
click node_theme "https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/theme.py"
click node_design "https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/design_system.py"
click node_phi "https://github.com/yaoplab/elarc/blob/main/LarcCommon/phibuilder/phi/scale.py"
click node_widgets "https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/widgets/themed_widget.py"
click node_safe "https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/safe_slot.py"
click node_hrstart "https://github.com/yaoplab/elarc/blob/main/LarcRH/main.py"
click node_hrwindow "https://github.com/yaoplab/elarc/blob/main/LarcRH/views/main_window.py"
click node_hrdata "https://github.com/yaoplab/elarc/blob/main/LarcRH/common/hr_database.py"
click node_documents "https://github.com/yaoplab/elarc/blob/main/LarcRH/views/document_manager.py"
click node_letters "https://github.com/yaoplab/elarc/blob/main/LarcRH/views/letter_manager.py"
click node_accounting "https://github.com/yaoplab/elarc/blob/main/LarcCompta/main.py"
click node_configuration "https://github.com/yaoplab/elarc/blob/main/LarcConfig/main.py"
click node_teaching "https://github.com/yaoplab/elarc/blob/main/LarcProf/main.py"
click node_evaluation "https://github.com/yaoplab/elarc/blob/main/LarcProf/views/eval_manager.py"
click node_supervisor "https://github.com/yaoplab/elarc/blob/main/LarcSuperviseur/main.py"
click node_hub "https://github.com/yaoplab/elarc/blob/main/LarcHub/main.py"
click node_docs "https://github.com/yaoplab/elarc/blob/main/LarcDocs/main.py"
click node_forge "https://github.com/yaoplab/elarc/blob/main/LarcForge/larcforge/ui/app.py"
click node_sync "https://github.com/yaoplab/elarc/blob/main/LarcCloudSync/sync_agent/main.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_entry,node_login,node_session,node_db,node_errors,node_logging,node_theme,node_design,node_phi,node_widgets,node_safe,node_user toneBlue
class node_hrstart,node_hrwindow,node_hrdata,node_documents,node_letters toneAmber
class node_accounting,node_configuration,node_teaching,node_evaluation,node_supervisor,node_hub,node_docs toneMint
class node_forge,node_sync toneRose
```

## Components

### Shared app services

- [App startup](https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/bootstrap.py): `LarcCommon/larccommon/bootstrap.py`
- [Authentication](https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/auth.py): `LarcCommon/larccommon/auth.py`
- [User session](https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/session.py): `LarcCommon/larccommon/session.py`
- [Shared database](https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/database.py): `LarcCommon/larccommon/database.py`
- [Error reporting](https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/error_reporting.py): `LarcCommon/larccommon/error_reporting.py`
- [Logging](https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/logger.py): `LarcCommon/larccommon/logger.py`
- [Theme manager](https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/theme.py): `LarcCommon/larccommon/theme.py`
- [Design system](https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/design_system.py): `LarcCommon/larccommon/design_system.py`
- [Phi scaling](https://github.com/yaoplab/elarc/blob/main/LarcCommon/phibuilder/phi/scale.py): `LarcCommon/phibuilder/phi/scale.py`
- [Themed widgets](https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/widgets/themed_widget.py): `LarcCommon/larccommon/widgets/themed_widget.py`
- [Safe UI slots](https://github.com/yaoplab/elarc/blob/main/LarcCommon/larccommon/safe_slot.py): `LarcCommon/larccommon/safe_slot.py`

### Human resources

- [HR app](https://github.com/yaoplab/elarc/blob/main/LarcRH/main.py): `LarcRH/main.py`
- [HR workspace](https://github.com/yaoplab/elarc/blob/main/LarcRH/views/main_window.py): `LarcRH/views/main_window.py`
- [HR records](https://github.com/yaoplab/elarc/blob/main/LarcRH/common/hr_database.py): `LarcRH/common/hr_database.py`
- [Staff documents](https://github.com/yaoplab/elarc/blob/main/LarcRH/views/document_manager.py): `LarcRH/views/document_manager.py`
- [Letters](https://github.com/yaoplab/elarc/blob/main/LarcRH/views/letter_manager.py): `LarcRH/views/letter_manager.py`

### School applications

- [Accounting app](https://github.com/yaoplab/elarc/blob/main/LarcCompta/main.py): `LarcCompta/main.py`
- [Configuration app](https://github.com/yaoplab/elarc/blob/main/LarcConfig/main.py): `LarcConfig/main.py`
- [Teacher app](https://github.com/yaoplab/elarc/blob/main/LarcProf/main.py): `LarcProf/main.py`
- [Evaluation manager](https://github.com/yaoplab/elarc/blob/main/LarcProf/views/eval_manager.py): `LarcProf/views/eval_manager.py`
- [Supervisor app](https://github.com/yaoplab/elarc/blob/main/LarcSuperviseur/main.py): `LarcSuperviseur/main.py`
- [Application hub](https://github.com/yaoplab/elarc/blob/main/LarcHub/main.py): `LarcHub/main.py`
- [Documentation app](https://github.com/yaoplab/elarc/blob/main/LarcDocs/main.py): `LarcDocs/main.py`

### Operational tools

- [Quality dashboard](https://github.com/yaoplab/elarc/blob/main/LarcForge/larcforge/ui/app.py): `LarcForge/larcforge/ui/app.py`
- [Cloud sync agent](https://github.com/yaoplab/elarc/blob/main/LarcCloudSync/sync_agent/main.py): `LarcCloudSync/sync_agent/main.py`

### Other components

- **Desktop user**

## Connections

- Desktop user → HR app: launches (evidence: `LarcRH/main.py`)
- HR app → Authentication: authenticates (evidence: `LarcRH/main.py`)
- HR app → HR workspace: opens (evidence: `LarcRH/main.py`)
- HR app → HR records: uses records (evidence: `LarcRH/main.py`)
- Authentication → Shared database: queries users (evidence: `LarcCommon/larccommon/auth.py`)
- Authentication → User session: sets session (evidence: `LarcCommon/larccommon/auth.py`)
- HR records → Shared database: queries database (evidence: `LarcRH/common/hr_database.py`)
- Staff documents → HR records: uses staff data (evidence: `LarcRH/views/document_manager.py`)
- Letters → HR records: uses HR data (evidence: `LarcRH/views/letter_manager.py`)
- App startup → Error reporting: starts telemetry (evidence: `LarcCommon/larccommon/bootstrap.py`)
- Error reporting → Shared database: writes errors (evidence: `LarcCommon/larccommon/error_reporting.py`)
- Logging → Error reporting: reports errors (evidence: `LarcCommon/larccommon/logger.py`)
- Safe UI slots → Error reporting: reports exceptions (evidence: `LarcCommon/larccommon/safe_slot.py`)
- Shared database → User session: attaches audit context (evidence: `LarcCommon/larccommon/database.py`)
- Theme manager → Design system: provides theme (evidence: `LarcCommon/larccommon/theme.py`)
- Design system → Theme manager: reads theme (evidence: `LarcCommon/larccommon/design_system.py`)
- Design system → Phi scaling: uses scale (evidence: `LarcCommon/larccommon/design_system.py`)
- Desktop user → Accounting app: launches (evidence: `LarcCompta/main.py`)
- Desktop user → Configuration app: launches (evidence: `LarcConfig/main.py`)
- Desktop user → Teacher app: launches (evidence: `LarcProf/main.py`)
- Teacher app → Evaluation manager: opens manager (evidence: `LarcProf/views/eval_manager.py`)
- Desktop user → Supervisor app: launches (evidence: `LarcSuperviseur/main.py`)
- Desktop user → Application hub: launches (evidence: `LarcHub/main.py`)
- Desktop user → Documentation app: launches (evidence: `LarcDocs/main.py`)
- Desktop user → Quality dashboard: launches
- Desktop user → Cloud sync agent: starts sync
