# valospectra/spectra-client architecture

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

- Interactive diagram: https://gitdiagram.com/valospectra/spectra-client
- Repository: https://github.com/valospectra/spectra-client

## Overview

Spectra Client is an Electron desktop app for a Valorant observer and optional auxiliary observer. The main workflow is to collect live game events through Overwolf’s GEP, format or package them, and send them to the Spectra Server; the Angular UI supplies connection details and tournament overlay configuration. The client also supports hotkey-triggered match events, persisted settings, and external preview/session features. Some UI and Electron wiring is only partially excerpted, so those relationships are shown as unverified rather than asserted as direct calls.

Main entry points: [`angular/src/app/observer/observer.component.ts`](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/observer/observer.component.ts) (Observer setup), [`src/main.ts`](https://github.com/valospectra/spectra-client/blob/main/src/main.ts) (Electron runtime), [`src/services/connectorService.ts`](https://github.com/valospectra/spectra-client/blob/main/src/services/connectorService.ts) (Server connection), [`src/services/gepService.ts`](https://github.com/valospectra/spectra-client/blob/main/src/services/gepService.ts) (GEP event capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop runtime"]
  node_electron["Electron runtime<br/>[main.ts]"]
  node_preload["IPC bridge<br/>[preload.ts]"]
  node_renderer["Angular shell<br/>[app.component.ts]"]
end

subgraph group_ingest["Game data and transport"]
  node_gep["GEP event capture<br/>[gepService.ts]"]
  node_formatting["Data formatting"]
  node_connector["Server connection"]
  node_hotkeys["Global hotkeys<br/>[hotkeyService.ts]"]
end

subgraph group_configuration["Observer configuration"]
  node_observer_setup["Observer setup"]
  node_auxiliary_setup["Auxiliary setup"]
  node_settings["App settings"]
  node_local_storage[("Local settings store")]
  node_validation["Input validation"]
end

subgraph group_tools["Tournament tools"]
  node_match_details["Match details"]
  node_series_map["Series and map"]
  node_tournament["Tournament details"]
  node_playercams["Player cameras"]
  node_sponsor_watermark["Branding overlays"]
  node_round_display["Round display"]
end

node_observer(("Observer operator"))
node_spectra_server["Spectra Server"]
node_mapban_service["Map-ban service"]
node_preview_service["Preview service"]
node_overwolf["Overwolf game events"]
node_session_api["Session API"]

node_observer -.->|"configures"| node_observer_setup
node_observer_setup -.->|"submits settings"| node_electron
node_electron -.->|"initializes capture"| node_gep
node_gep -.->|"reads game events"| node_overwolf
node_gep -->|"sends event data"| node_connector
node_electron -.->|"coordinates connection"| node_connector
node_connector -.->|"streams match data"| node_spectra_server
node_hotkeys -->|"sends match events"| node_connector
node_electron -.->|"activates hotkeys"| node_hotkeys
node_renderer -.->|"uses IPC bridge"| node_preload
node_observer_setup -->|"reads settings"| node_local_storage
node_settings -.->|"persists settings"| node_local_storage
node_observer_setup -.->|"validates inputs"| node_validation
node_observer_setup -.->|"configures teams"| node_match_details
node_observer_setup -.->|"configures series"| node_series_map
node_observer_setup -.->|"configures event"| node_tournament
node_observer_setup -.->|"configures cameras"| node_playercams
node_observer_setup -.->|"configures branding"| node_sponsor_watermark
node_observer_setup -.->|"configures display"| node_round_display
node_auxiliary_setup -.->|"submits auxiliary settings"| node_electron
node_observer_setup -->|"creates map-ban session"| node_mapban_service
node_observer_setup -->|"requests preview"| node_preview_service
node_mapban_service -.->|"creates session"| node_session_api

click node_electron "https://github.com/valospectra/spectra-client/blob/main/src/main.ts"
click node_preload "https://github.com/valospectra/spectra-client/blob/main/src/preload.ts"
click node_renderer "https://github.com/valospectra/spectra-client/blob/main/angular/src/app/app.component.ts"
click node_gep "https://github.com/valospectra/spectra-client/blob/main/src/services/gepService.ts"
click node_formatting "https://github.com/valospectra/spectra-client/blob/main/src/services/formattingService.ts"
click node_connector "https://github.com/valospectra/spectra-client/blob/main/src/services/connectorService.ts"
click node_hotkeys "https://github.com/valospectra/spectra-client/blob/main/src/services/hotkeyService.ts"
click node_observer_setup "https://github.com/valospectra/spectra-client/blob/main/angular/src/app/observer/observer.component.ts"
click node_auxiliary_setup "https://github.com/valospectra/spectra-client/blob/main/angular/src/app/AuxiliaryComponent/auxiliary.component.ts"
click node_settings "https://github.com/valospectra/spectra-client/blob/main/angular/src/app/options/options.component.ts"
click node_local_storage "https://github.com/valospectra/spectra-client/blob/main/angular/src/app/services/localstorage.service.ts"
click node_validation "https://github.com/valospectra/spectra-client/blob/main/angular/src/app/services/validation.service.ts"
click node_match_details "https://github.com/valospectra/spectra-client/blob/main/angular/src/app/teaminfo/teaminfo.component.ts"
click node_series_map "https://github.com/valospectra/spectra-client/blob/main/angular/src/app/seriesinfo/seriesinfo.component.ts"
click node_tournament "https://github.com/valospectra/spectra-client/blob/main/angular/src/app/tournamentinfo/tournamentinfo.component.ts"
click node_playercams "https://github.com/valospectra/spectra-client/blob/main/angular/src/app/playercams/playercams.component.ts"
click node_sponsor_watermark "https://github.com/valospectra/spectra-client/blob/main/angular/src/app/sponsor/sponsor.component.ts"
click node_round_display "https://github.com/valospectra/spectra-client/blob/main/angular/src/app/roundwinbox/roundwinbox.component.ts"

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_electron,node_preload,node_renderer,node_preview_service toneBlue
class node_gep,node_formatting,node_connector,node_hotkeys toneAmber
class node_observer_setup,node_auxiliary_setup,node_settings,node_local_storage,node_validation,node_observer,node_spectra_server,node_session_api toneMint
class node_match_details,node_series_map,node_tournament,node_playercams,node_sponsor_watermark,node_round_display toneRose
class node_mapban_service,node_overwolf toneIndigo
```

## Components

### Desktop runtime

- [Electron runtime](https://github.com/valospectra/spectra-client/blob/main/src/main.ts): `src/main.ts`
- [IPC bridge](https://github.com/valospectra/spectra-client/blob/main/src/preload.ts): `src/preload.ts`
- [Angular shell](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/app.component.ts): `angular/src/app/app.component.ts`

### Game data and transport

- [GEP event capture](https://github.com/valospectra/spectra-client/blob/main/src/services/gepService.ts): `src/services/gepService.ts`
- [Data formatting](https://github.com/valospectra/spectra-client/blob/main/src/services/formattingService.ts): `src/services/formattingService.ts`
- [Server connection](https://github.com/valospectra/spectra-client/blob/main/src/services/connectorService.ts): `src/services/connectorService.ts`
- [Global hotkeys](https://github.com/valospectra/spectra-client/blob/main/src/services/hotkeyService.ts): `src/services/hotkeyService.ts`

### Observer configuration

- [Observer setup](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/observer/observer.component.ts): `angular/src/app/observer/observer.component.ts`
- [Auxiliary setup](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/AuxiliaryComponent/auxiliary.component.ts): `angular/src/app/AuxiliaryComponent/auxiliary.component.ts`
- [App settings](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/options/options.component.ts): `angular/src/app/options/options.component.ts`
- [Local settings store](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/services/localstorage.service.ts): `angular/src/app/services/localstorage.service.ts`
- [Input validation](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/services/validation.service.ts): `angular/src/app/services/validation.service.ts`

### Tournament tools

- [Match details](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/teaminfo/teaminfo.component.ts): `angular/src/app/teaminfo/teaminfo.component.ts`
- [Series and map](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/seriesinfo/seriesinfo.component.ts): `angular/src/app/seriesinfo/seriesinfo.component.ts`
- [Tournament details](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/tournamentinfo/tournamentinfo.component.ts): `angular/src/app/tournamentinfo/tournamentinfo.component.ts`
- [Player cameras](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/playercams/playercams.component.ts): `angular/src/app/playercams/playercams.component.ts`
- [Branding overlays](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/sponsor/sponsor.component.ts): `angular/src/app/sponsor/sponsor.component.ts`
- [Round display](https://github.com/valospectra/spectra-client/blob/main/angular/src/app/roundwinbox/roundwinbox.component.ts): `angular/src/app/roundwinbox/roundwinbox.component.ts`

### Other components

- **Observer operator**
- **Spectra Server**
- **Map-ban service**
- **Preview service**
- **Overwolf game events**
- **Session API**

## Connections

- Observer operator → Observer setup: configures
- Observer setup → Electron runtime: submits settings
- Electron runtime → GEP event capture: initializes capture (evidence: `src/main.ts`)
- GEP event capture → Overwolf game events: reads game events
- GEP event capture → Server connection: sends event data (evidence: `src/services/gepService.ts`)
- Electron runtime → Server connection: coordinates connection (evidence: `src/main.ts`)
- Server connection → Spectra Server: streams match data
- Global hotkeys → Server connection: sends match events (evidence: `src/services/hotkeyService.ts`)
- Electron runtime → Global hotkeys: activates hotkeys (evidence: `src/main.ts`)
- Angular shell → IPC bridge: uses IPC bridge
- Observer setup → Local settings store: reads settings (evidence: `angular/src/app/observer/observer.component.ts`)
- App settings → Local settings store: persists settings (evidence: `angular/src/app/options/options.component.ts`)
- Observer setup → Input validation: validates inputs (evidence: `angular/src/app/observer/observer.component.ts`)
- Observer setup → Match details: configures teams (evidence: `angular/src/app/observer/observer.component.ts`)
- Observer setup → Series and map: configures series (evidence: `angular/src/app/observer/observer.component.ts`)
- Observer setup → Tournament details: configures event (evidence: `angular/src/app/observer/observer.component.ts`)
- Observer setup → Player cameras: configures cameras (evidence: `angular/src/app/observer/observer.component.ts`)
- Observer setup → Branding overlays: configures branding (evidence: `angular/src/app/observer/observer.component.ts`)
- Observer setup → Round display: configures display (evidence: `angular/src/app/observer/observer.component.ts`)
- Auxiliary setup → Electron runtime: submits auxiliary settings
- Observer setup → Map-ban service: creates map-ban session (evidence: `angular/src/app/observer/observer.component.ts`)
- Observer setup → Preview service: requests preview (evidence: `angular/src/app/observer/observer.component.ts`)
- Map-ban service → Session API: creates session
