# dorpy-dotcom/chuxmart architecture

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

- Interactive diagram: https://gitdiagram.com/dorpy-dotcom/chuxmart
- Repository: https://github.com/dorpy-dotcom/chuxmart

## Overview

Chuxmart is a browser-based game exchange demo. Players enter a demo sign-in, manage a wishlist and unused-game inventory, donate matched games for points, and redeem points for generated Steam-style keys; they can also browse community profiles and donation history. The dashboard dispatches to these feature views, which share in-memory state persisted in localStorage. The sampled source supports these UI and state relationships; the community and shop data are demo-only, with no connected authentication or exchange service.

Main entry points: [`src/state.ts`](https://github.com/dorpy-dotcom/chuxmart/blob/main/src/state.ts) (User & community state), [`src/dashboardView.ts`](https://github.com/dorpy-dotcom/chuxmart/blob/main/src/dashboardView.ts) (Dashboard & tabs), [`src/main.ts`](https://github.com/dorpy-dotcom/chuxmart/blob/main/src/main.ts) (App bootstrap), [`src/loginView.ts`](https://github.com/dorpy-dotcom/chuxmart/blob/main/src/loginView.ts) (Demo sign-in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry &amp; Dashboard"]
  node_app["App bootstrap<br/>[main.ts]"]
  node_login["Demo sign-in<br/>[loginView.ts]"]
  node_dashboard["Dashboard &amp; tabs<br/>[dashboardView.ts]"]
end

subgraph group_exchange["Exchange Features"]
  node_wishlist["Wishlist &amp; inventory<br/>[wishlistView.ts]"]
  node_matching["Donation matching<br/>[matchView.ts]"]
  node_community["Community profiles<br/>[matchView.ts]"]
end

subgraph group_rewards["Points &amp; Shop"]
  node_shop["Points shop<br/>[shopView.ts]"]
end

subgraph group_state["Demo State"]
  node_demo_state["User &amp; community state<br/>[state.ts]"]
end

node_player(("Player"))
node_local_storage[("Browser localStorage")]

node_player -->|"opens"| node_app
node_app -->|"reads session"| node_demo_state
node_app -->|"renders signed out"| node_login
node_app -->|"renders signed in"| node_dashboard
node_player -->|"submits credentials"| node_login
node_login -->|"updates profile"| node_demo_state
node_login -->|"calls rerender"| node_app
node_dashboard -->|"reads and updates"| node_demo_state
node_dashboard -->|"dispatches tab"| node_wishlist
node_dashboard -->|"dispatches tab"| node_matching
node_dashboard -->|"dispatches tab"| node_community
node_dashboard -->|"dispatches tab"| node_shop
node_wishlist -->|"edits lists"| node_demo_state
node_matching -->|"matches and donates"| node_demo_state
node_community -->|"reads profiles"| node_demo_state
node_shop -->|"redeems points"| node_demo_state
node_demo_state -->|"loads and saves"| node_local_storage

click node_app "https://github.com/dorpy-dotcom/chuxmart/blob/main/src/main.ts"
click node_login "https://github.com/dorpy-dotcom/chuxmart/blob/main/src/loginView.ts"
click node_dashboard "https://github.com/dorpy-dotcom/chuxmart/blob/main/src/dashboardView.ts"
click node_wishlist "https://github.com/dorpy-dotcom/chuxmart/blob/main/src/wishlistView.ts"
click node_matching "https://github.com/dorpy-dotcom/chuxmart/blob/main/src/matchView.ts"
click node_community "https://github.com/dorpy-dotcom/chuxmart/blob/main/src/matchView.ts"
click node_shop "https://github.com/dorpy-dotcom/chuxmart/blob/main/src/shopView.ts"
click node_demo_state "https://github.com/dorpy-dotcom/chuxmart/blob/main/src/state.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_app,node_login,node_dashboard toneBlue
class node_wishlist,node_matching,node_community,node_local_storage toneAmber
class node_shop toneMint
class node_demo_state toneRose
class node_player toneIndigo
```

## Components

### Entry & Dashboard

- [App bootstrap](https://github.com/dorpy-dotcom/chuxmart/blob/main/src/main.ts): `src/main.ts`
- [Demo sign-in](https://github.com/dorpy-dotcom/chuxmart/blob/main/src/loginView.ts): `src/loginView.ts`
- [Dashboard & tabs](https://github.com/dorpy-dotcom/chuxmart/blob/main/src/dashboardView.ts): `src/dashboardView.ts`

### Exchange Features

- [Wishlist & inventory](https://github.com/dorpy-dotcom/chuxmart/blob/main/src/wishlistView.ts): `src/wishlistView.ts`
- [Donation matching](https://github.com/dorpy-dotcom/chuxmart/blob/main/src/matchView.ts): `src/matchView.ts`
- [Community profiles](https://github.com/dorpy-dotcom/chuxmart/blob/main/src/matchView.ts): `src/matchView.ts`

### Points & Shop

- [Points shop](https://github.com/dorpy-dotcom/chuxmart/blob/main/src/shopView.ts): `src/shopView.ts`

### Demo State

- [User & community state](https://github.com/dorpy-dotcom/chuxmart/blob/main/src/state.ts): `src/state.ts`

### Other components

- **Player**
- **Browser localStorage**

## Connections

- Player → App bootstrap: opens
- App bootstrap → User & community state: reads session (evidence: `src/main.ts`)
- App bootstrap → Demo sign-in: renders signed out (evidence: `src/main.ts`)
- App bootstrap → Dashboard & tabs: renders signed in (evidence: `src/main.ts`)
- Player → Demo sign-in: submits credentials (evidence: `src/loginView.ts`)
- Demo sign-in → User & community state: updates profile (evidence: `src/loginView.ts`)
- Demo sign-in → App bootstrap: calls rerender (evidence: `src/main.ts`)
- Dashboard & tabs → User & community state: reads and updates (evidence: `src/dashboardView.ts`)
- Dashboard & tabs → Wishlist & inventory: dispatches tab (evidence: `src/dashboardView.ts`)
- Dashboard & tabs → Donation matching: dispatches tab (evidence: `src/dashboardView.ts`)
- Dashboard & tabs → Community profiles: dispatches tab (evidence: `src/dashboardView.ts`)
- Dashboard & tabs → Points shop: dispatches tab (evidence: `src/dashboardView.ts`)
- Wishlist & inventory → User & community state: edits lists (evidence: `src/wishlistView.ts`)
- Donation matching → User & community state: matches and donates (evidence: `src/matchView.ts`)
- Community profiles → User & community state: reads profiles (evidence: `src/matchView.ts`)
- Points shop → User & community state: redeems points (evidence: `src/shopView.ts`)
- User & community state → Browser localStorage: loads and saves (evidence: `src/state.ts`)
