# exit-that-lies-game/shipstory architecture

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

- Interactive diagram: https://gitdiagram.com/exit-that-lies-game/shipstory
- Repository: https://github.com/exit-that-lies-game/shipstory

## Overview

ShipStory is a maker community for publishing projects and discovering other makers’ work. The main workflow is to prepare a project in the publishing wizard, optionally import repository details or upload media, set visibility, and publish; visitors can browse projects and interact by following, liking, saving, and commenting. Supabase supports authentication and data access, while Cloudflare R2 and Turnstile provide media storage and signup protection. The graph uses README statements and SOURCE INDEX references for relationships; unsampled routes and subsystems are represented cautiously.

Main entry points: [`src/server/data/index.ts`](https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/data/index.ts) (Data access), [`src/server/supabase/server.ts`](https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/supabase/server.ts) (Server authentication), [`src/components/wizard/StepReview.tsx`](https://github.com/exit-that-lies-game/shipstory/blob/main/src/components/wizard/StepReview.tsx) (Review and visibility), [`src/lib/actions/publish.ts`](https://github.com/exit-that-lies-game/shipstory/blob/main/src/lib/actions/publish.ts) (Publish project)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Project discovery"]
  node_discovery_ui["Browse projects<br/>[page.tsx]"]
  node_project_pages["Project and profile pages<br/>[page.tsx]"]
  node_search_ui["Search projects<br/>[page.tsx]"]
end

subgraph group_publishing["Project publishing"]
  node_wizard["Project wizard<br/>[Wizard.tsx]"]
  node_review_step["Review and visibility<br/>[StepReview.tsx]"]
  node_visibility_options["Visibility options"]
  node_publish_action["Publish project<br/>[publish.ts]"]
  node_media_api["Media signing and cleanup<br/>[route.ts]"]
  node_github_import["GitHub import<br/>[github-import.ts]"]
  node_github_callback["GitHub callback<br/>[route.ts]"]
end

subgraph group_community["Community interactions"]
  node_community_actions["Community actions<br/>[reactions.ts]"]
  node_comments["Project comments<br/>[comments.ts]"]
  node_follow_action["Follow makers<br/>[follow.ts]"]
end

subgraph group_services["Platform services"]
  node_data_access["Data access<br/>[index.ts]"]
  node_supabase_data["Supabase data source<br/>[supabase-source.ts]"]
  node_mock_data["Mock data source<br/>[mock-data.ts]"]
  node_supabase_db[("Supabase")]
  node_r2_storage[("R2 media storage<br/>[r2.ts]")]
  node_sigv4["Request signing<br/>[sigv4.ts]"]
  node_github_app["GitHub connection<br/>[github-app.ts]"]
  node_auth_api["Authentication routes<br/>[route.ts]"]
  node_server_auth["Server authentication<br/>[server.ts]"]
  node_turnstile["Abuse verification<br/>[turnstile.ts]"]
  node_turnstile_service["Cloudflare Turnstile"]
end

subgraph group_admin["Administration"]
  node_admin_ui["Admin console<br/>[page.tsx]"]
  node_access_manager["Access management<br/>[AccessManager.tsx]"]
  node_admin_actions["Admin actions<br/>[actions.ts]"]
end

node_makers(("Makers"))

node_makers -->|"browse work"| node_discovery_ui
node_makers -->|"post projects"| node_wizard
node_makers -->|"like and save"| node_community_actions
node_makers -->|"follow makers"| node_follow_action
node_makers -->|"comment on work"| node_comments
node_discovery_ui -.->|"loads project data"| node_data_access
node_project_pages -.->|"loads project data"| node_data_access
node_search_ui -.->|"searches data"| node_data_access
node_data_access -->|"selects source"| node_supabase_data
node_data_access -->|"selects source"| node_mock_data
node_supabase_data -->|"uses server client"| node_server_auth
node_supabase_data -->|"uses media URLs"| node_r2_storage
node_server_auth -->|"auth and database"| node_supabase_db
node_wizard -.->|"shows review"| node_review_step
node_review_step -->|"renders options"| node_visibility_options
node_review_step -.->|"publishes project"| node_publish_action
node_visibility_options -.->|"checks visibility"| node_supabase_db
node_publish_action -->|"uses browser client"| node_server_auth
node_publish_action -.->|"writes project"| node_supabase_db
node_media_api -->|"signs and deletes"| node_r2_storage
node_r2_storage -->|"presigns requests"| node_sigv4
node_github_callback -->|"validates connection"| node_github_app
node_github_app -->|"checks user"| node_server_auth
node_github_app -->|"uses identity helper"| node_github_import
node_auth_api -->|"gets user"| node_server_auth
node_auth_api -->|"verifies signup"| node_turnstile
node_turnstile -->|"verifies token"| node_turnstile_service
node_admin_ui -.->|"manages access"| node_access_manager
node_access_manager -->|"grants or revokes"| node_admin_actions

click node_discovery_ui "https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/feed/page.tsx"
click node_project_pages "https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/p/%5Bslug%5D/page.tsx"
click node_search_ui "https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/search/page.tsx"
click node_data_access "https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/data/index.ts"
click node_supabase_data "https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/data/supabase-source.ts"
click node_mock_data "https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/data/mock-data.ts"
click node_wizard "https://github.com/exit-that-lies-game/shipstory/blob/main/src/components/wizard/Wizard.tsx"
click node_review_step "https://github.com/exit-that-lies-game/shipstory/blob/main/src/components/wizard/StepReview.tsx"
click node_visibility_options "https://github.com/exit-that-lies-game/shipstory/blob/main/src/components/visibility/VisibilityOptions.tsx"
click node_publish_action "https://github.com/exit-that-lies-game/shipstory/blob/main/src/lib/actions/publish.ts"
click node_media_api "https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/api/media/sign/route.ts"
click node_r2_storage "https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/storage/r2.ts"
click node_sigv4 "https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/storage/sigv4.ts"
click node_github_import "https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/github/github-import.ts"
click node_github_app "https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/github/github-app.ts"
click node_github_callback "https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/api/github/callback/route.ts"
click node_community_actions "https://github.com/exit-that-lies-game/shipstory/blob/main/src/lib/actions/reactions.ts"
click node_comments "https://github.com/exit-that-lies-game/shipstory/blob/main/src/lib/actions/comments.ts"
click node_follow_action "https://github.com/exit-that-lies-game/shipstory/blob/main/src/lib/actions/follow.ts"
click node_auth_api "https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/api/auth/start/route.ts"
click node_server_auth "https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/supabase/server.ts"
click node_turnstile "https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/abuse/turnstile.ts"
click node_admin_ui "https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/admin/page.tsx"
click node_access_manager "https://github.com/exit-that-lies-game/shipstory/blob/main/src/components/admin/AccessManager.tsx"
click node_admin_actions "https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/admin/actions.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_discovery_ui,node_project_pages,node_search_ui toneBlue
class node_wizard,node_review_step,node_visibility_options,node_publish_action,node_media_api,node_github_import,node_github_callback toneAmber
class node_community_actions,node_comments,node_follow_action toneMint
class node_data_access,node_supabase_data,node_mock_data,node_supabase_db,node_r2_storage,node_sigv4,node_github_app,node_auth_api,node_server_auth,node_turnstile,node_turnstile_service toneRose
class node_admin_ui,node_access_manager,node_admin_actions,node_makers toneIndigo
```

## Components

### Project discovery

- [Browse projects](https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/feed/page.tsx): `src/app/feed/page.tsx`
- [Project and profile pages](https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/p/%5Bslug%5D/page.tsx): `src/app/p/[slug]/page.tsx`
- [Search projects](https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/search/page.tsx): `src/app/search/page.tsx`

### Project publishing

- [Project wizard](https://github.com/exit-that-lies-game/shipstory/blob/main/src/components/wizard/Wizard.tsx): `src/components/wizard/Wizard.tsx`
- [Review and visibility](https://github.com/exit-that-lies-game/shipstory/blob/main/src/components/wizard/StepReview.tsx): `src/components/wizard/StepReview.tsx`
- [Visibility options](https://github.com/exit-that-lies-game/shipstory/blob/main/src/components/visibility/VisibilityOptions.tsx): `src/components/visibility/VisibilityOptions.tsx`
- [Publish project](https://github.com/exit-that-lies-game/shipstory/blob/main/src/lib/actions/publish.ts): `src/lib/actions/publish.ts`
- [Media signing and cleanup](https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/api/media/sign/route.ts): `src/app/api/media/sign/route.ts`
- [GitHub import](https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/github/github-import.ts): `src/server/github/github-import.ts`
- [GitHub callback](https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/api/github/callback/route.ts): `src/app/api/github/callback/route.ts`

### Community interactions

- [Community actions](https://github.com/exit-that-lies-game/shipstory/blob/main/src/lib/actions/reactions.ts): `src/lib/actions/reactions.ts`
- [Project comments](https://github.com/exit-that-lies-game/shipstory/blob/main/src/lib/actions/comments.ts): `src/lib/actions/comments.ts`
- [Follow makers](https://github.com/exit-that-lies-game/shipstory/blob/main/src/lib/actions/follow.ts): `src/lib/actions/follow.ts`

### Platform services

- [Data access](https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/data/index.ts): `src/server/data/index.ts`
- [Supabase data source](https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/data/supabase-source.ts): `src/server/data/supabase-source.ts`
- [Mock data source](https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/data/mock-data.ts): `src/server/data/mock-data.ts`
- **Supabase**
- [R2 media storage](https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/storage/r2.ts): `src/server/storage/r2.ts`
- [Request signing](https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/storage/sigv4.ts): `src/server/storage/sigv4.ts`
- [GitHub connection](https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/github/github-app.ts): `src/server/github/github-app.ts`
- [Authentication routes](https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/api/auth/start/route.ts): `src/app/api/auth/start/route.ts`
- [Server authentication](https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/supabase/server.ts): `src/server/supabase/server.ts`
- [Abuse verification](https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/abuse/turnstile.ts): `src/server/abuse/turnstile.ts`
- **Cloudflare Turnstile**

### Administration

- [Admin console](https://github.com/exit-that-lies-game/shipstory/blob/main/src/app/admin/page.tsx): `src/app/admin/page.tsx`
- [Access management](https://github.com/exit-that-lies-game/shipstory/blob/main/src/components/admin/AccessManager.tsx): `src/components/admin/AccessManager.tsx`
- [Admin actions](https://github.com/exit-that-lies-game/shipstory/blob/main/src/server/admin/actions.ts): `src/server/admin/actions.ts`

### Other components

- **Makers**

## Connections

- Makers → Browse projects: browse work
- Makers → Project wizard: post projects
- Makers → Community actions: like and save
- Makers → Follow makers: follow makers
- Makers → Project comments: comment on work
- Browse projects → Data access: loads project data
- Project and profile pages → Data access: loads project data
- Search projects → Data access: searches data
- Data access → Supabase data source: selects source (evidence: `src/server/data/index.ts`)
- Data access → Mock data source: selects source (evidence: `src/server/data/index.ts`)
- Supabase data source → Server authentication: uses server client (evidence: `src/server/data/supabase-source.ts`)
- Supabase data source → R2 media storage: uses media URLs (evidence: `src/server/data/supabase-source.ts`)
- Server authentication → Supabase: auth and database
- Project wizard → Review and visibility: shows review
- Review and visibility → Visibility options: renders options (evidence: `src/components/wizard/StepReview.tsx`)
- Review and visibility → Publish project: publishes project
- Visibility options → Supabase: checks visibility
- Publish project → Server authentication: uses browser client (evidence: `src/lib/actions/publish.ts`)
- Publish project → Supabase: writes project
- Media signing and cleanup → R2 media storage: signs and deletes (evidence: `src/app/api/media/sign/route.ts`)
- R2 media storage → Request signing: presigns requests (evidence: `src/server/storage/r2.ts`)
- GitHub callback → GitHub connection: validates connection (evidence: `src/app/api/github/callback/route.ts`)
- GitHub connection → Server authentication: checks user (evidence: `src/server/github/github-app.ts`)
- GitHub connection → GitHub import: uses identity helper (evidence: `src/server/github/github-app.ts`)
- Authentication routes → Server authentication: gets user (evidence: `src/app/api/auth/start/route.ts`)
- Authentication routes → Abuse verification: verifies signup (evidence: `src/app/api/auth/start/route.ts`)
- Abuse verification → Cloudflare Turnstile: verifies token (evidence: `src/server/abuse/turnstile.ts`)
- Admin console → Access management: manages access
- Access management → Admin actions: grants or revokes (evidence: `src/components/admin/AccessManager.tsx`)
