# kanokiw/shishiji architecture

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

- Interactive diagram: https://gitdiagram.com/kanokiw/shishiji
- Repository: https://github.com/kanokiw/shishiji

## Overview

Diverge is a festival web application for discovering exhibits on venue maps, reading organization articles, participating in activities for points and rewards, following live events, and letting organizers edit exhibit content. Its main server routes user and organizer requests into authentication, exhibit, activity, and file services. The repository also contains separately documented Minecraft plugins/datapacks and development extensions. Some subsystem behavior is represented by directory paths because its implementation was not excerpted; links are limited to documented or indexed references.

Main entry points: [`src/server/drought.ts`](https://github.com/kanokiw/shishiji/blob/main/src/server/drought.ts) (Server runtime), [`src/server/app.ts`](https://github.com/kanokiw/shishiji/blob/main/src/server/app.ts) (HTTP routes), [`src/server/handler/user/user.ts`](https://github.com/kanokiw/shishiji/blob/main/src/server/handler/user/user.ts) (User profiles), [`src/server/handler/org/orgument.ts`](https://github.com/kanokiw/shishiji/blob/main/src/server/handler/org/orgument.ts) (Exhibit articles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_server["Web server"]
  node_app["HTTP routes<br/>[app.ts]"]
  node_runtime["Server runtime<br/>[drought.ts]"]
  node_shared["Shared utilities<br/>[utils.ts]"]
  node_live["Live event updates<br/>[ws.ts]"]
end

subgraph group_visitor["Visitor features"]
  node_mapdata[("Map objects<br/>[mapobjs.ts]")]
  node_userauth["User accounts<br/>[auth.ts]"]
  node_user["User profiles<br/>[user.ts]"]
  node_activity["Points and missions<br/>[activity.ts]"]
  node_tickets["Tickets<br/>[ticket.ts]"]
  node_search["Exhibit search"]
end

subgraph group_organizer["Organizer features"]
  node_orgauth["Organizer access<br/>[auth.ts]"]
  node_orgcontent["Exhibit articles<br/>[orgument.ts]"]
  node_orgfiles["Organizer files<br/>[cloud.ts]"]
  node_orgedit["Exhibit editing<br/>[edit.ts]"]
end

subgraph group_extras["Other projects"]
  node_extensions["Development extensions"]
  node_party["Party plugin<br/>[Party.java]"]
  node_party_events["Party events<br/>[Events.java]"]
  node_party_commands["Party commands<br/>[Mmbetac.java]"]
  node_slayer["Sushida Slayer<br/>[Start.java]"]
  node_minecraft_other["Other Minecraft tools"]
end

node_visitors(("Festival visitors"))
node_organizers(("Exhibit organizers"))

node_visitors -->|"request routes"| node_app
node_organizers -->|"request routes"| node_app
node_app -->|"routes through"| node_runtime
node_app -->|"imports map API"| node_mapdata
node_runtime -->|"instantiates"| node_orgauth
node_runtime -->|"instantiates"| node_orgedit
node_runtime -->|"instantiates"| node_orgfiles
node_runtime -->|"instantiates"| node_userauth
node_runtime -->|"instantiates"| node_activity
node_runtime -->|"imports utilities"| node_shared
node_runtime -->|"creates WebSocket server"| node_live
node_userauth -->|"uses user data"| node_user
node_user -->|"uses activity"| node_activity
node_orgauth -->|"reads map data"| node_mapdata
node_orgcontent -->|"imports WebSocket server"| node_live
node_orgcontent -->|"reads user data"| node_user
node_app -.->|"serves search routes"| node_search
node_party -->|"uses event listener"| node_party_events
node_party -->|"uses command"| node_party_commands

click node_app "https://github.com/kanokiw/shishiji/blob/main/src/server/app.ts"
click node_runtime "https://github.com/kanokiw/shishiji/blob/main/src/server/drought.ts"
click node_shared "https://github.com/kanokiw/shishiji/blob/main/src/server/utils.ts"
click node_mapdata "https://github.com/kanokiw/shishiji/blob/main/src/server/mapobjs.ts"
click node_userauth "https://github.com/kanokiw/shishiji/blob/main/src/server/handler/user/auth.ts"
click node_user "https://github.com/kanokiw/shishiji/blob/main/src/server/handler/user/user.ts"
click node_activity "https://github.com/kanokiw/shishiji/blob/main/src/server/handler/user/activity.ts"
click node_tickets "https://github.com/kanokiw/shishiji/blob/main/src/server/handler/misc/ticket.ts"
click node_orgauth "https://github.com/kanokiw/shishiji/blob/main/src/server/handler/org/auth.ts"
click node_orgcontent "https://github.com/kanokiw/shishiji/blob/main/src/server/handler/org/orgument.ts"
click node_orgfiles "https://github.com/kanokiw/shishiji/blob/main/src/server/handler/org/cloud.ts"
click node_orgedit "https://github.com/kanokiw/shishiji/blob/main/src/server/handler/org/edit.ts"
click node_live "https://github.com/kanokiw/shishiji/blob/main/src/server/ws.ts"
click node_search "https://github.com/kanokiw/shishiji/tree/main/src/server/search"
click node_extensions "https://github.com/kanokiw/shishiji/tree/main/extensions"
click node_party "https://github.com/kanokiw/shishiji/blob/main/minecraft/plugins/Party/src/main/java/com/kanokiw/mc/party/Party.java"
click node_party_events "https://github.com/kanokiw/shishiji/blob/main/minecraft/plugins/Party/src/main/java/com/kanokiw/mc/party/Events.java"
click node_party_commands "https://github.com/kanokiw/shishiji/blob/main/minecraft/plugins/Party/src/main/java/com/kanokiw/mc/party/Mmbetac.java"
click node_slayer "https://github.com/kanokiw/shishiji/blob/main/minecraft/plugins/Sushida_Slayer/src/main/java/com/kanokiw/mc/sushida/Start.java"
click node_minecraft_other "https://github.com/kanokiw/shishiji/tree/main/minecraft"

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_runtime,node_shared,node_live toneBlue
class node_mapdata,node_userauth,node_user,node_activity,node_tickets,node_search toneAmber
class node_orgauth,node_orgcontent,node_orgfiles,node_orgedit toneMint
class node_extensions,node_party,node_party_events,node_party_commands,node_slayer,node_minecraft_other toneRose
class node_visitors,node_organizers toneIndigo
```

## Components

### Web server

- [HTTP routes](https://github.com/kanokiw/shishiji/blob/main/src/server/app.ts): `src/server/app.ts`
- [Server runtime](https://github.com/kanokiw/shishiji/blob/main/src/server/drought.ts): `src/server/drought.ts`
- [Shared utilities](https://github.com/kanokiw/shishiji/blob/main/src/server/utils.ts): `src/server/utils.ts`
- [Live event updates](https://github.com/kanokiw/shishiji/blob/main/src/server/ws.ts): `src/server/ws.ts`

### Visitor features

- [Map objects](https://github.com/kanokiw/shishiji/blob/main/src/server/mapobjs.ts): `src/server/mapobjs.ts`
- [User accounts](https://github.com/kanokiw/shishiji/blob/main/src/server/handler/user/auth.ts): `src/server/handler/user/auth.ts`
- [User profiles](https://github.com/kanokiw/shishiji/blob/main/src/server/handler/user/user.ts): `src/server/handler/user/user.ts`
- [Points and missions](https://github.com/kanokiw/shishiji/blob/main/src/server/handler/user/activity.ts): `src/server/handler/user/activity.ts`
- [Tickets](https://github.com/kanokiw/shishiji/blob/main/src/server/handler/misc/ticket.ts): `src/server/handler/misc/ticket.ts`
- [Exhibit search](https://github.com/kanokiw/shishiji/tree/main/src/server/search): `src/server/search`

### Organizer features

- [Organizer access](https://github.com/kanokiw/shishiji/blob/main/src/server/handler/org/auth.ts): `src/server/handler/org/auth.ts`
- [Exhibit articles](https://github.com/kanokiw/shishiji/blob/main/src/server/handler/org/orgument.ts): `src/server/handler/org/orgument.ts`
- [Organizer files](https://github.com/kanokiw/shishiji/blob/main/src/server/handler/org/cloud.ts): `src/server/handler/org/cloud.ts`
- [Exhibit editing](https://github.com/kanokiw/shishiji/blob/main/src/server/handler/org/edit.ts): `src/server/handler/org/edit.ts`

### Other projects

- [Development extensions](https://github.com/kanokiw/shishiji/tree/main/extensions): `extensions`
- [Party plugin](https://github.com/kanokiw/shishiji/blob/main/minecraft/plugins/Party/src/main/java/com/kanokiw/mc/party/Party.java): `minecraft/plugins/Party/src/main/java/com/kanokiw/mc/party/Party.java`
- [Party events](https://github.com/kanokiw/shishiji/blob/main/minecraft/plugins/Party/src/main/java/com/kanokiw/mc/party/Events.java): `minecraft/plugins/Party/src/main/java/com/kanokiw/mc/party/Events.java`
- [Party commands](https://github.com/kanokiw/shishiji/blob/main/minecraft/plugins/Party/src/main/java/com/kanokiw/mc/party/Mmbetac.java): `minecraft/plugins/Party/src/main/java/com/kanokiw/mc/party/Mmbetac.java`
- [Sushida Slayer](https://github.com/kanokiw/shishiji/blob/main/minecraft/plugins/Sushida_Slayer/src/main/java/com/kanokiw/mc/sushida/Start.java): `minecraft/plugins/Sushida_Slayer/src/main/java/com/kanokiw/mc/sushida/Start.java`
- [Other Minecraft tools](https://github.com/kanokiw/shishiji/tree/main/minecraft): `minecraft`

### Other components

- **Festival visitors**
- **Exhibit organizers**

## Connections

- Festival visitors → HTTP routes: request routes (evidence: `src/server/app.ts`)
- Exhibit organizers → HTTP routes: request routes (evidence: `src/server/app.ts`)
- HTTP routes → Server runtime: routes through (evidence: `src/server/app.ts`)
- HTTP routes → Map objects: imports map API (evidence: `src/server/app.ts`)
- Server runtime → Organizer access: instantiates (evidence: `src/server/drought.ts`)
- Server runtime → Exhibit editing: instantiates (evidence: `src/server/drought.ts`)
- Server runtime → Organizer files: instantiates (evidence: `src/server/drought.ts`)
- Server runtime → User accounts: instantiates (evidence: `src/server/drought.ts`)
- Server runtime → Points and missions: instantiates (evidence: `src/server/drought.ts`)
- Server runtime → Shared utilities: imports utilities (evidence: `src/server/drought.ts`)
- Server runtime → Live event updates: creates WebSocket server (evidence: `src/server/drought.ts`)
- User accounts → User profiles: uses user data (evidence: `src/server/handler/user/auth.ts`)
- User profiles → Points and missions: uses activity (evidence: `src/server/handler/user/user.ts`)
- Organizer access → Map objects: reads map data (evidence: `src/server/handler/org/auth.ts`)
- Exhibit articles → Live event updates: imports WebSocket server (evidence: `src/server/handler/org/orgument.ts`)
- Exhibit articles → User profiles: reads user data (evidence: `src/server/handler/org/orgument.ts`)
- HTTP routes → Exhibit search: serves search routes
- Party plugin → Party events: uses event listener (evidence: `minecraft/plugins/Party/src/main/java/com/kanokiw/mc/party/Events.java`)
- Party plugin → Party commands: uses command (evidence: `minecraft/plugins/Party/src/main/java/com/kanokiw/mc/party/Party.java`)
