# liusheng22/export-wechat-emoji architecture

> Architecture diagram of the GitHub repository liusheng22/export-wechat-emoji, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/liusheng22/export-wechat-emoji
- Repository: https://github.com/liusheng22/export-wechat-emoji

## Overview

##### Project Type Analysis
This is a desktop application built with Tauri, combining Rust (backend) and TypeScript/React (frontend). It's designed specifically for macOS to export WeChat emoji files for use in other messaging platforms.

##### Main Components

A. Frontend Layer (React/TypeScript):
- Sub-components:
- UI Components (App.tsx)
- Utilities (timer.ts, url.ts)
- Constants (text.ts)

B. Tauri Bridge Layer:
- Bi-directional communication

C. Backend Layer (Rust):
- Main.rs as the core backend component
- File system interaction capabilities

D. External Systems:
- WeChat Local Storage
- File System (for emoji export)

**[User Interface Layer]**
- ↕
**[Tauri Bridge]**
- ↕
**[Rust Backend]**
- ↕
**[File System]**
- ↙  ↘
**[WeChat Storage] [Export Directory]**

##### Important Elements to Highlight
- File system permissions flow
- Data flow from WeChat storage to export directory
- Error handling paths
- User interaction points

##### Technical Details
- Vite build process
- TypeScript compilation
- Tauri configuration
- File system access points

This system design should help developers understand both the technical architecture and the user-facing functionality of the application, while highlighting the security and permission aspects that are crucial for a file system-accessing desktop application.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        UI[App Component]:::frontend
        Utils[Utilities]:::frontend
        Constants[Constants]:::frontend
        Entry[Entry Point]:::frontend
        Styles[Styling]:::frontend
        
        Entry --> UI
        UI --> Utils
        UI --> Constants
        UI --> Styles
    end

    subgraph Bridge
        TC[Tauri Config]:::bridge
        TB[Tauri Bridge]:::bridge
    end

    subgraph Backend
        Main[Rust Backend]:::backend
        Icons[App Icons]:::backend
    end

    subgraph Build
        Vite[Vite Config]:::build
        TS[TypeScript Config]:::build
        Pkg[Package Config]:::build
        GH[Release Workflow]:::build
    end

    subgraph External
        WC[WeChat Storage]:::external
        FS[File System]:::external
        EX[Export Directory]:::external
    end

    UI --> TB
    TB --> Main
    Main --> FS
    FS --> WC
    FS --> EX
    TC --> TB
    Main --> Icons

    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef bridge fill:#e67e22,stroke:#d35400,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef build fill:#9b59b6,stroke:#8e44ad,color:white
    classDef external fill:#95a5a6,stroke:#7f8c8d,color:white

    click UI "https://github.com/liusheng22/export-wechat-emoji/blob/main/src/App.tsx"
    click Utils "https://github.com/liusheng22/export-wechat-emoji/tree/main/src/utils"
    click Constants "https://github.com/liusheng22/export-wechat-emoji/blob/main/src/consts/text.ts"
    click Entry "https://github.com/liusheng22/export-wechat-emoji/blob/main/src/main.tsx"
    click Styles "https://github.com/liusheng22/export-wechat-emoji/blob/main/src/App.css"
    click TC "https://github.com/liusheng22/export-wechat-emoji/blob/main/src-tauri/tauri.conf.json"
    click Main "https://github.com/liusheng22/export-wechat-emoji/blob/main/src-tauri/src/main.rs"
    click Icons "https://github.com/liusheng22/export-wechat-emoji/blob/main/src-tauri/icons/icon.icns"
    click Vite "https://github.com/liusheng22/export-wechat-emoji/blob/main/vite.config.ts"
    click TS "https://github.com/liusheng22/export-wechat-emoji/blob/main/tsconfig.json"
    click Pkg "https://github.com/liusheng22/export-wechat-emoji/blob/main/package.json"
    click GH "https://github.com/liusheng22/export-wechat-emoji/blob/main/.github/workflows/release.yml"
```
