# steamcommunitykit/steam-deck-reward-unlocker architecture

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

- Interactive diagram: https://gitdiagram.com/steamcommunitykit/steam-deck-reward-unlocker
- Repository: https://github.com/steamcommunitykit/steam-deck-reward-unlocker

## Overview

This is a small interactive CLI for registering Steam Deck profile rewards. The user supplies Steam credentials and device codes; the CLI authenticates, extracts an access token from the session cookie, and submits the registration request. The README and sampled source support this flow; no separate persistence layer is present.

Main entry points: [`Demo.py`](https://github.com/steamcommunitykit/steam-deck-reward-unlocker/blob/main/Demo.py) (Interactive CLI), [`RegisterRewards.py`](https://github.com/steamcommunitykit/steam-deck-reward-unlocker/blob/main/RegisterRewards.py) (Registration client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflow"]
  node_cli["Interactive CLI<br/>[Demo.py]"]
  node_token["Token parsing<br/>[Demo.py]"]
end

subgraph group_auth["Steam authentication"]
  node_steamkit["steamcommunitykit"]
  node_session["Community session"]
end

subgraph group_rewards["Rewards registration"]
  node_register["Registration client<br/>[RegisterRewards.py]"]
  node_steamapi{{"Steam rewards API"}}
end

node_user(("User"))

node_user -->|"enters credentials"| node_cli
node_cli -->|"creates client"| node_register
node_cli -->|"requests login"| node_register
node_register -->|"authenticates and builds session"| node_steamkit
node_steamkit -->|"returns session"| node_session
node_session -->|"provides cookie"| node_cli
node_cli -->|"parses cookie"| node_token
node_token -->|"returns access token"| node_cli
node_user -->|"enters device codes"| node_cli
node_cli -->|"submits registration"| node_register
node_register -->|"posts request"| node_steamapi
node_steamapi -->|"returns response"| node_register
node_register -->|"prints result"| node_user

click node_cli "https://github.com/steamcommunitykit/steam-deck-reward-unlocker/blob/main/Demo.py"
click node_token "https://github.com/steamcommunitykit/steam-deck-reward-unlocker/blob/main/Demo.py"
click node_register "https://github.com/steamcommunitykit/steam-deck-reward-unlocker/blob/main/RegisterRewards.py"

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_cli,node_token,node_user toneBlue
class node_steamkit,node_session toneAmber
class node_register,node_steamapi toneMint
```

## Components

### CLI workflow

- [Interactive CLI](https://github.com/steamcommunitykit/steam-deck-reward-unlocker/blob/main/Demo.py): `Demo.py`
- [Token parsing](https://github.com/steamcommunitykit/steam-deck-reward-unlocker/blob/main/Demo.py): `Demo.py`

### Steam authentication

- **steamcommunitykit**
- **Community session**

### Rewards registration

- [Registration client](https://github.com/steamcommunitykit/steam-deck-reward-unlocker/blob/main/RegisterRewards.py): `RegisterRewards.py`
- **Steam rewards API**

### Other components

- **User**

## Connections

- User → Interactive CLI: enters credentials
- Interactive CLI → Registration client: creates client
- Interactive CLI → Registration client: requests login
- Registration client → steamcommunitykit: authenticates and builds session
- steamcommunitykit → Community session: returns session
- Community session → Interactive CLI: provides cookie
- Interactive CLI → Token parsing: parses cookie
- Token parsing → Interactive CLI: returns access token
- User → Interactive CLI: enters device codes
- Interactive CLI → Registration client: submits registration
- Registration client → Steam rewards API: posts request
- Steam rewards API → Registration client: returns response
- Registration client → User: prints result
