# leebro7/sycc architecture

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

- Interactive diagram: https://gitdiagram.com/leebro7/sycc
- Repository: https://github.com/leebro7/sycc

## Overview

sycc is an interactive terminal calculator for circles, rings, cylinders, and spheres. A user starts the CLI or calls `main()`, chooses a shape, enters dimensions and a π option, and receives formatted measurements or returns to the mode menu. Startup handles platform-specific display setup; bundled tqdm and colorama code supplies progress and terminal-color support. The graph follows the documented modes and indexed module references; unsampled internals and uncertain runtime links are not expanded.

Main entry points: [`core.py`](https://github.com/leebro7/sycc/blob/main/core.py) (CLI entry), [`p/tqdm/std.py`](https://github.com/leebro7/sycc/blob/main/p/tqdm/std.py) (Progress core), [`p/beginnings.py`](https://github.com/leebro7/sycc/blob/main/p/beginnings.py) (Startup helpers), [`colorama/ansitowin32.py`](https://github.com/leebro7/sycc/blob/main/colorama/ansitowin32.py) (ANSI conversion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Calculator application"]
  node_cli["CLI entry<br/>[core.py]"]
  node_circle["Circle mode<br/>[y.py]"]
  node_cylinder["Cylinder mode<br/>[yz.py]"]
  node_ring["Ring mode<br/>[yh.py]"]
  node_sphere["Sphere mode<br/>[qt.py]"]
  node_startup["Startup helpers<br/>[beginnings.py]"]
end

subgraph group_terminal["Terminal support"]
  node_platform["Platform setup<br/>[pdsys.py]"]
  node_ansi["ANSI conversion<br/>[ansitowin32.py]"]
  node_winterm["Windows terminal<br/>[winterm.py]"]
  node_winapi["Windows API<br/>[win32.py]"]
end

subgraph group_progress["Progress utilities"]
  node_tqdm_std["Progress core<br/>[std.py]"]
  node_tqdm_utils["Progress helpers<br/>[utils.py]"]
  node_monitor["Monitor thread<br/>[_monitor.py]"]
end

subgraph group_tqdm_ext["Progress adapters"]
  node_auto["Auto selector<br/>[auto.py]"]
  node_async["Async progress<br/>[asyncio.py]"]
  node_logging["Logging adapter<br/>[logging.py]"]
  node_worker["Task worker<br/>[utils_worker.py]"]
end

node_user(("User"))

node_user -->|"starts"| node_cli
node_cli -->|"dispatches"| node_circle
node_cli -->|"dispatches"| node_cylinder
node_cli -->|"dispatches"| node_ring
node_cli -->|"dispatches"| node_sphere
node_cli -->|"calls"| node_startup
node_startup -->|"uses progress"| node_worker
node_startup -->|"uses setup"| node_platform
node_platform -->|"initializes colors"| node_ansi
node_ansi -->|"converts sequences"| node_winterm
node_ansi -->|"checks API"| node_winapi
node_tqdm_std -->|"starts monitor"| node_monitor
node_tqdm_std -->|"uses helpers"| node_tqdm_utils
node_auto -->|"selects base"| node_tqdm_std
node_auto -->|"selects async"| node_async
node_logging -->|"wraps progress"| node_tqdm_std
node_worker -->|"reports errors"| node_auto

click node_cli "https://github.com/leebro7/sycc/blob/main/core.py"
click node_circle "https://github.com/leebro7/sycc/blob/main/p/y.py"
click node_cylinder "https://github.com/leebro7/sycc/blob/main/p/yz.py"
click node_ring "https://github.com/leebro7/sycc/blob/main/p/yh.py"
click node_sphere "https://github.com/leebro7/sycc/blob/main/p/qt.py"
click node_startup "https://github.com/leebro7/sycc/blob/main/p/beginnings.py"
click node_platform "https://github.com/leebro7/sycc/blob/main/p/pdsys.py"
click node_ansi "https://github.com/leebro7/sycc/blob/main/colorama/ansitowin32.py"
click node_winterm "https://github.com/leebro7/sycc/blob/main/colorama/winterm.py"
click node_winapi "https://github.com/leebro7/sycc/blob/main/colorama/win32.py"
click node_tqdm_std "https://github.com/leebro7/sycc/blob/main/p/tqdm/std.py"
click node_tqdm_utils "https://github.com/leebro7/sycc/blob/main/p/tqdm/utils.py"
click node_monitor "https://github.com/leebro7/sycc/blob/main/p/tqdm/_monitor.py"
click node_auto "https://github.com/leebro7/sycc/blob/main/p/tqdm/auto.py"
click node_async "https://github.com/leebro7/sycc/blob/main/p/tqdm/asyncio.py"
click node_logging "https://github.com/leebro7/sycc/blob/main/p/tqdm/contrib/logging.py"
click node_worker "https://github.com/leebro7/sycc/blob/main/p/tqdm/contrib/utils_worker.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_cli,node_circle,node_cylinder,node_ring,node_sphere,node_startup,node_user toneBlue
class node_platform,node_ansi,node_winterm,node_winapi toneAmber
class node_tqdm_std,node_tqdm_utils,node_monitor toneMint
class node_auto,node_async,node_logging,node_worker toneRose
```

## Components

### Calculator application

- [CLI entry](https://github.com/leebro7/sycc/blob/main/core.py): `core.py`
- [Circle mode](https://github.com/leebro7/sycc/blob/main/p/y.py): `p/y.py`
- [Cylinder mode](https://github.com/leebro7/sycc/blob/main/p/yz.py): `p/yz.py`
- [Ring mode](https://github.com/leebro7/sycc/blob/main/p/yh.py): `p/yh.py`
- [Sphere mode](https://github.com/leebro7/sycc/blob/main/p/qt.py): `p/qt.py`
- [Startup helpers](https://github.com/leebro7/sycc/blob/main/p/beginnings.py): `p/beginnings.py`

### Terminal support

- [Platform setup](https://github.com/leebro7/sycc/blob/main/p/pdsys.py): `p/pdsys.py`
- [ANSI conversion](https://github.com/leebro7/sycc/blob/main/colorama/ansitowin32.py): `colorama/ansitowin32.py`
- [Windows terminal](https://github.com/leebro7/sycc/blob/main/colorama/winterm.py): `colorama/winterm.py`
- [Windows API](https://github.com/leebro7/sycc/blob/main/colorama/win32.py): `colorama/win32.py`

### Progress utilities

- [Progress core](https://github.com/leebro7/sycc/blob/main/p/tqdm/std.py): `p/tqdm/std.py`
- [Progress helpers](https://github.com/leebro7/sycc/blob/main/p/tqdm/utils.py): `p/tqdm/utils.py`
- [Monitor thread](https://github.com/leebro7/sycc/blob/main/p/tqdm/_monitor.py): `p/tqdm/_monitor.py`

### Progress adapters

- [Auto selector](https://github.com/leebro7/sycc/blob/main/p/tqdm/auto.py): `p/tqdm/auto.py`
- [Async progress](https://github.com/leebro7/sycc/blob/main/p/tqdm/asyncio.py): `p/tqdm/asyncio.py`
- [Logging adapter](https://github.com/leebro7/sycc/blob/main/p/tqdm/contrib/logging.py): `p/tqdm/contrib/logging.py`
- [Task worker](https://github.com/leebro7/sycc/blob/main/p/tqdm/contrib/utils_worker.py): `p/tqdm/contrib/utils_worker.py`

### Other components

- **User**

## Connections

- User → CLI entry: starts
- CLI entry → Circle mode: dispatches (evidence: `core.py`)
- CLI entry → Cylinder mode: dispatches (evidence: `core.py`)
- CLI entry → Ring mode: dispatches (evidence: `core.py`)
- CLI entry → Sphere mode: dispatches (evidence: `core.py`)
- CLI entry → Startup helpers: calls (evidence: `core.py`)
- Startup helpers → Task worker: uses progress (evidence: `p/beginnings.py`)
- Startup helpers → Platform setup: uses setup (evidence: `p/beginnings.py`)
- Platform setup → ANSI conversion: initializes colors (evidence: `p/pdsys.py`)
- ANSI conversion → Windows terminal: converts sequences (evidence: `colorama/ansitowin32.py`)
- ANSI conversion → Windows API: checks API (evidence: `colorama/ansitowin32.py`)
- Progress core → Monitor thread: starts monitor (evidence: `p/tqdm/std.py`)
- Progress core → Progress helpers: uses helpers (evidence: `p/tqdm/std.py`)
- Auto selector → Progress core: selects base (evidence: `p/tqdm/auto.py`)
- Auto selector → Async progress: selects async (evidence: `p/tqdm/auto.py`)
- Logging adapter → Progress core: wraps progress (evidence: `p/tqdm/contrib/logging.py`)
- Task worker → Auto selector: reports errors (evidence: `p/tqdm/contrib/utils_worker.py`)
