# wedeach/chrline-patch architecture

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

- Interactive diagram: https://gitdiagram.com/wedeach/chrline-patch
- Repository: https://github.com/wedeach/chrline-patch

## Overview

CHRLINE is a Python LINE debugging/API client, intended to inspect LINE protocol behavior rather than run production bots. Users initialize a client with login or token details, then call account, messaging, Square, and BIZ/timeline operations; the library encodes requests, communicates with LINE, and decodes responses. Separate runtime branches provide persistent push connections and E2EE, while thrift and DummyProtocol support protocol inspection and compatibility work. The map follows documented capabilities and visible imports; unsampled service implementations are represented by their existing directories, and uncertain runtime links are omitted or dashed.

Main entry points: [`CHRLINE/client.py`](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/client.py) (CHRLINE client), [`CHRLINE/BIZ/manager.py`](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/BIZ/manager.py) (BIZ manager), [`CHRLINE/dyher/connManager.py`](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/dyher/connManager.py) (Push connection manager), [`CHRLINE/services`](https://github.com/wedeach/chrline-patch/tree/master/CHRLINE/services) (Service methods)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client and transport"]
  node_client_core["CHRLINE client<br/>[client.py]"]
  node_api["API methods<br/>[api.py]"]
  node_config["Device configuration<br/>[config.py]"]
  node_push_manager["Push connection manager<br/>[connManager.py]"]
  node_push_connection["Push connection<br/>[conn.py]"]
  node_connection_data["Push connection data<br/>[connData.py]"]
end

subgraph group_protocol["Protocol and security"]
  node_thrift_types["Thrift data types<br/>[ttypes.py]"]
  node_thrift_codec["Thrift codec<br/>[thrift.py]"]
  node_dummy_protocol["Dummy thrift inspection<br/>[DummyProtocol.py]"]
  node_e2ee["E2EE support<br/>[e2ee.py]"]
  node_helpers["Protocol helpers<br/>[base.py]"]
  node_system_helpers["System helpers<br/>[sys.py]"]
  node_models["Client models<br/>[models.py]"]
  node_objects["Thrift objects<br/>[object.py]"]
end

subgraph group_line_services["LINE service domains"]
  node_service_methods["Service methods"]
  node_base_service["Service request sender<br/>[BaseService.py]"]
  node_auth_service["Authentication services<br/>[AuthService.py]"]
  node_thrift_services["Thrift service clients"]
end

subgraph group_biz["BIZ and timeline"]
  node_biz_manager["BIZ manager<br/>[manager.py]"]
  node_biz_base["BIZ request layer<br/>[base.py]"]
  node_timeline["Timeline services<br/>[TL.py]"]
  node_timeline_gateway["Timeline gateway<br/>[TLGW.py]"]
  node_timeline_biz["Timeline BIZ<br/>[ST.py]"]
  node_biz_domains["Other BIZ domains"]
  node_biz_timeline_helpers["Timeline internals"]
end

node_user(("Library caller"))
node_line{{"LINE services"}}

node_user -->|"initializes"| node_client_core
node_client_core -->|"inherits API"| node_api
node_client_core -->|"initializes"| node_config
node_client_core -->|"creates"| node_biz_manager
node_client_core -->|"initializes"| node_e2ee
node_client_core -->|"initializes"| node_models
node_client_core -->|"initializes"| node_objects
node_client_core -->|"uses"| node_push_manager
node_push_manager -->|"opens"| node_push_connection
node_push_manager -->|"uses"| node_connection_data
node_push_manager -->|"dispatches"| node_service_methods
node_client_core -.->|"exposes"| node_service_methods
node_service_methods -->|"sends requests"| node_base_service
node_base_service -->|"uses client"| node_client_core
node_auth_service -->|"sends requests"| node_base_service
node_thrift_services -->|"uses types"| node_thrift_types
node_thrift_codec -->|"uses serializer"| node_dummy_protocol
node_client_core -->|"initializes"| node_thrift_codec
node_client_core -->|"includes helpers"| node_helpers
node_helpers -->|"includes"| node_system_helpers
node_biz_manager -->|"builds services"| node_biz_base
node_biz_manager -->|"creates"| node_timeline
node_biz_manager -->|"creates"| node_timeline_gateway
node_biz_manager -->|"creates services"| node_biz_timeline_helpers
node_biz_manager -->|"creates services"| node_biz_domains
node_timeline -->|"uses"| node_biz_timeline_helpers
node_timeline_gateway -->|"uses typed posts"| node_biz_timeline_helpers
node_biz_base -->|"uses client"| node_client_core
node_client_core -.->|"sends API traffic"| node_line
node_user -.->|"inspects fields"| node_dummy_protocol

click node_client_core "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/client.py"
click node_api "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/api.py"
click node_config "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/config.py"
click node_push_manager "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/dyher/connManager.py"
click node_push_connection "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/dyher/conn.py"
click node_connection_data "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/dyher/connData.py"
click node_service_methods "https://github.com/wedeach/chrline-patch/tree/master/CHRLINE/services"
click node_base_service "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/services/BaseService.py"
click node_auth_service "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/services/AuthService.py"
click node_thrift_services "https://github.com/wedeach/chrline-patch/tree/master/CHRLINE/services/thrift"
click node_thrift_types "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/services/thrift/ttypes.py"
click node_thrift_codec "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/thrift.py"
click node_dummy_protocol "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/serializers/DummyProtocol.py"
click node_e2ee "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/e2ee.py"
click node_helpers "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/helpers/base.py"
click node_system_helpers "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/helpers/sys.py"
click node_models "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/models.py"
click node_objects "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/object.py"
click node_biz_manager "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/BIZ/manager.py"
click node_biz_base "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/BIZ/base.py"
click node_timeline "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/BIZ/services/TL.py"
click node_timeline_gateway "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/BIZ/services/TLGW.py"
click node_timeline_biz "https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/BIZ/TL/ST.py"
click node_biz_domains "https://github.com/wedeach/chrline-patch/tree/master/CHRLINE/BIZ/services"
click node_biz_timeline_helpers "https://github.com/wedeach/chrline-patch/tree/master/CHRLINE/BIZ/services/internal"

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_client_core,node_api,node_config,node_push_manager,node_push_connection,node_connection_data toneBlue
class node_thrift_types,node_thrift_codec,node_dummy_protocol,node_e2ee,node_helpers,node_system_helpers,node_models,node_objects toneAmber
class node_service_methods,node_base_service,node_auth_service,node_thrift_services toneMint
class node_biz_manager,node_biz_base,node_timeline,node_timeline_gateway,node_timeline_biz,node_biz_domains,node_biz_timeline_helpers toneRose
class node_user,node_line toneIndigo
```

## Components

### Client and transport

- [CHRLINE client](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/client.py): `CHRLINE/client.py`
- [API methods](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/api.py): `CHRLINE/api.py`
- [Device configuration](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/config.py): `CHRLINE/config.py`
- [Push connection manager](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/dyher/connManager.py): `CHRLINE/dyher/connManager.py`
- [Push connection](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/dyher/conn.py): `CHRLINE/dyher/conn.py`
- [Push connection data](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/dyher/connData.py): `CHRLINE/dyher/connData.py`

### Protocol and security

- [Thrift data types](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/services/thrift/ttypes.py): `CHRLINE/services/thrift/ttypes.py`
- [Thrift codec](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/thrift.py): `CHRLINE/thrift.py`
- [Dummy thrift inspection](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/serializers/DummyProtocol.py): `CHRLINE/serializers/DummyProtocol.py`
- [E2EE support](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/e2ee.py): `CHRLINE/e2ee.py`
- [Protocol helpers](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/helpers/base.py): `CHRLINE/helpers/base.py`
- [System helpers](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/helpers/sys.py): `CHRLINE/helpers/sys.py`
- [Client models](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/models.py): `CHRLINE/models.py`
- [Thrift objects](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/object.py): `CHRLINE/object.py`

### LINE service domains

- [Service methods](https://github.com/wedeach/chrline-patch/tree/master/CHRLINE/services): `CHRLINE/services`
- [Service request sender](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/services/BaseService.py): `CHRLINE/services/BaseService.py`
- [Authentication services](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/services/AuthService.py): `CHRLINE/services/AuthService.py`
- [Thrift service clients](https://github.com/wedeach/chrline-patch/tree/master/CHRLINE/services/thrift): `CHRLINE/services/thrift`

### BIZ and timeline

- [BIZ manager](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/BIZ/manager.py): `CHRLINE/BIZ/manager.py`
- [BIZ request layer](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/BIZ/base.py): `CHRLINE/BIZ/base.py`
- [Timeline services](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/BIZ/services/TL.py): `CHRLINE/BIZ/services/TL.py`
- [Timeline gateway](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/BIZ/services/TLGW.py): `CHRLINE/BIZ/services/TLGW.py`
- [Timeline BIZ](https://github.com/wedeach/chrline-patch/blob/master/CHRLINE/BIZ/TL/ST.py): `CHRLINE/BIZ/TL/ST.py`
- [Other BIZ domains](https://github.com/wedeach/chrline-patch/tree/master/CHRLINE/BIZ/services): `CHRLINE/BIZ/services`
- [Timeline internals](https://github.com/wedeach/chrline-patch/tree/master/CHRLINE/BIZ/services/internal): `CHRLINE/BIZ/services/internal`

### Other components

- **Library caller**
- **LINE services**

## Connections

- Library caller → CHRLINE client: initializes (evidence: `CHRLINE/client.py`)
- CHRLINE client → API methods: inherits API (evidence: `CHRLINE/client.py`)
- CHRLINE client → Device configuration: initializes (evidence: `CHRLINE/client.py`)
- CHRLINE client → BIZ manager: creates (evidence: `CHRLINE/client.py`)
- CHRLINE client → E2EE support: initializes (evidence: `CHRLINE/client.py`)
- CHRLINE client → Client models: initializes (evidence: `CHRLINE/client.py`)
- CHRLINE client → Thrift objects: initializes (evidence: `CHRLINE/client.py`)
- CHRLINE client → Push connection manager: uses (evidence: `CHRLINE/dyher/connManager.py`)
- Push connection manager → Push connection: opens (evidence: `CHRLINE/dyher/connManager.py`)
- Push connection manager → Push connection data: uses (evidence: `CHRLINE/dyher/connManager.py`)
- Push connection manager → Service methods: dispatches (evidence: `CHRLINE/dyher/connManager.py`)
- CHRLINE client → Service methods: exposes (evidence: `CHRLINE/services/BaseService.py`)
- Service methods → Service request sender: sends requests (evidence: `CHRLINE/services/AuthService.py`)
- Service request sender → CHRLINE client: uses client (evidence: `CHRLINE/services/BaseService.py`)
- Authentication services → Service request sender: sends requests (evidence: `CHRLINE/services/AuthService.py`)
- Thrift service clients → Thrift data types: uses types (evidence: `CHRLINE/services/thrift/SquareService.py`)
- Thrift codec → Dummy thrift inspection: uses serializer (evidence: `CHRLINE/thrift.py`)
- CHRLINE client → Thrift codec: initializes (evidence: `CHRLINE/client.py`)
- CHRLINE client → Protocol helpers: includes helpers
- Protocol helpers → System helpers: includes (evidence: `CHRLINE/helpers/sys.py`)
- BIZ manager → BIZ request layer: builds services (evidence: `CHRLINE/BIZ/manager.py`)
- BIZ manager → Timeline services: creates (evidence: `CHRLINE/BIZ/manager.py`)
- BIZ manager → Timeline gateway: creates (evidence: `CHRLINE/BIZ/manager.py`)
- BIZ manager → Timeline internals: creates services (evidence: `CHRLINE/BIZ/manager.py`)
- BIZ manager → Other BIZ domains: creates services (evidence: `CHRLINE/BIZ/manager.py`)
- Timeline services → Timeline internals: uses (evidence: `CHRLINE/BIZ/services/TL.py`)
- Timeline gateway → Timeline internals: uses typed posts (evidence: `CHRLINE/BIZ/services/TLGW.py`)
- BIZ request layer → CHRLINE client: uses client (evidence: `CHRLINE/BIZ/base.py`)
- CHRLINE client → LINE services: sends API traffic
- Library caller → Dummy thrift inspection: inspects fields
