# paulsparks/thrift-walk architecture

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

- Interactive diagram: https://gitdiagram.com/paulsparks/thrift-walk
- Repository: https://github.com/paulsparks/thrift-walk

## Overview

Thrift Walk combines a web thrift-store experience with a Godot game. The web workflow supports account creation or sign-in, then store browsing, item uploads, profiles, and wishlists; the repository tree identifies these stages, but their data-fetching links were not sampled. The game has separate player and interaction scripts. The graph includes the documented web authentication path and the sampled database configuration; other links are omitted where source evidence is insufficient.

Main entry points: [`web/src/app/(auth)`](https://github.com/paulsparks/thrift-walk/tree/main/web/src/app/(auth)) (Auth pages), [`web/src/lib/auth.ts`](https://github.com/paulsparks/thrift-walk/blob/main/web/src/lib/auth.ts) (Auth service), [`web/src/app/(auth)/sign-in/sign-in-form.tsx`](https://github.com/paulsparks/thrift-walk/blob/main/web/src/app/(auth)/sign-in/sign-in-form.tsx) (Sign-in form), [`web/src/app/(auth)/sign-up/sign-up-form.tsx`](https://github.com/paulsparks/thrift-walk/blob/main/web/src/app/(auth)/sign-up/sign-up-form.tsx) (Sign-up form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_storefront["Store pages"]
  node_store["Store browser<br/>[store-browser.tsx]"]
  node_upload["Scan upload<br/>[page.tsx]"]
  node_scan["Scan dropzone<br/>[scan-dropzone.tsx]"]
  node_profile["Profile<br/>[page.tsx]"]
  node_wishlist["Wishlist"]
end

subgraph group_identity["Identity"]
  node_signpages["Auth pages"]
  node_signin["Sign-in form<br/>[sign-in-form.tsx]"]
  node_signup["Sign-up form<br/>[sign-up-form.tsx]"]
  node_authclient["Auth client<br/>[auth-client.ts]"]
  node_authapi["Auth API route<br/>[route.ts]"]
  node_auth["Auth service<br/>[auth.ts]"]
end

subgraph group_data["Data model"]
  node_dbclient["Database client<br/>[db.ts]"]
  node_schema["Data schema<br/>[schema.ts]"]
  node_input["Query types<br/>[input.ts]"]
end

subgraph group_game["Godot game"]
  node_player["Player controls"]
  node_movement["Player movement<br/>[player_movement.gd]"]
  node_view["Player view<br/>[player_view.gd]"]
  node_interaction["Interaction"]
  node_context["Context UI<br/>[context_ui.gd]"]
  node_highlight["Object highlight"]
  node_game_server["Game server<br/>[server.gd]"]
end

node_visitor(("Visitor"))
node_postgres[("PostgreSQL")]

node_visitor -->|"opens account"| node_signpages
node_signpages -->|"renders"| node_signin
node_signpages -->|"renders"| node_signup
node_signin -->|"calls sign-in"| node_authclient
node_signup -->|"calls sign-up"| node_authclient
node_auth -->|"configures adapter"| node_dbclient
node_auth -.->|"uses PostgreSQL"| node_postgres
node_visitor -.->|"browses"| node_storefront
node_visitor -.->|"plays game"| node_player

click node_storefront "https://github.com/paulsparks/thrift-walk/tree/main/web/src/app/(site)"
click node_store "https://github.com/paulsparks/thrift-walk/blob/main/web/src/components/store-browser.tsx"
click node_upload "https://github.com/paulsparks/thrift-walk/blob/main/web/src/app/(site)/my-store/upload/page.tsx"
click node_scan "https://github.com/paulsparks/thrift-walk/blob/main/web/src/components/scan-dropzone.tsx"
click node_profile "https://github.com/paulsparks/thrift-walk/blob/main/web/src/app/(site)/profile/page.tsx"
click node_wishlist "https://github.com/paulsparks/thrift-walk/blob/main/web/src/components/wishlist-remove-button.tsx"
click node_signpages "https://github.com/paulsparks/thrift-walk/tree/main/web/src/app/(auth)"
click node_signin "https://github.com/paulsparks/thrift-walk/blob/main/web/src/app/(auth)/sign-in/sign-in-form.tsx"
click node_signup "https://github.com/paulsparks/thrift-walk/blob/main/web/src/app/(auth)/sign-up/sign-up-form.tsx"
click node_authclient "https://github.com/paulsparks/thrift-walk/blob/main/web/src/lib/auth-client.ts"
click node_authapi "https://github.com/paulsparks/thrift-walk/blob/main/web/src/app/api/auth/%5B...path%5D/route.ts"
click node_auth "https://github.com/paulsparks/thrift-walk/blob/main/web/src/lib/auth.ts"
click node_dbclient "https://github.com/paulsparks/thrift-walk/blob/main/web/src/lib/db.ts"
click node_schema "https://github.com/paulsparks/thrift-walk/blob/main/web/zenstack/schema.ts"
click node_input "https://github.com/paulsparks/thrift-walk/blob/main/web/zenstack/input.ts"
click node_player "https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/player/player_controller.gd"
click node_movement "https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/player/player_movement.gd"
click node_view "https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/player/player_view.gd"
click node_interaction "https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/interactive/interact_component.gd"
click node_context "https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/interactive/context_ui.gd"
click node_highlight "https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/interactive/object_highlight.gd"
click node_game_server "https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/server/server.gd"

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_storefront,node_store,node_upload,node_scan,node_profile,node_wishlist toneBlue
class node_signpages,node_signin,node_signup,node_authclient,node_authapi,node_auth,node_postgres toneAmber
class node_dbclient,node_schema,node_input toneMint
class node_player,node_movement,node_view,node_interaction,node_context,node_highlight,node_game_server toneRose
class node_visitor toneIndigo
```

## Components

### Storefront

- [Store pages](https://github.com/paulsparks/thrift-walk/tree/main/web/src/app/(site)): `web/src/app/(site)`
- [Store browser](https://github.com/paulsparks/thrift-walk/blob/main/web/src/components/store-browser.tsx): `web/src/components/store-browser.tsx`
- [Scan upload](https://github.com/paulsparks/thrift-walk/blob/main/web/src/app/(site)/my-store/upload/page.tsx): `web/src/app/(site)/my-store/upload/page.tsx`
- [Scan dropzone](https://github.com/paulsparks/thrift-walk/blob/main/web/src/components/scan-dropzone.tsx): `web/src/components/scan-dropzone.tsx`
- [Profile](https://github.com/paulsparks/thrift-walk/blob/main/web/src/app/(site)/profile/page.tsx): `web/src/app/(site)/profile/page.tsx`
- [Wishlist](https://github.com/paulsparks/thrift-walk/blob/main/web/src/components/wishlist-remove-button.tsx): `web/src/components/wishlist-remove-button.tsx`

### Identity

- [Auth pages](https://github.com/paulsparks/thrift-walk/tree/main/web/src/app/(auth)): `web/src/app/(auth)`
- [Sign-in form](https://github.com/paulsparks/thrift-walk/blob/main/web/src/app/(auth)/sign-in/sign-in-form.tsx): `web/src/app/(auth)/sign-in/sign-in-form.tsx`
- [Sign-up form](https://github.com/paulsparks/thrift-walk/blob/main/web/src/app/(auth)/sign-up/sign-up-form.tsx): `web/src/app/(auth)/sign-up/sign-up-form.tsx`
- [Auth client](https://github.com/paulsparks/thrift-walk/blob/main/web/src/lib/auth-client.ts): `web/src/lib/auth-client.ts`
- [Auth API route](https://github.com/paulsparks/thrift-walk/blob/main/web/src/app/api/auth/%5B...path%5D/route.ts): `web/src/app/api/auth/[...path]/route.ts`
- [Auth service](https://github.com/paulsparks/thrift-walk/blob/main/web/src/lib/auth.ts): `web/src/lib/auth.ts`

### Data model

- [Database client](https://github.com/paulsparks/thrift-walk/blob/main/web/src/lib/db.ts): `web/src/lib/db.ts`
- [Data schema](https://github.com/paulsparks/thrift-walk/blob/main/web/zenstack/schema.ts): `web/zenstack/schema.ts`
- [Query types](https://github.com/paulsparks/thrift-walk/blob/main/web/zenstack/input.ts): `web/zenstack/input.ts`

### Godot game

- [Player controls](https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/player/player_controller.gd): `game/scripts/player/player_controller.gd`
- [Player movement](https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/player/player_movement.gd): `game/scripts/player/player_movement.gd`
- [Player view](https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/player/player_view.gd): `game/scripts/player/player_view.gd`
- [Interaction](https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/interactive/interact_component.gd): `game/scripts/interactive/interact_component.gd`
- [Context UI](https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/interactive/context_ui.gd): `game/scripts/interactive/context_ui.gd`
- [Object highlight](https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/interactive/object_highlight.gd): `game/scripts/interactive/object_highlight.gd`
- [Game server](https://github.com/paulsparks/thrift-walk/blob/main/game/scripts/server/server.gd): `game/scripts/server/server.gd`

### Other components

- **Visitor**
- **PostgreSQL**

## Connections

- Visitor → Auth pages: opens account (evidence: `web/src/app/(auth)/sign-in/page.tsx`)
- Auth pages → Sign-in form: renders (evidence: `web/src/app/(auth)/sign-in/page.tsx`)
- Auth pages → Sign-up form: renders (evidence: `web/src/app/(auth)/sign-up/page.tsx`)
- Sign-in form → Auth client: calls sign-in (evidence: `web/src/app/(auth)/sign-in/sign-in-form.tsx`)
- Sign-up form → Auth client: calls sign-up (evidence: `web/src/app/(auth)/sign-up/sign-up-form.tsx`)
- Auth service → Database client: configures adapter (evidence: `web/src/lib/auth.ts`)
- Auth service → PostgreSQL: uses PostgreSQL
- Visitor → Store pages: browses
- Visitor → Player controls: plays game
