# trianglebear/ev_ap architecture

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

- Interactive diagram: https://gitdiagram.com/trianglebear/ev_ap
- Repository: https://github.com/trianglebear/ev_ap

## Overview

Ev_Ap is a desktop RFID event-attendance application. Users register members, create events, select an event, scan RFID cards to record attendance, and review or export attendance data. MainApp wires the views, managers, and database facade; the facade selects local SQLite or the Google Sheets API backend. The README also documents points, settings-based backend switching, and CSV/Excel export. Unexcerpted modules are included where README or SOURCE INDEX establishes their role; links to unsampled behavior are omitted unless documented.

Main entry points: [`App/rfid_app.py`](https://github.com/trianglebear/ev_ap/blob/main/App/rfid_app.py) (Application shell), [`App/database/dblite.py`](https://github.com/trianglebear/ev_ap/blob/main/App/database/dblite.py) (Database facade), [`App/views/home_view.py`](https://github.com/trianglebear/ev_ap/blob/main/App/views/home_view.py) (Dashboard), [`App/views/settings_view.py`](https://github.com/trianglebear/ev_ap/blob/main/App/views/settings_view.py) (Database settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop UI"]
  node_entry["App entry<br/>[main.py]"]
  node_app["Application shell<br/>[rfid_app.py]"]
  node_home["Dashboard<br/>[home_view.py]"]
  node_theme["Theme manager<br/>[theme_manager.py]"]
  node_member_view["Members view<br/>[members_view.py]"]
  node_events_view["Events view<br/>[events_view.py]"]
  node_help_view["Help view<br/>[help_view.py]"]
  node_about_view["About view<br/>[about_view.py]"]
end

subgraph group_workflows["Attendance Workflows"]
  node_member_mgr["Member registration<br/>[member_manager.py]"]
  node_event_mgr["Event creation<br/>[event_manager.py]"]
  node_table_mgr["Attendance scanning<br/>[table_manager.py]"]
end

subgraph group_persistence["Persistence"]
  node_db_facade["Database facade<br/>[dblite.py]"]
  node_config["Backend configuration<br/>[config.py]"]
  node_sqlite[("SQLite backend<br/>[sqlite_db.py]")]
  node_sheet_client["Sheets API client<br/>[sheet_db.py]"]
end

subgraph group_presentation["Reports And Settings"]
  node_reports["Reports and export<br/>[reports_view.py]"]
  node_settings["Database settings<br/>[settings_view.py]"]
end

node_user(("Operator"))
node_sheets_service{{"Google Sheets service"}}

node_user -->|"launches"| node_entry
node_entry -->|"starts"| node_app
node_app -->|"initializes"| node_db_facade
node_app -->|"creates"| node_theme
node_app -->|"loads"| node_home
node_app -->|"loads"| node_member_view
node_app -->|"loads"| node_events_view
node_app -->|"loads"| node_reports
node_app -->|"loads"| node_settings
node_app -->|"loads"| node_help_view
node_app -->|"loads"| node_about_view
node_home -->|"opens registration"| node_member_mgr
node_home -->|"opens creation"| node_event_mgr
node_home -->|"opens selected event"| node_table_mgr
node_member_view -->|"opens registration"| node_member_mgr
node_member_mgr -->|"registers member"| node_db_facade
node_event_mgr -->|"creates event"| node_db_facade
node_table_mgr -->|"reads and records attendance"| node_db_facade
node_table_mgr -->|"checks scan cache"| node_member_mgr
node_reports -->|"fetches report data"| node_db_facade
node_settings -->|"switches backend"| node_db_facade
node_db_facade -->|"reads mode and URL"| node_config
node_db_facade -->|"delegates local storage"| node_sqlite
node_db_facade -->|"delegates cloud storage"| node_sheet_client
node_sheet_client -.->|"sends API requests"| node_sheets_service
node_settings -->|"saves backend settings"| node_config
node_settings -->|"tests connection"| node_sheet_client

click node_entry "https://github.com/trianglebear/ev_ap/blob/main/App/main.py"
click node_app "https://github.com/trianglebear/ev_ap/blob/main/App/rfid_app.py"
click node_home "https://github.com/trianglebear/ev_ap/blob/main/App/views/home_view.py"
click node_theme "https://github.com/trianglebear/ev_ap/blob/main/App/theme/theme_manager.py"
click node_member_view "https://github.com/trianglebear/ev_ap/blob/main/App/views/members_view.py"
click node_events_view "https://github.com/trianglebear/ev_ap/blob/main/App/views/events_view.py"
click node_help_view "https://github.com/trianglebear/ev_ap/blob/main/App/views/help_view.py"
click node_about_view "https://github.com/trianglebear/ev_ap/blob/main/App/views/about_view.py"
click node_member_mgr "https://github.com/trianglebear/ev_ap/blob/main/App/managers/member_manager.py"
click node_event_mgr "https://github.com/trianglebear/ev_ap/blob/main/App/managers/event_manager.py"
click node_table_mgr "https://github.com/trianglebear/ev_ap/blob/main/App/managers/table_manager.py"
click node_db_facade "https://github.com/trianglebear/ev_ap/blob/main/App/database/dblite.py"
click node_config "https://github.com/trianglebear/ev_ap/blob/main/App/database/config.py"
click node_sqlite "https://github.com/trianglebear/ev_ap/blob/main/App/database/sqlite_db.py"
click node_sheet_client "https://github.com/trianglebear/ev_ap/blob/main/App/database/sheet_db.py"
click node_reports "https://github.com/trianglebear/ev_ap/blob/main/App/views/reports_view.py"
click node_settings "https://github.com/trianglebear/ev_ap/blob/main/App/views/settings_view.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_app,node_home,node_theme,node_member_view,node_events_view,node_help_view,node_about_view toneBlue
class node_member_mgr,node_event_mgr,node_table_mgr toneAmber
class node_db_facade,node_config,node_sqlite,node_sheet_client toneMint
class node_reports,node_settings toneRose
class node_user,node_sheets_service toneIndigo
```

## Components

### Desktop UI

- [App entry](https://github.com/trianglebear/ev_ap/blob/main/App/main.py): `App/main.py`
- [Application shell](https://github.com/trianglebear/ev_ap/blob/main/App/rfid_app.py): `App/rfid_app.py`
- [Dashboard](https://github.com/trianglebear/ev_ap/blob/main/App/views/home_view.py): `App/views/home_view.py`
- [Theme manager](https://github.com/trianglebear/ev_ap/blob/main/App/theme/theme_manager.py): `App/theme/theme_manager.py`
- [Members view](https://github.com/trianglebear/ev_ap/blob/main/App/views/members_view.py): `App/views/members_view.py`
- [Events view](https://github.com/trianglebear/ev_ap/blob/main/App/views/events_view.py): `App/views/events_view.py`
- [Help view](https://github.com/trianglebear/ev_ap/blob/main/App/views/help_view.py): `App/views/help_view.py`
- [About view](https://github.com/trianglebear/ev_ap/blob/main/App/views/about_view.py): `App/views/about_view.py`

### Attendance Workflows

- [Member registration](https://github.com/trianglebear/ev_ap/blob/main/App/managers/member_manager.py): `App/managers/member_manager.py`
- [Event creation](https://github.com/trianglebear/ev_ap/blob/main/App/managers/event_manager.py): `App/managers/event_manager.py`
- [Attendance scanning](https://github.com/trianglebear/ev_ap/blob/main/App/managers/table_manager.py): `App/managers/table_manager.py`

### Persistence

- [Database facade](https://github.com/trianglebear/ev_ap/blob/main/App/database/dblite.py): `App/database/dblite.py`
- [Backend configuration](https://github.com/trianglebear/ev_ap/blob/main/App/database/config.py): `App/database/config.py`
- [SQLite backend](https://github.com/trianglebear/ev_ap/blob/main/App/database/sqlite_db.py): `App/database/sqlite_db.py`
- [Sheets API client](https://github.com/trianglebear/ev_ap/blob/main/App/database/sheet_db.py): `App/database/sheet_db.py`

### Reports And Settings

- [Reports and export](https://github.com/trianglebear/ev_ap/blob/main/App/views/reports_view.py): `App/views/reports_view.py`
- [Database settings](https://github.com/trianglebear/ev_ap/blob/main/App/views/settings_view.py): `App/views/settings_view.py`

### Other components

- **Operator**
- **Google Sheets service**

## Connections

- Operator → App entry: launches (evidence: `App/main.py`)
- App entry → Application shell: starts (evidence: `App/main.py`)
- Application shell → Database facade: initializes (evidence: `App/rfid_app.py`)
- Application shell → Theme manager: creates (evidence: `App/rfid_app.py`)
- Application shell → Dashboard: loads (evidence: `App/rfid_app.py`)
- Application shell → Members view: loads (evidence: `App/rfid_app.py`)
- Application shell → Events view: loads (evidence: `App/rfid_app.py`)
- Application shell → Reports and export: loads (evidence: `App/rfid_app.py`)
- Application shell → Database settings: loads (evidence: `App/rfid_app.py`)
- Application shell → Help view: loads (evidence: `App/rfid_app.py`)
- Application shell → About view: loads (evidence: `App/rfid_app.py`)
- Dashboard → Member registration: opens registration (evidence: `App/views/home_view.py`)
- Dashboard → Event creation: opens creation (evidence: `App/views/home_view.py`)
- Dashboard → Attendance scanning: opens selected event (evidence: `App/views/home_view.py`)
- Members view → Member registration: opens registration (evidence: `App/views/members_view.py`)
- Member registration → Database facade: registers member (evidence: `App/managers/member_manager.py`)
- Event creation → Database facade: creates event (evidence: `App/managers/event_manager.py`)
- Attendance scanning → Database facade: reads and records attendance (evidence: `App/managers/table_manager.py`)
- Attendance scanning → Member registration: checks scan cache (evidence: `App/managers/table_manager.py`)
- Reports and export → Database facade: fetches report data (evidence: `App/views/reports_view.py`)
- Database settings → Database facade: switches backend (evidence: `App/views/settings_view.py`)
- Database facade → Backend configuration: reads mode and URL (evidence: `App/database/dblite.py`)
- Database facade → SQLite backend: delegates local storage (evidence: `App/database/dblite.py`)
- Database facade → Sheets API client: delegates cloud storage (evidence: `App/database/dblite.py`)
- Sheets API client → Google Sheets service: sends API requests (evidence: `App/database/sheet_db.py`)
- Database settings → Backend configuration: saves backend settings (evidence: `App/views/settings_view.py`)
- Database settings → Sheets API client: tests connection (evidence: `App/views/settings_view.py`)
