# yangzhang0215/xauat-autolib architecture

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

- Interactive diagram: https://gitdiagram.com/yangzhang0215/xauat-autolib
- Repository: https://github.com/yangzhang0215/xauat-autolib

## Overview

This repository is a personal library-booking tool, with a standalone seminar-room GUI as its recommended user workflow and Python CLIs for seminar rooms and ordinary seats. The GUI lets a user save account, participant, schedule, and room-priority settings; discover today’s rooms; then reserve immediately or wait for a trigger time. The seminar workflow also covers room availability and reservation constraints, while the unified CLI supports seat selection and booking. The graph includes documented capabilities whose exact internal wiring was not sampled, but omits uncertain links; the GUI service and some CLI internals are only partially evidenced.

Main entry points: [`python/libspace_cli/commands.py`](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/commands.py) (CLI commands), [`python/libspace_cli/context.py`](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/context.py) (Command context), [`python/libspace_cli/api.py`](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/api.py) (Library API client), [`python/libspace_cli/seminar_desktop/app.py`](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_desktop/app.py) (Desktop app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_seminar_gui["Seminar GUI"]
  node_gui_app["Desktop app<br/>[app.py]"]
  node_gui_views["GUI views<br/>[views.py]"]
  node_gui_controller["GUI controller<br/>[controller.py]"]
  node_gui_service["GUI service<br/>[service.py]"]
end

subgraph group_seminar_booking["Seminar Booking"]
  node_seminar_entry["Seminar tool"]
  node_seminar_logic["Room rules<br/>[seminar_service.py]"]
end

subgraph group_seat_cli["Seat CLI"]
  node_unified_cli["Unified CLI<br/>[cli.py]"]
  node_commands["CLI commands<br/>[commands.py]"]
  node_reserve_service["Seat reservation<br/>[reserve_service.py]"]
  node_seat_selection["Seat selection<br/>[seat_selection.py]"]
  node_member_seat["Member lookup<br/>[member_seat.py]"]
end

subgraph group_shared_runtime["Shared Runtime"]
  node_library_api["Library API client<br/>[api.py]"]
  node_cas_login["CAS login<br/>[authserver.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_runtime_paths["Runtime paths<br/>[runtime_paths.py]"]
  node_state[("Session state<br/>[state.py]")]
  node_context["Command context<br/>[context.py]"]
  node_crypto["Reservation crypto<br/>[crypto.py]"]
end

node_user(("Library user"))
node_library{{"Library booking service"}}

node_user -->|"uses"| node_gui_app
node_gui_app -->|"creates views"| node_gui_views
node_gui_app -->|"dispatches actions"| node_gui_controller
node_gui_controller -->|"runs tasks"| node_gui_service
node_gui_service -->|"runs tool"| node_seminar_entry
node_user -->|"invokes"| node_unified_cli
node_unified_cli -->|"dispatches"| node_commands
node_commands -->|"creates context"| node_context
node_context -->|"loads settings"| node_config
node_context -->|"resolves paths"| node_runtime_paths
node_context -->|"loads and saves"| node_state
node_context -->|"creates client"| node_library_api
node_commands -->|"runs booking"| node_reserve_service
node_reserve_service -->|"selects seat"| node_seat_selection
node_reserve_service -->|"queries and confirms"| node_library_api
node_commands -->|"resolves members"| node_member_seat
node_seminar_entry -->|"queries and books"| node_library_api
node_seminar_entry -->|"uses room rules"| node_seminar_logic
node_library_api -->|"sends requests"| node_library
node_library_api -->|"authenticates"| node_cas_login
node_cas_login -->|"requests login"| node_library
node_commands -->|"encrypts requests"| node_crypto

click node_gui_app "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_desktop/app.py"
click node_gui_views "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_desktop/views.py"
click node_gui_controller "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_desktop/controller.py"
click node_gui_service "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_desktop/service.py"
click node_seminar_entry "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_standalone.py"
click node_seminar_logic "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_service.py"
click node_library_api "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/api.py"
click node_cas_login "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/authserver.py"
click node_config "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/config.py"
click node_runtime_paths "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/runtime_paths.py"
click node_state "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/state.py"
click node_unified_cli "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/cli.py"
click node_commands "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/commands.py"
click node_context "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/context.py"
click node_reserve_service "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/reserve_service.py"
click node_seat_selection "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seat_selection.py"
click node_member_seat "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/member_seat.py"
click node_crypto "https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/crypto.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_gui_app,node_gui_views,node_gui_controller,node_gui_service,node_user toneBlue
class node_seminar_entry,node_seminar_logic toneAmber
class node_unified_cli,node_commands,node_reserve_service,node_seat_selection,node_member_seat toneMint
class node_library_api,node_cas_login,node_config,node_runtime_paths,node_state,node_context,node_crypto toneRose
class node_library toneIndigo
```

## Components

### Seminar GUI

- [Desktop app](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_desktop/app.py): `python/libspace_cli/seminar_desktop/app.py`
- [GUI views](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_desktop/views.py): `python/libspace_cli/seminar_desktop/views.py`
- [GUI controller](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_desktop/controller.py): `python/libspace_cli/seminar_desktop/controller.py`
- [GUI service](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_desktop/service.py): `python/libspace_cli/seminar_desktop/service.py`

### Seminar Booking

- [Seminar tool](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_standalone.py): `python/libspace_cli/seminar_standalone.py`
- [Room rules](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seminar_service.py): `python/libspace_cli/seminar_service.py`

### Seat CLI

- [Unified CLI](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/cli.py): `python/libspace_cli/cli.py`
- [CLI commands](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/commands.py): `python/libspace_cli/commands.py`
- [Seat reservation](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/reserve_service.py): `python/libspace_cli/reserve_service.py`
- [Seat selection](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/seat_selection.py): `python/libspace_cli/seat_selection.py`
- [Member lookup](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/member_seat.py): `python/libspace_cli/member_seat.py`

### Shared Runtime

- [Library API client](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/api.py): `python/libspace_cli/api.py`
- [CAS login](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/authserver.py): `python/libspace_cli/authserver.py`
- [Configuration](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/config.py): `python/libspace_cli/config.py`
- [Runtime paths](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/runtime_paths.py): `python/libspace_cli/runtime_paths.py`
- [Session state](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/state.py): `python/libspace_cli/state.py`
- [Command context](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/context.py): `python/libspace_cli/context.py`
- [Reservation crypto](https://github.com/yangzhang0215/xauat-autolib/blob/main/python/libspace_cli/crypto.py): `python/libspace_cli/crypto.py`

### Other components

- **Library user**
- **Library booking service**

## Connections

- Library user → Desktop app: uses
- Desktop app → GUI views: creates views
- Desktop app → GUI controller: dispatches actions
- GUI controller → GUI service: runs tasks
- GUI service → Seminar tool: runs tool
- Library user → Unified CLI: invokes
- Unified CLI → CLI commands: dispatches
- CLI commands → Command context: creates context
- Command context → Configuration: loads settings
- Command context → Runtime paths: resolves paths
- Command context → Session state: loads and saves
- Command context → Library API client: creates client
- CLI commands → Seat reservation: runs booking
- Seat reservation → Seat selection: selects seat
- Seat reservation → Library API client: queries and confirms
- CLI commands → Member lookup: resolves members
- Seminar tool → Library API client: queries and books
- Seminar tool → Room rules: uses room rules
- Library API client → Library booking service: sends requests
- Library API client → CAS login: authenticates
- CAS login → Library booking service: requests login
- CLI commands → Reservation crypto: encrypts requests
