# jackierayfield/chatgpt-app architecture

> Architecture diagram of the GitHub repository jackierayfield/chatgpt-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jackierayfield/chatgpt-app
- Repository: https://github.com/jackierayfield/chatgpt-app

## Overview

##### Project type and purpose
- This is a React Native mobile client built on Expo that embeds the ChatGPT web interface inside a WebView. Its sole responsibility is to improve the mobile UX of ChatGPT (drawer navigation, theming, status bar, keyboard handling, etc.) while delegating all chat logic and data storage to the ChatGPT web service.

##### File structure
- Top-level files:
- App.tsx – the single entry point where React Navigation, theming, and the WebView are initialized
- app.json, eas.json – Expo configuration (app ID, splash screen, build profiles)
- babel.config.js, tsconfig.json – build/transpile configuration for JS/TS
- package.json – dependencies (React Native, Expo, react-navigation, react-native-webview, etc.)
- No backend or server code, no database, no microservices—pure front-end.

##### README for additional insights
- Confirms features: transparent status bar, drawer swipe, bottom tab, theme switch, automatic keyboard handling, splash screen, capacity-workaround.
- No mention of custom backend or API keys—relies entirely on ChatGPT’s web interface inside a WebView.

##### Detail level reminder
- Do not omit essential components—even if the app is “just” a WebView wrapper, show the build pipeline, configuration, and native handlers.
- Clearly separate runtime (Expo, React Native Bridge) from the JavaScript modules.
- System settings (theme detection) and fallback logic (“ChatGPT is at capacity” workaround) as annotations on the theming or WebView component.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Runtime Layer
    OS["Mobile OS (iOS/Android)"]:::green
    Expo["Expo Runtime"]:::green
    Bridge["React Native Bridge"]:::green

    OS -->|"runs on"| Expo
    Expo -->|"bridges JS"| Bridge

    %% React Native App Code
    subgraph "React Native App Code"
        UI["UI Layer\n(Drawer & Bottom Tab)"]:::blue
        Theme["Theme Manager\n(light/dark)"]:::blue
        NativeHandlers["Native Modules\n(StatusBar, Keyboard, Back)"]:::green
        WebViewComp["WebView Component"]:::blue
        Bundle["JS Bundle"]:::blue
    end

    Bridge -->|"executes"| Bundle
    Bundle -->|"renders"| UI
    UI -->|"contains"| WebViewComp

    %% Native events
    OS -->|"native events"| NativeHandlers
    NativeHandlers -->|"back event"| UI
    Theme -->|"applies theme"| UI
    Theme -->|"controls status bar"| NativeHandlers

    %% External Service
    ChatUI["ChatGPT Web UI\n(chat.openai.com)"]:::orange
    WebViewComp -->|"HTTPS request"| ChatUI
    ChatUI -->|"response"| WebViewComp

    %% Config & Build Pipeline
    subgraph "Build & Configuration"
        AppJson["app.json"]:::blue
        EasJson["eas.json"]:::blue
        BabelConfig["babel.config.js"]:::blue
        TsConfig["tsconfig.json"]:::blue
        PackageJson["package.json"]:::blue
        Assets["assets/"]:::blue
        Readme["README.md"]:::blue
        ChangeLog["CHANGELOG.md"]:::blue
        License["LICENCE.txt"]:::blue
        GitIgnore[".gitignore"]:::blue
    end

    %% Build flows
    BabelConfig --> Bundle
    TsConfig --> Bundle
    PackageJson --> Bundle
    EasJson --> Bundle
    AppJson --> Expo
    Assets --> Expo

    %% Click events
    click UI "https://github.com/jackierayfield/chatgpt-app/blob/main/App.tsx"
    click AppJson "https://github.com/jackierayfield/chatgpt-app/blob/main/app.json"
    click EasJson "https://github.com/jackierayfield/chatgpt-app/blob/main/eas.json"
    click BabelConfig "https://github.com/jackierayfield/chatgpt-app/blob/main/babel.config.js"
    click TsConfig "https://github.com/jackierayfield/chatgpt-app/blob/main/tsconfig.json"
    click PackageJson "https://github.com/jackierayfield/chatgpt-app/blob/main/package.json"
    click Assets "https://github.com/jackierayfield/chatgpt-app/tree/main/assets/"
    click Readme "https://github.com/jackierayfield/chatgpt-app/blob/main/README.md"
    click ChangeLog "https://github.com/jackierayfield/chatgpt-app/blob/main/CHANGELOG.md"
    click License "https://github.com/jackierayfield/chatgpt-app/blob/main/LICENCE.txt"
    click GitIgnore "https://github.com/jackierayfield/chatgpt-app/blob/main/.gitignore"

    %% Styles
    classDef blue fill:#cce5ff,stroke:#1f78b4,stroke-width:1px
    classDef green fill:#d4edda,stroke:#28a745,stroke-width:1px
    classDef orange fill:#ffe5b4,stroke:#ff8c00,stroke-width:1px
```
