Introducing a new way to review your PRs.

Read the announcement

lencx / chatgpt

❄️ ChatGPT Desktop Application (Mac, Windows and Linux)

View on GitHub

10 documents · Updated Nov 16, 2026

overview

Knowledge Base updated: 2026-11-16

Knowledge Base Index

Orientation

This repository is a Tauri desktop wrapper for ChatGPT, with a React/Vite frontend driving the user-facing views and a Rust/Tauri backend providing native commands, configuration, windows, setup, and packaging.

Main parts:

  • src/ — React frontend shell, views, hooks, styling, and window chrome.
  • src-tauri/ — Rust/Tauri desktop runtime, native commands, setup, config, templates, and window management.
  • src-tauri/scripts/ and docs/static/ — browser-side assets used by the Ask/chat experience.
  • root build/config files — Vite, TypeScript, Tailwind/PostCSS, npm/pnpm, and Rust workspace/package configuration.

Critical state primarily lives in local native configuration managed by the Tauri backend; the frontend reads and updates app behavior through Tauri commands and hooks rather than a database or remote service owned by this repo.

Architecture diagrams

flowchart LR
  subgraph Frontend[src]
    Main[src/main.tsx]
    App[src/App.tsx]
    Ask[src/view/Ask.tsx]
    Settings[src/view/Settings.tsx]
    Chrome[Titlebar + WinTitlebar]
    Hooks[useInfo + useTheme]
  end

  subgraph Native[src-tauri]
    TauriMain[src-tauri/src/main.rs]
    Setup[core/setup.rs]
    Commands[core/cmd.rs]
    Config[core/conf.rs]
    Templates[core/template.rs]
    Windows[core/window.rs]
  end

  subgraph Assets[assets/config]
    Scripts[src-tauri/scripts/ask.js]
    Static[docs/static]
    TauriConf[tauri.conf.json + capabilities]
  end

  Main --> App
  App --> Ask
  App --> Settings
  App --> Chrome
  Settings --> Hooks
  Ask --> Scripts
  Ask --> Static
  App --> Commands
  Chrome --> Windows
  TauriMain --> Setup
  Setup --> Commands
  Commands --> Config
  Commands --> Templates
  Commands --> Windows
  TauriMain --> TauriConf
sequenceDiagram
  participant User
  participant React as React views
  participant Tauri as Tauri command layer
  participant Config as Native config/template/window modules

  User->>React: interact with Ask, Settings, or titlebar
  React->>Tauri: invoke native command or use hook
  Tauri->>Config: read/write config, templates, or windows
  Config-->>Tauri: native result
  Tauri-->>React: response/event result
  React-->>User: update UI

Glossary

  • Ask view — the ChatGPT interaction surface implemented by src/…/Ask.tsx and related injected/static assets.
  • Template system — Rust-side content/template handling in src-tauri/…/template.rs.
  • Window chrome — custom frontend titlebar controls plus native window helpers.

Codebase-wide invariants

Routing table