# delppine1024/tgreen architecture

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

- Interactive diagram: https://gitdiagram.com/delppine1024/tgreen
- Repository: https://github.com/delppine1024/tgreen

## Overview

This repository is a **binary release/distribution repo**, not a conventional source-code project. Its main job is to publish prebuilt artifacts for specific **Typora versions** and **OS/CPU combinations**.

The top-level layout is organized by **platform and architecture**: `Windows_x86`, `Windows_x64`, `Windows_Arm`, `Linux_x64`, `Linux_Arm`, plus an `ALL_IN_ONE` bundle. Each folder is effectively a standalone release payload.

Inside each platform folder, the primary runtime artifact is `app.asar`. In the Typora/Electron ecosystem, this is the packaged application bundle that gets copied into the installed app’s `resources` directory and replaces the original bundle.

Alongside `app.asar`, each platform folder contains a `dec_app` directory. This appears to be the **decomposed app bundle** used to regenerate or inspect the final archive. Its contents are consistent across platforms: `atom.js`, `head.json`, `main.node`, and `package.json`.

`atom.js` is the JavaScript entry/bootstrap layer, `main.node` is a native Node addon/binary, `head.json` is package metadata, and `package.json` defines the module/package boundary for that extracted app structure. The presence of `main.node` means some platform variants depend on native code and therefore are architecture-specific.

The repository’s effective data flow is:
1. a platform/version-specific `dec_app` payload exists,
2. it is packaged into `app.asar`,
3. the final `app.asar` is distributed as a release artifact,
4. users replace Typora’s installed `resources/app.asar` with that artifact.

The README makes clear that **different Typora versions require different payloads**, and the support matrix is a core architectural artifact. Versioning is not cosmetic here; it determines binary compatibility.

The `ALL_IN_ONE` directory is a convenience distribution that aggregates support for multiple versions/platforms into a single release package. It represents a packaging boundary, not a separate runtime subsystem.

There is no visible build source, CI pipeline, or application server in this repo. The “architecture” is therefore centered on **release packaging, binary compatibility, and platform segmentation**, not on service composition or runtime modules.

The documentation files (`README.md`, `README-CN.md`, `README-TW.md`, and platform-specific readmes) are operationally important because they define how the artifacts are deployed and which combinations are valid, but they do not add runtime components.

For an architecture diagram, the most important boxes are:
- **GitHub Releases / repo storage** as the distribution source
- **Platform-specific artifact bundles** as the main product units
- **`dec_app` extracted payload** as the internal package structure
- **Typora installation directory** as the target boundary where `app.asar` is replaced

Overall, this repo is best modeled as a **multi-platform binary packaging repository for Typora-compatible release artifacts**, with versioned release assets as the central organizing principle.

Main entry points: [`ALL_IN_ONE/dec_app`](https://github.com/delppine1024/tgreen/tree/master/ALL_IN_ONE/dec_app) (dec_app), [`ALL_IN_ONE/app.asar`](https://github.com/delppine1024/tgreen/blob/master/ALL_IN_ONE/app.asar) (app.asar), [`Windows_x64`](https://github.com/delppine1024/tgreen/tree/master/Windows_x64) (Windows x64), [`ALL_IN_ONE`](https://github.com/delppine1024/tgreen/tree/master/ALL_IN_ONE) (All in one)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bundles["Release bundles"]
  node_all_in_one["All in one<br/>bundle"]
  node_win_x86["Windows x86<br/>bundle"]
  node_win_x64["Windows x64<br/>bundle"]
  node_win_arm["Windows Arm<br/>bundle"]
  node_linux_x64["Linux x64<br/>bundle"]
  node_linux_arm["Linux Arm<br/>bundle"]
  node_app_asar["app.asar<br/>runtime bundle<br/>[app.asar]"]
  node_dec_app["dec_app<br/>extracted app"]
  node_atom_js["atom.js<br/>bootstrap script<br/>[atom.js]"]
  node_head_json["head.json<br/>package metadata<br/>[head.json]"]
  node_main_node["main.node<br/>native addon<br/>[main.node]"]
  node_pkg_json["package.json<br/>module manifest<br/>[package.json]"]
end

subgraph group_docs["Documentation"]
  node_readme["README<br/>deployment guide<br/>[README.md]"]
  node_readme_cn["README CN<br/>deployment guide<br/>[README-CN.md]"]
  node_readme_tw["README TW<br/>deployment guide<br/>[README-TW.md]"]
  node_platform_readme["Platform guide<br/>[readme.md]"]
end

node_release_root["Release repo<br/>distribution source"]
node_typora_install["Typora install<br/>deployment target"]

node_release_root -->|"publishes"| node_all_in_one
node_release_root -->|"publishes"| node_win_x86
node_release_root -->|"publishes"| node_win_x64
node_release_root -->|"publishes"| node_win_arm
node_release_root -->|"publishes"| node_linux_x64
node_release_root -->|"publishes"| node_linux_arm
node_all_in_one -->|"contains"| node_app_asar
node_all_in_one -->|"contains"| node_dec_app
node_win_x86 -->|"contains"| node_app_asar
node_win_x86 -->|"contains"| node_dec_app
node_win_x64 -->|"contains"| node_app_asar
node_win_x64 -->|"contains"| node_dec_app
node_win_arm -->|"contains"| node_app_asar
node_win_arm -->|"contains"| node_dec_app
node_linux_x64 -->|"contains"| node_app_asar
node_linux_x64 -->|"contains"| node_dec_app
node_linux_arm -->|"contains"| node_app_asar
node_linux_arm -->|"contains"| node_dec_app
node_dec_app -->|"boots"| node_atom_js
node_dec_app -->|"describes"| node_head_json
node_dec_app -->|"loads"| node_main_node
node_dec_app -->|"declares"| node_pkg_json
node_dec_app -->|"packages"| node_app_asar
node_app_asar -->|"replaces"| node_typora_install
node_readme -.->|"documents"| node_release_root
node_readme_cn -.->|"documents"| node_release_root
node_readme_tw -.->|"documents"| node_release_root
node_platform_readme -.->|"documents"| node_win_x64

click node_all_in_one "https://github.com/delppine1024/tgreen/tree/master/ALL_IN_ONE"
click node_win_x86 "https://github.com/delppine1024/tgreen/tree/master/Windows_x86"
click node_win_x64 "https://github.com/delppine1024/tgreen/tree/master/Windows_x64"
click node_win_arm "https://github.com/delppine1024/tgreen/tree/master/Windows_Arm"
click node_linux_x64 "https://github.com/delppine1024/tgreen/tree/master/Linux_x64"
click node_linux_arm "https://github.com/delppine1024/tgreen/tree/master/Linux_Arm"
click node_app_asar "https://github.com/delppine1024/tgreen/blob/master/ALL_IN_ONE/app.asar"
click node_dec_app "https://github.com/delppine1024/tgreen/tree/master/ALL_IN_ONE/dec_app"
click node_atom_js "https://github.com/delppine1024/tgreen/blob/master/ALL_IN_ONE/dec_app/atom.js"
click node_head_json "https://github.com/delppine1024/tgreen/blob/master/ALL_IN_ONE/dec_app/head.json"
click node_main_node "https://github.com/delppine1024/tgreen/blob/master/ALL_IN_ONE/dec_app/main.node"
click node_pkg_json "https://github.com/delppine1024/tgreen/blob/master/ALL_IN_ONE/dec_app/package.json"
click node_readme "https://github.com/delppine1024/tgreen/blob/master/README.md"
click node_readme_cn "https://github.com/delppine1024/tgreen/blob/master/README-CN.md"
click node_readme_tw "https://github.com/delppine1024/tgreen/blob/master/README-TW.md"
click node_platform_readme "https://github.com/delppine1024/tgreen/blob/master/Windows_x64/readme.md"

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_all_in_one,node_win_x86,node_win_x64,node_win_arm,node_linux_x64,node_linux_arm,node_app_asar,node_dec_app,node_atom_js,node_head_json,node_main_node,node_pkg_json toneBlue
class node_readme,node_readme_cn,node_readme_tw,node_platform_readme toneAmber
class node_release_root,node_typora_install toneNeutral
```

## Components

### Release bundles

Platform/version-specific binary payloads published by the repository.

- [All in one](https://github.com/delppine1024/tgreen/tree/master/ALL_IN_ONE): bundle · Convenience bundle aggregating multiple supported variants. · `ALL_IN_ONE`
- [Windows x86](https://github.com/delppine1024/tgreen/tree/master/Windows_x86): bundle · Windows 32-bit release payload. · `Windows_x86`
- [Windows x64](https://github.com/delppine1024/tgreen/tree/master/Windows_x64): bundle · Windows 64-bit release payload. · `Windows_x64`
- [Windows Arm](https://github.com/delppine1024/tgreen/tree/master/Windows_Arm): bundle · Windows ARM release payload. · `Windows_Arm`
- [Linux x64](https://github.com/delppine1024/tgreen/tree/master/Linux_x64): bundle · Linux 64-bit release payload. · `Linux_x64`
- [Linux Arm](https://github.com/delppine1024/tgreen/tree/master/Linux_Arm): bundle · Linux ARM release payload. · `Linux_Arm`
- [app.asar](https://github.com/delppine1024/tgreen/blob/master/ALL_IN_ONE/app.asar): runtime bundle · Packaged Typora application archive distributed inside each release bundle. · `ALL_IN_ONE/app.asar`
- [dec_app](https://github.com/delppine1024/tgreen/tree/master/ALL_IN_ONE/dec_app): extracted app · Decomposed app payload used to rebuild or inspect the archive. · `ALL_IN_ONE/dec_app`
- [atom.js](https://github.com/delppine1024/tgreen/blob/master/ALL_IN_ONE/dec_app/atom.js): bootstrap script · JavaScript bootstrap and entry layer for the extracted app. · `ALL_IN_ONE/dec_app/atom.js`
- [head.json](https://github.com/delppine1024/tgreen/blob/master/ALL_IN_ONE/dec_app/head.json): package metadata · Metadata describing the extracted app package boundary. · `ALL_IN_ONE/dec_app/head.json`
- [main.node](https://github.com/delppine1024/tgreen/blob/master/ALL_IN_ONE/dec_app/main.node): native addon · Platform-specific native binary used by the app payload. · `ALL_IN_ONE/dec_app/main.node`
- [package.json](https://github.com/delppine1024/tgreen/blob/master/ALL_IN_ONE/dec_app/package.json): module manifest · Manifest defining the module/package shape of the extracted app. · `ALL_IN_ONE/dec_app/package.json`

### Documentation

Readmes that describe support matrix and deployment steps.

- [README](https://github.com/delppine1024/tgreen/blob/master/README.md): deployment guide · Primary usage and compatibility documentation. · `README.md`
- [README CN](https://github.com/delppine1024/tgreen/blob/master/README-CN.md): deployment guide · Chinese deployment and compatibility documentation. · `README-CN.md`
- [README TW](https://github.com/delppine1024/tgreen/blob/master/README-TW.md): deployment guide · Traditional Chinese deployment and compatibility documentation. · `README-TW.md`
- [Platform guide](https://github.com/delppine1024/tgreen/blob/master/Windows_x64/readme.md): platform guide · Per-platform release instructions and notes. · `Windows_x64/readme.md`

### Other components

- **Release repo**: distribution source · Repository as the source of distributable Typora replacement artifacts.
- **Typora install**: deployment target · Installed Typora resources directory where app.asar is replaced.

## Connections

- Release repo → All in one: publishes · Repository ships the aggregated distribution bundle.
- Release repo → Windows x86: publishes · Repository ships the Windows x86 bundle.
- Release repo → Windows x64: publishes · Repository ships the Windows x64 bundle.
- Release repo → Windows Arm: publishes · Repository ships the Windows ARM bundle.
- Release repo → Linux x64: publishes · Repository ships the Linux x64 bundle.
- Release repo → Linux Arm: publishes · Repository ships the Linux ARM bundle.
- All in one → app.asar: contains · Bundle includes the packaged application archive.
- All in one → dec_app: contains · Bundle includes the extracted app payload.
- Windows x86 → app.asar: contains · Platform bundle includes the packaged application archive.
- Windows x86 → dec_app: contains · Platform bundle includes the extracted app payload.
- Windows x64 → app.asar: contains · Platform bundle includes the packaged application archive.
- Windows x64 → dec_app: contains · Platform bundle includes the extracted app payload.
- Windows Arm → app.asar: contains · Platform bundle includes the packaged application archive.
- Windows Arm → dec_app: contains · Platform bundle includes the extracted app payload.
- Linux x64 → app.asar: contains · Platform bundle includes the packaged application archive.
- Linux x64 → dec_app: contains · Platform bundle includes the extracted app payload.
- Linux Arm → app.asar: contains · Platform bundle includes the packaged application archive.
- Linux Arm → dec_app: contains · Platform bundle includes the extracted app payload.
- dec_app → atom.js: boots · JavaScript bootstrap starts the extracted app.
- dec_app → head.json: describes · Package metadata defines the extracted app boundary.
- dec_app → main.node: loads · Native addon is part of the runtime payload.
- dec_app → package.json: declares · Manifest defines the extracted module/package shape.
- dec_app → app.asar: packages · Extracted payload is assembled into the final archive.
- app.asar → Typora install: replaces · Distributed archive is copied into Typora's resources directory.
- README → Release repo: documents · Primary README explains compatibility and deployment.
- README CN → Release repo: documents · Chinese README explains compatibility and deployment.
- README TW → Release repo: documents · Traditional Chinese README explains compatibility and deployment.
- Platform guide → Windows x64: documents · Platform readme captures release-specific instructions.
