# petrviitman/showcase architecture

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

- Interactive diagram: https://gitdiagram.com/petrviitman/showcase
- Repository: https://github.com/petrviitman/showcase

## Overview

This is a showcase slot game: the user selects bets or spin modes, game logic requests a mock game result, and the selected presentation reports the spin, win/loss, and updated balance. The README describes console and Pixi presentation choices, turbo and autoplay, and reusable runtime-generated assets. The Pixi view graph follows relationships visible in the source index; unsampled features are represented at subsystem level where their exact implementation path is not established. The standalone service is mock game infrastructure, not evidence of a deployed remote backend.

Main entry points: [`src/presentation/pixi/PixiPresentation.ts`](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/PixiPresentation.ts) (Pixi presentation), [`src/EntryPoint.ts`](https://github.com/petrviitman/showcase/blob/master/src/EntryPoint.ts) (Entry point), [`src/busynessLogic/GameLogic.ts`](https://github.com/petrviitman/showcase/blob/master/src/busynessLogic/GameLogic.ts) (Game logic), [`src/presentation/pixi/views/GUI/GUIView.ts`](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/GUI/GUIView.ts) (Game controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game runtime"]
  node_entry["Entry point<br/>[EntryPoint.ts]"]
  node_logic["Game logic<br/>[GameLogic.ts]"]
  node_contracts["Game contracts<br/>[Shared.types.ts]"]
end

subgraph group_service["Mock game service"]
  node_web_api["Standalone Web API<br/>[WebAPI.ts]"]
  node_fake_server["Fake server<br/>[FakeServer.ts]"]
  node_slot_machine["Slot machine<br/>[SlotMachine.ts]"]
  node_slot_types["Slot result types"]
end

subgraph group_adapters["Presentation adapters"]
  node_presentation_api["Presentation interface"]
  node_console["Console presentation"]
end

subgraph group_pixi["Pixi experience"]
  node_pixi_presentation["Pixi presentation"]
  node_asset_loader["Asset loading<br/>[Assets.ts]"]
  node_runtime_assets["Runtime asset generation"]
  node_adaptive["Adaptive layout"]
  node_loading["Loading screens<br/>[LoadingScreen.ts]"]
  node_background["Background view<br/>[BackgroundView.ts]"]
  node_reels["Reel presentation<br/>[ReelsView.ts]"]
  node_single_reel["Single reel<br/>[SingleReelView.ts]"]
  node_reel_cell["Reel cells<br/>[ReelCellView.ts]"]
  node_win_layer["Win effects<br/>[WinLayerView.ts]"]
  node_gui["Game controls<br/>[GUIView.ts]"]
  node_buttons["Control buttons<br/>[ButtonView.ts]"]
  node_indicators["Status indicators<br/>[IndicatorView.ts]"]
  node_audio["Audio system<br/>[Audio.ts]"]
  node_character["Vampire character<br/>[VampireView.ts]"]
  node_spine["Spine animation<br/>[SpineView.ts]"]
end

node_player(("Player"))

node_player -->|"starts game"| node_entry
node_entry -->|"creates"| node_logic
node_entry -->|"selects presentation"| node_console
node_entry -->|"selects presentation"| node_pixi_presentation
node_logic -->|"requests game data"| node_web_api
node_logic -->|"drives"| node_presentation_api
node_console -->|"implements"| node_presentation_api
node_pixi_presentation -->|"implements"| node_presentation_api
node_logic -->|"uses types"| node_contracts
node_web_api -->|"calls"| node_fake_server
node_fake_server -->|"uses"| node_slot_machine
node_fake_server -->|"uses types"| node_slot_types
node_pixi_presentation -->|"loads assets"| node_asset_loader
node_asset_loader -->|"uses generated assets"| node_runtime_assets
node_runtime_assets -->|"renders symbols"| node_spine
node_pixi_presentation -->|"installs layout"| node_adaptive
node_pixi_presentation -->|"shows loading"| node_loading
node_pixi_presentation -->|"creates view"| node_background
node_pixi_presentation -->|"creates and updates"| node_reels
node_reels -->|"uses"| node_single_reel
node_single_reel -->|"uses"| node_reel_cell
node_reels -->|"uses"| node_win_layer
node_pixi_presentation -->|"creates and refreshes"| node_gui
node_gui -->|"uses controls"| node_buttons
node_gui -->|"uses displays"| node_indicators
node_pixi_presentation -->|"loads and plays"| node_audio
node_gui -->|"plays interaction sounds"| node_audio
node_pixi_presentation -->|"presents outcomes"| node_character
node_character -->|"animates with"| node_spine
node_character -->|"plays win sound"| node_audio

click node_entry "https://github.com/petrviitman/showcase/blob/master/src/EntryPoint.ts"
click node_logic "https://github.com/petrviitman/showcase/blob/master/src/busynessLogic/GameLogic.ts"
click node_contracts "https://github.com/petrviitman/showcase/blob/master/src/Shared.types.ts"
click node_presentation_api "https://github.com/petrviitman/showcase/blob/master/src/presentation/Presentation.interface.ts"
click node_console "https://github.com/petrviitman/showcase/blob/master/src/presentation/console/ConsolePresentation.ts"
click node_pixi_presentation "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/PixiPresentation.ts"
click node_web_api "https://github.com/petrviitman/showcase/blob/master/src/busynessLogic/standaloneService/WebAPI.ts"
click node_fake_server "https://github.com/petrviitman/showcase/blob/master/src/busynessLogic/standaloneService/service/FakeServer.ts"
click node_slot_machine "https://github.com/petrviitman/showcase/blob/master/src/busynessLogic/standaloneService/service/slotMachine/SlotMachine.ts"
click node_slot_types "https://github.com/petrviitman/showcase/blob/master/src/busynessLogic/standaloneService/service/slotMachine/SlotMachine.types.ts"
click node_asset_loader "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/Assets.ts"
click node_runtime_assets "https://github.com/petrviitman/showcase/blob/master/src/presentation/RuntimeAssetsGeneration.ts"
click node_adaptive "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/AdaptiveContainer.ts"
click node_loading "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/loadingScreen/LoadingScreen.ts"
click node_background "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/BackgroundView.ts"
click node_reels "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/reels/ReelsView.ts"
click node_single_reel "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/reels/SingleReelView.ts"
click node_reel_cell "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/reels/cell/ReelCellView.ts"
click node_win_layer "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/reels/WinLayerView.ts"
click node_gui "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/GUI/GUIView.ts"
click node_buttons "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/GUI/buttons/ButtonView.ts"
click node_indicators "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/GUI/indicators/IndicatorView.ts"
click node_audio "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/audio/Audio.ts"
click node_character "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/VampireView.ts"
click node_spine "https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/SpineView.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_entry,node_logic,node_contracts toneBlue
class node_web_api,node_fake_server,node_slot_machine,node_slot_types toneAmber
class node_presentation_api,node_console toneMint
class node_pixi_presentation,node_asset_loader,node_runtime_assets,node_adaptive,node_loading,node_background,node_reels,node_single_reel,node_reel_cell,node_win_layer,node_gui,node_buttons,node_indicators,node_audio,node_character,node_spine toneRose
class node_player toneIndigo
```

## Components

### Game runtime

- [Entry point](https://github.com/petrviitman/showcase/blob/master/src/EntryPoint.ts): `src/EntryPoint.ts`
- [Game logic](https://github.com/petrviitman/showcase/blob/master/src/busynessLogic/GameLogic.ts): `src/busynessLogic/GameLogic.ts`
- [Game contracts](https://github.com/petrviitman/showcase/blob/master/src/Shared.types.ts): `src/Shared.types.ts`

### Mock game service

- [Standalone Web API](https://github.com/petrviitman/showcase/blob/master/src/busynessLogic/standaloneService/WebAPI.ts): `src/busynessLogic/standaloneService/WebAPI.ts`
- [Fake server](https://github.com/petrviitman/showcase/blob/master/src/busynessLogic/standaloneService/service/FakeServer.ts): `src/busynessLogic/standaloneService/service/FakeServer.ts`
- [Slot machine](https://github.com/petrviitman/showcase/blob/master/src/busynessLogic/standaloneService/service/slotMachine/SlotMachine.ts): `src/busynessLogic/standaloneService/service/slotMachine/SlotMachine.ts`
- [Slot result types](https://github.com/petrviitman/showcase/blob/master/src/busynessLogic/standaloneService/service/slotMachine/SlotMachine.types.ts): `src/busynessLogic/standaloneService/service/slotMachine/SlotMachine.types.ts`

### Presentation adapters

- [Presentation interface](https://github.com/petrviitman/showcase/blob/master/src/presentation/Presentation.interface.ts): `src/presentation/Presentation.interface.ts`
- [Console presentation](https://github.com/petrviitman/showcase/blob/master/src/presentation/console/ConsolePresentation.ts): `src/presentation/console/ConsolePresentation.ts`

### Pixi experience

- [Pixi presentation](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/PixiPresentation.ts): `src/presentation/pixi/PixiPresentation.ts`
- [Asset loading](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/Assets.ts): `src/presentation/pixi/Assets.ts`
- [Runtime asset generation](https://github.com/petrviitman/showcase/blob/master/src/presentation/RuntimeAssetsGeneration.ts): `src/presentation/RuntimeAssetsGeneration.ts`
- [Adaptive layout](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/AdaptiveContainer.ts): `src/presentation/pixi/views/AdaptiveContainer.ts`
- [Loading screens](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/loadingScreen/LoadingScreen.ts): `src/presentation/pixi/views/loadingScreen/LoadingScreen.ts`
- [Background view](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/BackgroundView.ts): `src/presentation/pixi/views/BackgroundView.ts`
- [Reel presentation](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/reels/ReelsView.ts): `src/presentation/pixi/views/reels/ReelsView.ts`
- [Single reel](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/reels/SingleReelView.ts): `src/presentation/pixi/views/reels/SingleReelView.ts`
- [Reel cells](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/reels/cell/ReelCellView.ts): `src/presentation/pixi/views/reels/cell/ReelCellView.ts`
- [Win effects](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/reels/WinLayerView.ts): `src/presentation/pixi/views/reels/WinLayerView.ts`
- [Game controls](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/GUI/GUIView.ts): `src/presentation/pixi/views/GUI/GUIView.ts`
- [Control buttons](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/GUI/buttons/ButtonView.ts): `src/presentation/pixi/views/GUI/buttons/ButtonView.ts`
- [Status indicators](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/GUI/indicators/IndicatorView.ts): `src/presentation/pixi/views/GUI/indicators/IndicatorView.ts`
- [Audio system](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/audio/Audio.ts): `src/presentation/pixi/audio/Audio.ts`
- [Vampire character](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/VampireView.ts): `src/presentation/pixi/views/VampireView.ts`
- [Spine animation](https://github.com/petrviitman/showcase/blob/master/src/presentation/pixi/views/SpineView.ts): `src/presentation/pixi/views/SpineView.ts`

### Other components

- **Player**

## Connections

- Player → Entry point: starts game
- Entry point → Game logic: creates (evidence: `src/EntryPoint.ts`)
- Entry point → Console presentation: selects presentation (evidence: `src/EntryPoint.ts`)
- Entry point → Pixi presentation: selects presentation (evidence: `src/EntryPoint.ts`)
- Game logic → Standalone Web API: requests game data (evidence: `src/busynessLogic/GameLogic.ts`)
- Game logic → Presentation interface: drives (evidence: `src/busynessLogic/GameLogic.ts`)
- Console presentation → Presentation interface: implements (evidence: `src/presentation/console/ConsolePresentation.ts`)
- Pixi presentation → Presentation interface: implements (evidence: `src/presentation/pixi/PixiPresentation.ts`)
- Game logic → Game contracts: uses types (evidence: `src/busynessLogic/GameLogic.ts`)
- Standalone Web API → Fake server: calls (evidence: `src/busynessLogic/standaloneService/WebAPI.ts`)
- Fake server → Slot machine: uses (evidence: `src/busynessLogic/standaloneService/service/FakeServer.ts`)
- Fake server → Slot result types: uses types (evidence: `src/busynessLogic/standaloneService/service/FakeServer.ts`)
- Pixi presentation → Asset loading: loads assets (evidence: `src/presentation/pixi/PixiPresentation.ts`)
- Asset loading → Runtime asset generation: uses generated assets (evidence: `src/presentation/pixi/Assets.ts`)
- Runtime asset generation → Spine animation: renders symbols (evidence: `src/presentation/RuntimeAssetsGeneration.ts`)
- Pixi presentation → Adaptive layout: installs layout (evidence: `src/presentation/pixi/PixiPresentation.ts`)
- Pixi presentation → Loading screens: shows loading (evidence: `src/presentation/pixi/PixiPresentation.ts`)
- Pixi presentation → Background view: creates view (evidence: `src/presentation/pixi/PixiPresentation.ts`)
- Pixi presentation → Reel presentation: creates and updates (evidence: `src/presentation/pixi/PixiPresentation.ts`)
- Reel presentation → Single reel: uses (evidence: `src/presentation/pixi/views/reels/ReelsView.ts`)
- Single reel → Reel cells: uses (evidence: `src/presentation/pixi/views/reels/SingleReelView.ts`)
- Reel presentation → Win effects: uses (evidence: `src/presentation/pixi/views/reels/ReelsView.ts`)
- Pixi presentation → Game controls: creates and refreshes (evidence: `src/presentation/pixi/PixiPresentation.ts`)
- Game controls → Control buttons: uses controls (evidence: `src/presentation/pixi/views/GUI/GUIView.ts`)
- Game controls → Status indicators: uses displays (evidence: `src/presentation/pixi/views/GUI/GUIView.ts`)
- Pixi presentation → Audio system: loads and plays (evidence: `src/presentation/pixi/PixiPresentation.ts`)
- Game controls → Audio system: plays interaction sounds (evidence: `src/presentation/pixi/views/GUI/GUIView.ts`)
- Pixi presentation → Vampire character: presents outcomes (evidence: `src/presentation/pixi/PixiPresentation.ts`)
- Vampire character → Spine animation: animates with (evidence: `src/presentation/pixi/views/VampireView.ts`)
- Vampire character → Audio system: plays win sound (evidence: `src/presentation/pixi/views/VampireView.ts`)
