# amamiyaakina/djmax_hoshinobot architecture

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

- Interactive diagram: https://gitdiagram.com/amamiyaakina/djmax_hoshinobot
- Repository: https://github.com/amamiyaakina/djmax_hoshinobot

## Overview

DJMAX_HoshinoBot is a HoshinoBot/Nonebot plugin for querying DJMAX Respect V scores and returning generated score-table images. The workflow is command parsing and dispatch, optional V-Archive ID lookup/binding, score-table generation, then image delivery. README documents the supported table variants; the available source excerpt shows representative generator calls, DLC lookup, binding persistence, and image sending, but not every handler implementation.

Main entry points: [`main.py`](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py) (Command parsing), [`deps/djmax_bests_generate`](https://github.com/amamiyaakina/djmax_hoshinobot/tree/main/deps/djmax_bests_generate) (Table generation), [`djmax_bind_data.json`](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/djmax_bind_data.json) (ID bindings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commands["Bot commands"]
  node_command_dispatch["Command parsing<br/>[main.py]"]
end

subgraph group_scores["Score tables"]
  node_b100["B100 table<br/>[main.py]"]
  node_difficulty["Difficulty table<br/>[main.py]"]
  node_pack["Pack table<br/>[main.py]"]
  node_new_table["New songs<br/>[main.py]"]
  node_pp["Perfect Play<br/>[main.py]"]
  node_theory["Theory B100<br/>[main.py]"]
  node_dlc_list["DLC listing<br/>[main.py]"]
  node_table_generator["Table generation"]
end

subgraph group_accounts["Player accounts"]
  node_account_handlers["Bind handlers<br/>[main.py]"]
  node_binding_store[("ID bindings")]
end

subgraph group_delivery["Image delivery"]
  node_image_output["Image output<br/>[main.py]"]
end

node_player(("Player"))
node_v_archive["V-Archive"]

node_player -->|"sends command"| node_command_dispatch
node_command_dispatch -->|"dispatches bind"| node_account_handlers
node_account_handlers -->|"reads and writes"| node_binding_store
node_command_dispatch -->|"dispatches query"| node_b100
node_command_dispatch -->|"dispatches query"| node_difficulty
node_command_dispatch -->|"dispatches query"| node_pack
node_command_dispatch -->|"dispatches query"| node_new_table
node_command_dispatch -.->|"dispatches query"| node_pp
node_command_dispatch -.->|"dispatches query"| node_theory
node_command_dispatch -.->|"dispatches query"| node_dlc_list
node_b100 -->|"generates table"| node_table_generator
node_difficulty -->|"generates table"| node_table_generator
node_pack -.->|"generates table"| node_table_generator
node_new_table -->|"generates table"| node_table_generator
node_pp -.->|"generates table"| node_table_generator
node_theory -.->|"generates table"| node_table_generator
node_dlc_list -->|"fetches DLCs"| node_v_archive
node_pack -->|"validates DLC code"| node_v_archive
node_table_generator -.->|"retrieves scores"| node_v_archive
node_b100 -.->|"sends image"| node_image_output
node_difficulty -->|"saves and sends"| node_image_output
node_new_table -->|"saves and sends"| node_image_output
node_player -.->|"receives image"| node_image_output

click node_command_dispatch "https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py"
click node_account_handlers "https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py"
click node_binding_store "https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/djmax_bind_data.json"
click node_b100 "https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py"
click node_difficulty "https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py"
click node_pack "https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py"
click node_new_table "https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py"
click node_pp "https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py"
click node_theory "https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py"
click node_dlc_list "https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py"
click node_table_generator "https://github.com/amamiyaakina/djmax_hoshinobot/tree/main/deps/djmax_bests_generate"
click node_image_output "https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py"

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_command_dispatch toneBlue
class node_b100,node_difficulty,node_pack,node_new_table,node_pp,node_theory,node_dlc_list,node_table_generator toneAmber
class node_account_handlers,node_binding_store toneMint
class node_image_output toneRose
class node_player,node_v_archive toneIndigo
```

## Components

### Bot commands

- [Command parsing](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py): `main.py`

### Score tables

- [B100 table](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py): `main.py`
- [Difficulty table](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py): `main.py`
- [Pack table](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py): `main.py`
- [New songs](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py): `main.py`
- [Perfect Play](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py): `main.py`
- [Theory B100](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py): `main.py`
- [DLC listing](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py): `main.py`
- [Table generation](https://github.com/amamiyaakina/djmax_hoshinobot/tree/main/deps/djmax_bests_generate): `deps/djmax_bests_generate`

### Player accounts

- [Bind handlers](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py): `main.py`
- [ID bindings](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/djmax_bind_data.json): `djmax_bind_data.json`

### Image delivery

- [Image output](https://github.com/amamiyaakina/djmax_hoshinobot/blob/main/main.py): `main.py`

### Other components

- **Player**
- **V-Archive**

## Connections

- Player → Command parsing: sends command (evidence: `README.md`)
- Command parsing → Bind handlers: dispatches bind (evidence: `main.py`)
- Bind handlers → ID bindings: reads and writes (evidence: `main.py`)
- Command parsing → B100 table: dispatches query (evidence: `main.py`)
- Command parsing → Difficulty table: dispatches query (evidence: `main.py`)
- Command parsing → Pack table: dispatches query (evidence: `main.py`)
- Command parsing → New songs: dispatches query (evidence: `main.py`)
- Command parsing → Perfect Play: dispatches query (evidence: `README.md`)
- Command parsing → Theory B100: dispatches query (evidence: `README.md`)
- Command parsing → DLC listing: dispatches query (evidence: `README.md`)
- B100 table → Table generation: generates table (evidence: `main.py`)
- Difficulty table → Table generation: generates table (evidence: `main.py`)
- Pack table → Table generation: generates table (evidence: `README.md`)
- New songs → Table generation: generates table (evidence: `main.py`)
- Perfect Play → Table generation: generates table (evidence: `README.md`)
- Theory B100 → Table generation: generates table (evidence: `README.md`)
- DLC listing → V-Archive: fetches DLCs (evidence: `main.py`)
- Pack table → V-Archive: validates DLC code (evidence: `main.py`)
- Table generation → V-Archive: retrieves scores
- B100 table → Image output: sends image (evidence: `main.py`)
- Difficulty table → Image output: saves and sends (evidence: `main.py`)
- New songs → Image output: saves and sends (evidence: `main.py`)
- Player → Image output: receives image
