# aho0526/rowpilot-support architecture

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

- Interactive diagram: https://gitdiagram.com/aho0526/rowpilot-support
- Repository: https://github.com/aho0526/rowpilot-support

## Overview

This repository combines RowPilot’s public, multilingual rowing-product website with browser tools for essay review, school application review, event counting, and games. The clearest end-to-end workflow is the essay-review tool: students and teachers use its interface to edit essays, request versions, and manage reviews; the app coordinates its editor, comments, and version-diff display through an API client. The source index supports the shown module dependencies, but backend implementation details and most standalone game behavior were not excerpted, so their internal connections are omitted.

Main entry points: [`dev/document/js/app.js`](https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/app.js) (Essay workflow), [`dev/statement-of-purpose/js/app.js`](https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/app.js) (Application workflow), [`dev/document/js/api.js`](https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/api.js) (Essay API client), [`document-worker/src/index.js`](https://github.com/aho0526/rowpilot-support/blob/main/document-worker/src/index.js) (Review service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Public website"]
  node_website["RowPilot site<br/>[index.html]"]
  node_localized["Localized pages<br/>[index.html]"]
end

subgraph group_essay["Essay review"]
  node_essay_app["Essay workflow<br/>[app.js]"]
  node_essay_editor["Essay editor<br/>[editor.js]"]
  node_essay_comments["Review comments<br/>[comments.js]"]
  node_essay_diff["Version comparison<br/>[diff.js]"]
  node_essay_device["Local drafts<br/>[device.js]"]
  node_essay_api["Essay API client<br/>[api.js]"]
  node_essay_service["Review service<br/>[index.js]"]
  node_essay_store[("Review database<br/>[schema.sql]")]
end

subgraph group_sop["Application review"]
  node_sop_app["Application workflow<br/>[app.js]"]
  node_sop_editor["Application editor<br/>[editor.js]"]
  node_sop_comments["Application comments<br/>[comments.js]"]
  node_sop_paper["Paper manager<br/>[paper.js]"]
  node_sop_device["Device drafts<br/>[device.js]"]
  node_sop_api["Application API client<br/>[api.js]"]
end

subgraph group_counter["Event counting"]
  node_counter_app["Counting interface<br/>[app.js]"]
  node_counter_api["Counting API client<br/>[api.js]"]
end

subgraph group_games["Games"]
  node_crime_game["Crime-avoiding game<br/>[game.js]"]
  node_simple_game["Stage game<br/>[main.js]"]
  node_trial_tool["Trial admission tool<br/>[core.js]"]
end

node_visitor(("Site visitor"))
node_student_teacher(("Student / teacher"))
node_applicant(("Applicant / reviewer"))
node_counter_user(("Event staff"))

node_visitor -.->|"visits"| node_website
node_student_teacher -.->|"uses"| node_essay_app
node_essay_app -->|"uses"| node_essay_editor
node_essay_app -->|"uses"| node_essay_comments
node_essay_app -->|"renders"| node_essay_diff
node_essay_app -->|"saves drafts"| node_essay_device
node_essay_app -->|"requests data"| node_essay_api
node_essay_editor -->|"saves essay"| node_essay_api
node_essay_comments -->|"updates review"| node_essay_api
node_essay_api -.->|"calls service"| node_essay_service
node_essay_service -.->|"uses database"| node_essay_store
node_applicant -.->|"uses"| node_sop_app
node_sop_app -->|"uses"| node_sop_editor
node_sop_app -->|"uses"| node_sop_comments
node_sop_app -->|"uses"| node_sop_paper
node_sop_app -->|"saves drafts"| node_sop_device
node_sop_app -->|"requests data"| node_sop_api
node_sop_editor -->|"saves application"| node_sop_api
node_sop_comments -->|"updates review"| node_sop_api
node_counter_user -.->|"uses"| node_counter_app
node_counter_app -->|"loads and saves"| node_counter_api
node_counter_api -.->|"HTTP requests"| node_essay_service

click node_website "https://github.com/aho0526/rowpilot-support/blob/main/index.html"
click node_localized "https://github.com/aho0526/rowpilot-support/blob/main/en/index.html"
click node_essay_app "https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/app.js"
click node_essay_editor "https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/editor.js"
click node_essay_comments "https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/comments.js"
click node_essay_diff "https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/diff.js"
click node_essay_device "https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/device.js"
click node_essay_api "https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/api.js"
click node_essay_service "https://github.com/aho0526/rowpilot-support/blob/main/document-worker/src/index.js"
click node_essay_store "https://github.com/aho0526/rowpilot-support/blob/main/document-worker/schema.sql"
click node_sop_app "https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/app.js"
click node_sop_editor "https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/editor.js"
click node_sop_comments "https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/comments.js"
click node_sop_paper "https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/paper.js"
click node_sop_device "https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/device.js"
click node_sop_api "https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/api.js"
click node_counter_app "https://github.com/aho0526/rowpilot-support/blob/main/dev/count/js/app.js"
click node_counter_api "https://github.com/aho0526/rowpilot-support/blob/main/dev/count/js/api.js"
click node_crime_game "https://github.com/aho0526/rowpilot-support/blob/main/dev/crime-avoiding-game/game.js"
click node_simple_game "https://github.com/aho0526/rowpilot-support/blob/main/dev/game/main.js"
click node_trial_tool "https://github.com/aho0526/rowpilot-support/blob/main/dev/trial-admission/core.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_website,node_localized,node_applicant toneBlue
class node_essay_app,node_essay_editor,node_essay_comments,node_essay_diff,node_essay_device,node_essay_api,node_essay_service,node_essay_store toneAmber
class node_sop_app,node_sop_editor,node_sop_comments,node_sop_paper,node_sop_device,node_sop_api toneMint
class node_counter_app,node_counter_api toneRose
class node_crime_game,node_simple_game,node_trial_tool,node_visitor,node_student_teacher,node_counter_user toneIndigo
```

## Components

### Public website

- [RowPilot site](https://github.com/aho0526/rowpilot-support/blob/main/index.html): `index.html`
- [Localized pages](https://github.com/aho0526/rowpilot-support/blob/main/en/index.html): `en/index.html`

### Essay review

- [Essay workflow](https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/app.js): `dev/document/js/app.js`
- [Essay editor](https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/editor.js): `dev/document/js/editor.js`
- [Review comments](https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/comments.js): `dev/document/js/comments.js`
- [Version comparison](https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/diff.js): `dev/document/js/diff.js`
- [Local drafts](https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/device.js): `dev/document/js/device.js`
- [Essay API client](https://github.com/aho0526/rowpilot-support/blob/main/dev/document/js/api.js): `dev/document/js/api.js`
- [Review service](https://github.com/aho0526/rowpilot-support/blob/main/document-worker/src/index.js): `document-worker/src/index.js`
- [Review database](https://github.com/aho0526/rowpilot-support/blob/main/document-worker/schema.sql): `document-worker/schema.sql`

### Application review

- [Application workflow](https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/app.js): `dev/statement-of-purpose/js/app.js`
- [Application editor](https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/editor.js): `dev/statement-of-purpose/js/editor.js`
- [Application comments](https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/comments.js): `dev/statement-of-purpose/js/comments.js`
- [Paper manager](https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/paper.js): `dev/statement-of-purpose/js/paper.js`
- [Device drafts](https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/device.js): `dev/statement-of-purpose/js/device.js`
- [Application API client](https://github.com/aho0526/rowpilot-support/blob/main/dev/statement-of-purpose/js/api.js): `dev/statement-of-purpose/js/api.js`

### Event counting

- [Counting interface](https://github.com/aho0526/rowpilot-support/blob/main/dev/count/js/app.js): `dev/count/js/app.js`
- [Counting API client](https://github.com/aho0526/rowpilot-support/blob/main/dev/count/js/api.js): `dev/count/js/api.js`

### Games

- [Crime-avoiding game](https://github.com/aho0526/rowpilot-support/blob/main/dev/crime-avoiding-game/game.js): `dev/crime-avoiding-game/game.js`
- [Stage game](https://github.com/aho0526/rowpilot-support/blob/main/dev/game/main.js): `dev/game/main.js`
- [Trial admission tool](https://github.com/aho0526/rowpilot-support/blob/main/dev/trial-admission/core.js): `dev/trial-admission/core.js`

### Other components

- **Site visitor**
- **Student / teacher**
- **Applicant / reviewer**
- **Event staff**

## Connections

- Site visitor → RowPilot site: visits
- Student / teacher → Essay workflow: uses
- Essay workflow → Essay editor: uses (evidence: `dev/document/js/app.js`)
- Essay workflow → Review comments: uses (evidence: `dev/document/js/app.js`)
- Essay workflow → Version comparison: renders (evidence: `dev/document/js/app.js`)
- Essay workflow → Local drafts: saves drafts (evidence: `dev/document/js/app.js`)
- Essay workflow → Essay API client: requests data (evidence: `dev/document/js/app.js`)
- Essay editor → Essay API client: saves essay (evidence: `dev/document/js/editor.js`)
- Review comments → Essay API client: updates review (evidence: `dev/document/js/comments.js`)
- Essay API client → Review service: calls service
- Review service → Review database: uses database
- Applicant / reviewer → Application workflow: uses
- Application workflow → Application editor: uses (evidence: `dev/statement-of-purpose/js/app.js`)
- Application workflow → Application comments: uses (evidence: `dev/statement-of-purpose/js/app.js`)
- Application workflow → Paper manager: uses (evidence: `dev/statement-of-purpose/js/app.js`)
- Application workflow → Device drafts: saves drafts (evidence: `dev/statement-of-purpose/js/app.js`)
- Application workflow → Application API client: requests data (evidence: `dev/statement-of-purpose/js/app.js`)
- Application editor → Application API client: saves application (evidence: `dev/statement-of-purpose/js/editor.js`)
- Application comments → Application API client: updates review (evidence: `dev/statement-of-purpose/js/comments.js`)
- Event staff → Counting interface: uses
- Counting interface → Counting API client: loads and saves (evidence: `dev/count/js/app.js`)
- Counting API client → Review service: HTTP requests
