# maheshshelke05/ghostly-releases architecture

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

- Interactive diagram: https://gitdiagram.com/maheshshelke05/ghostly-releases
- Repository: https://github.com/maheshshelke05/ghostly-releases

## Overview

Ghostly AI is an Electron interview assistant whose main workflow is to configure a session and API credentials, capture interview audio or a screen, transcribe or analyze that input, and present AI answers with question history. The graph follows the sampled renderer and Electron entry points; provider and IPC internals are only represented at the supported module level because their implementations were not sampled.

Main entry points: [`src/pages/Home.tsx`](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/pages/Home.tsx) (Interview workspace), [`src/App.tsx`](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/App.tsx) (App flow), [`electron/main.ts`](https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/main.ts) (Electron main), [`src/store/useStore.ts`](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/store/useStore.ts) (App and session state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Session setup"]
  node_app["App flow<br/>[App.tsx]"]
  node_interview_setup["Interview setup"]
  node_api_setup["API setup<br/>[ApiSetupPage.tsx]"]
  node_audio_setup["Audio setup<br/>[AudioSetupPage.tsx]"]
end

subgraph group_desktop["Desktop runtime"]
  node_electron_main["Electron main<br/>[main.ts]"]
  node_preload["Renderer bridge<br/>[preload.ts]"]
  node_hotkeys["System hotkeys<br/>[hotkeys.ts]"]
  node_capture["Screen capture<br/>[capture.ts]"]
  node_stealth["Stealth controls<br/>[stealth.ts]"]
end

subgraph group_interview["Interview workflow"]
  node_home["Interview workspace<br/>[Home.tsx]"]
  node_audio_hook["Audio capture"]
  node_compressor["Screenshot compression<br/>[imageCompressor.ts]"]
  node_prompts["Interview prompts<br/>[prompts.ts]"]
  node_transcript_ui["Transcript display"]
  node_solution_ui["Answer display<br/>[SolutionCard.tsx]"]
  node_history_ui["QA history"]
end

subgraph group_services["AI services"]
  node_deepgram{{"Deepgram speech API"}}
  node_ai_providers["AI provider clients"]
end

subgraph group_state["Session state"]
  node_store["App and session state<br/>[useStore.ts]"]
  node_persistence[("Desktop persistence<br/>[ipc.ts]")]
end

node_candidate(("Candidate"))
node_screen(("Screen content"))
node_interview_audio(("Interview audio"))
node_ai_apis{{"AI provider APIs"}}

node_candidate -->|"uses"| node_app
node_app -->|"loads state"| node_store
node_app -->|"loads saved data"| node_persistence
node_app -->|"routes to"| node_interview_setup
node_app -->|"routes to"| node_api_setup
node_app -->|"routes to"| node_audio_setup
node_app -->|"opens workspace"| node_home
node_interview_setup -->|"sets session"| node_store
node_api_setup -->|"sets credentials"| node_store
node_api_setup -->|"saves settings"| node_persistence
node_audio_setup -->|"sets audio options"| node_store
node_home -->|"reads and updates"| node_store
node_home -->|"requests capture"| node_capture
node_screen -->|"provides image"| node_capture
node_capture -->|"returns image"| node_home
node_home -->|"compresses image"| node_compressor
node_home -->|"builds prompts"| node_prompts
node_home -->|"requests streamed answer"| node_ai_providers
node_ai_providers -->|"calls provider API"| node_ai_apis
node_ai_providers -->|"streams answer"| node_home
node_interview_audio -->|"provides audio"| node_audio_hook
node_audio_hook -->|"streams audio"| node_deepgram
node_deepgram -->|"returns transcript"| node_audio_hook
node_audio_hook -->|"updates session"| node_store
node_home -->|"passes live text"| node_transcript_ui
node_home -->|"passes answer"| node_solution_ui
node_home -->|"passes history"| node_history_ui
node_home -->|"saves session data"| node_persistence
node_electron_main -->|"exposes bridge"| node_preload
node_preload -->|"forwards IPC events"| node_home
node_electron_main -->|"dispatches capture"| node_capture
node_electron_main -->|"registers hotkeys"| node_hotkeys
node_hotkeys -->|"sends commands"| node_home
node_electron_main -->|"applies display controls"| node_stealth
node_electron_main -->|"registers IPC handlers"| node_persistence

click node_app "https://github.com/maheshshelke05/ghostly-releases/blob/main/src/App.tsx"
click node_interview_setup "https://github.com/maheshshelke05/ghostly-releases/blob/main/src/pages/InterviewSetupPage.tsx"
click node_api_setup "https://github.com/maheshshelke05/ghostly-releases/blob/main/src/pages/ApiSetupPage.tsx"
click node_audio_setup "https://github.com/maheshshelke05/ghostly-releases/blob/main/src/pages/AudioSetupPage.tsx"
click node_home "https://github.com/maheshshelke05/ghostly-releases/blob/main/src/pages/Home.tsx"
click node_audio_hook "https://github.com/maheshshelke05/ghostly-releases/blob/main/src/hooks/useInterviewAudio.ts"
click node_compressor "https://github.com/maheshshelke05/ghostly-releases/blob/main/src/lib/utils/imageCompressor.ts"
click node_prompts "https://github.com/maheshshelke05/ghostly-releases/blob/main/src/lib/prompts.ts"
click node_transcript_ui "https://github.com/maheshshelke05/ghostly-releases/blob/main/src/components/LiveTranscriptBar.tsx"
click node_solution_ui "https://github.com/maheshshelke05/ghostly-releases/blob/main/src/components/SolutionCard.tsx"
click node_history_ui "https://github.com/maheshshelke05/ghostly-releases/blob/main/src/components/InterviewHistoryModal.tsx"
click node_store "https://github.com/maheshshelke05/ghostly-releases/blob/main/src/store/useStore.ts"
click node_persistence "https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/ipc.ts"
click node_electron_main "https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/main.ts"
click node_preload "https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/preload.ts"
click node_hotkeys "https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/hotkeys.ts"
click node_capture "https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/capture.ts"
click node_stealth "https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/stealth.ts"
click node_ai_providers "https://github.com/maheshshelke05/ghostly-releases/tree/main/src/lib/ai"

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_app,node_interview_setup,node_api_setup,node_audio_setup,node_screen,node_interview_audio toneBlue
class node_electron_main,node_preload,node_hotkeys,node_capture,node_stealth toneAmber
class node_home,node_audio_hook,node_compressor,node_prompts,node_transcript_ui,node_solution_ui,node_history_ui,node_ai_apis toneMint
class node_deepgram,node_ai_providers toneRose
class node_store,node_persistence,node_candidate toneIndigo
```

## Components

### Session setup

- [App flow](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/App.tsx): `src/App.tsx`
- [Interview setup](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/pages/InterviewSetupPage.tsx): `src/pages/InterviewSetupPage.tsx`
- [API setup](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/pages/ApiSetupPage.tsx): `src/pages/ApiSetupPage.tsx`
- [Audio setup](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/pages/AudioSetupPage.tsx): `src/pages/AudioSetupPage.tsx`

### Desktop runtime

- [Electron main](https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/main.ts): `electron/main.ts`
- [Renderer bridge](https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/preload.ts): `electron/preload.ts`
- [System hotkeys](https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/hotkeys.ts): `electron/hotkeys.ts`
- [Screen capture](https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/capture.ts): `electron/capture.ts`
- [Stealth controls](https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/stealth.ts): `electron/stealth.ts`

### Interview workflow

- [Interview workspace](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Audio capture](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/hooks/useInterviewAudio.ts): `src/hooks/useInterviewAudio.ts`
- [Screenshot compression](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/lib/utils/imageCompressor.ts): `src/lib/utils/imageCompressor.ts`
- [Interview prompts](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/lib/prompts.ts): `src/lib/prompts.ts`
- [Transcript display](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/components/LiveTranscriptBar.tsx): `src/components/LiveTranscriptBar.tsx`
- [Answer display](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/components/SolutionCard.tsx): `src/components/SolutionCard.tsx`
- [QA history](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/components/InterviewHistoryModal.tsx): `src/components/InterviewHistoryModal.tsx`

### AI services

- **Deepgram speech API**
- [AI provider clients](https://github.com/maheshshelke05/ghostly-releases/tree/main/src/lib/ai): `src/lib/ai`

### Session state

- [App and session state](https://github.com/maheshshelke05/ghostly-releases/blob/main/src/store/useStore.ts): `src/store/useStore.ts`
- [Desktop persistence](https://github.com/maheshshelke05/ghostly-releases/blob/main/electron/ipc.ts): `electron/ipc.ts`

### Other components

- **Candidate**
- **Screen content**
- **Interview audio**
- **AI provider APIs**

## Connections

- Candidate → App flow: uses
- App flow → App and session state: loads state
- App flow → Desktop persistence: loads saved data
- App flow → Interview setup: routes to
- App flow → API setup: routes to
- App flow → Audio setup: routes to
- App flow → Interview workspace: opens workspace
- Interview setup → App and session state: sets session
- API setup → App and session state: sets credentials
- API setup → Desktop persistence: saves settings
- Audio setup → App and session state: sets audio options
- Interview workspace → App and session state: reads and updates
- Interview workspace → Screen capture: requests capture
- Screen content → Screen capture: provides image
- Screen capture → Interview workspace: returns image
- Interview workspace → Screenshot compression: compresses image
- Interview workspace → Interview prompts: builds prompts
- Interview workspace → AI provider clients: requests streamed answer
- AI provider clients → AI provider APIs: calls provider API
- AI provider clients → Interview workspace: streams answer
- Interview audio → Audio capture: provides audio
- Audio capture → Deepgram speech API: streams audio
- Deepgram speech API → Audio capture: returns transcript
- Audio capture → App and session state: updates session
- Interview workspace → Transcript display: passes live text
- Interview workspace → Answer display: passes answer
- Interview workspace → QA history: passes history
- Interview workspace → Desktop persistence: saves session data
- Electron main → Renderer bridge: exposes bridge
- Renderer bridge → Interview workspace: forwards IPC events
- Electron main → Screen capture: dispatches capture
- Electron main → System hotkeys: registers hotkeys
- System hotkeys → Interview workspace: sends commands
- Electron main → Stealth controls: applies display controls
- Electron main → Desktop persistence: registers IPC handlers
