# mendozajohnaries-ops/stoneforge-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/mendozajohnaries-ops/stoneforge-frontend
- Repository: https://github.com/mendozajohnaries-ops/stoneforge-frontend

## Overview

StoneForge is a browser-based game website: visitors discover the game and request a guarded installer, while players authenticate, manage profiles, use the sandbox Store, and view achievements or transaction history. Admins have a separate player-management interface; native game clients can hand off for account verification and Store actions. The graph combines the README’s documented capabilities with sampled source; unsampled routes are included only where the README identifies them, and uncertain wiring is omitted.

Main entry points: [`download.js`](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/download.js) (Installer request), [`auth.js`](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/auth.js) (Login and signup), [`profile-store.js`](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/profile-store.js) (Profile and Store), [`game-verify.js`](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/game-verify.js) (Game verification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Website"]
  node_home["Home and reviews<br/>[StoneForge.js]"]
  node_download["Installer request<br/>[download.js]"]
  node_maintenance["Download policy"]
end

subgraph group_identity["Accounts and Handoff"]
  node_auth["Login and signup<br/>[auth.js]"]
  node_session["Session guard<br/>[session-guard.js]"]
  node_profile["Player profile<br/>[dashboard.js]"]
  node_profile_fields["Profile validation<br/>[profile-fields.js]"]
  node_schools["School selector<br/>[school-selector.js]"]
  node_game_verify["Game verification<br/>[game-verify.js]"]
  node_signout["Logout confirmation<br/>[sign-out.js]"]
end

subgraph group_commerce["Profile and Store"]
  node_store["Profile and Store<br/>[profile-store.js]"]
  node_wallet["Wallet validation<br/>[wallet-client.js]"]
  node_handoff["Store handoff validation"]
  node_skins["Tool skin state<br/>[skin-client.js]"]
end

subgraph group_player["Player Features"]
  node_achievements["Achievement browser<br/>[achievements.js]"]
  node_history["Transaction history"]
  node_tutorial["Legacy tutorial download"]
end

subgraph group_operations["Administration"]
  node_admin["Admin dashboard<br/>[admin.js]"]
end

node_visitor(("Website visitor"))
node_player(("Player"))
node_game(("Native game"))
node_admin_actor(("Administrator"))
node_backend["StoneForge API"]

node_visitor -->|"visits"| node_home
node_visitor -->|"requests download"| node_download
node_download -->|"requests release"| node_backend
node_download -->|"checks policy"| node_maintenance
node_player -->|"signs in"| node_auth
node_auth -->|"validates profile"| node_profile_fields
node_auth -->|"mounts selector"| node_schools
node_player -->|"manages account"| node_profile
node_profile -->|"requests account actions"| node_backend
node_session -->|"verifies session"| node_backend
node_player -->|"approves game"| node_game_verify
node_game_verify -->|"checks account and requests code"| node_backend
node_game -->|"starts verification"| node_game_verify
node_player -->|"uses Store"| node_store
node_store -->|"validates wallet state"| node_wallet
node_store -->|"requests profile and catalog"| node_backend
node_game -->|"provides Store context"| node_handoff
node_player -->|"views progress"| node_achievements
node_achievements -->|"loads catalog and records"| node_backend
node_player -->|"reviews transactions"| node_history
node_player -.->|"uses legacy helper"| node_tutorial
node_admin_actor -->|"manages players"| node_admin
node_admin -->|"requests admin actions"| node_backend
node_player -->|"confirms logout"| node_signout

click node_home "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/StoneForge.js"
click node_download "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/download.js"
click node_maintenance "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/download-maintenance.js"
click node_auth "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/auth.js"
click node_session "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/session-guard.js"
click node_profile "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/dashboard.js"
click node_profile_fields "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/profile-fields.js"
click node_schools "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/school-selector.js"
click node_game_verify "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/game-verify.js"
click node_store "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/profile-store.js"
click node_wallet "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/wallet-client.js"
click node_handoff "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/store-handoff-client.js"
click node_skins "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/skin-client.js"
click node_achievements "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/achievements.js"
click node_history "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/transaction-history.js"
click node_tutorial "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/tutorial-download.js"
click node_admin "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/admin.js"
click node_signout "https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/sign-out.js"

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_home,node_download,node_maintenance toneBlue
class node_auth,node_session,node_profile,node_profile_fields,node_schools,node_game_verify,node_signout toneAmber
class node_store,node_wallet,node_handoff,node_skins,node_backend toneMint
class node_achievements,node_history,node_tutorial toneRose
class node_admin,node_visitor,node_player,node_game,node_admin_actor toneIndigo
```

## Components

### Public Website

- [Home and reviews](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/StoneForge.js): `StoneForge.js`
- [Installer request](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/download.js): `download.js`
- [Download policy](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/download-maintenance.js): `download-maintenance.js`

### Accounts and Handoff

- [Login and signup](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/auth.js): `auth.js`
- [Session guard](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/session-guard.js): `session-guard.js`
- [Player profile](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/dashboard.js): `dashboard.js`
- [Profile validation](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/profile-fields.js): `profile-fields.js`
- [School selector](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/school-selector.js): `school-selector.js`
- [Game verification](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/game-verify.js): `game-verify.js`
- [Logout confirmation](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/sign-out.js): `sign-out.js`

### Profile and Store

- [Profile and Store](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/profile-store.js): `profile-store.js`
- [Wallet validation](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/wallet-client.js): `wallet-client.js`
- [Store handoff validation](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/store-handoff-client.js): `store-handoff-client.js`
- [Tool skin state](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/skin-client.js): `skin-client.js`

### Player Features

- [Achievement browser](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/achievements.js): `achievements.js`
- [Transaction history](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/transaction-history.js): `transaction-history.js`
- [Legacy tutorial download](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/tutorial-download.js): `tutorial-download.js`

### Administration

- [Admin dashboard](https://github.com/mendozajohnaries-ops/stoneforge-frontend/blob/main/admin.js): `admin.js`

### Other components

- **Website visitor**
- **Player**
- **Native game**
- **Administrator**
- **StoneForge API**

## Connections

- Website visitor → Home and reviews: visits (evidence: `README.md`)
- Website visitor → Installer request: requests download (evidence: `README.md`)
- Installer request → StoneForge API: requests release (evidence: `README.md`)
- Installer request → Download policy: checks policy (evidence: `README.md`)
- Player → Login and signup: signs in (evidence: `README.md`)
- Login and signup → Profile validation: validates profile (evidence: `auth.js`)
- Login and signup → School selector: mounts selector (evidence: `auth.js`)
- Player → Player profile: manages account (evidence: `README.md`)
- Player profile → StoneForge API: requests account actions (evidence: `dashboard.js`)
- Session guard → StoneForge API: verifies session (evidence: `session-guard.js`)
- Player → Game verification: approves game (evidence: `README.md`)
- Game verification → StoneForge API: checks account and requests code (evidence: `README.md`)
- Native game → Game verification: starts verification (evidence: `README.md`)
- Player → Profile and Store: uses Store (evidence: `README.md`)
- Profile and Store → Wallet validation: validates wallet state (evidence: `profile-store.js`)
- Profile and Store → StoneForge API: requests profile and catalog (evidence: `profile-store.js`)
- Native game → Store handoff validation: provides Store context (evidence: `README.md`)
- Player → Achievement browser: views progress (evidence: `README.md`)
- Achievement browser → StoneForge API: loads catalog and records (evidence: `achievements.js`)
- Player → Transaction history: reviews transactions (evidence: `README.md`)
- Player → Legacy tutorial download: uses legacy helper (evidence: `README.md`)
- Administrator → Admin dashboard: manages players (evidence: `README.md`)
- Admin dashboard → StoneForge API: requests admin actions (evidence: `admin.js`)
- Player → Logout confirmation: confirms logout (evidence: `README.md`)
