# nisheri-ascar/kurisu architecture

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

- Interactive diagram: https://gitdiagram.com/nisheri-ascar/kurisu
- Repository: https://github.com/nisheri-ascar/kurisu

## Overview

Kurisu is a Discord bot for starting and checking a Minecraft server that may be shut down when idle. A user invokes the server start command; the bot launches the configured start script, checks a local remote-shell endpoint, then checks public Minecraft-server availability and reports progress. The bot also exposes a server-status command and serves a small website. The startup script and remote-shell implementation are not present in the tree, so their internals are not mapped.

Main entry points: [`backend_interaction/start_remote.py`](https://github.com/nisheri-ascar/kurisu/blob/main/backend_interaction/start_remote.py) (Start orchestration), [`cogs/minecraft.py`](https://github.com/nisheri-ascar/kurisu/blob/main/cogs/minecraft.py) (Minecraft commands), [`main.py`](https://github.com/nisheri-ascar/kurisu/blob/main/main.py) (Bot entry point), [`server_status.py`](https://github.com/nisheri-ascar/kurisu/blob/main/server_status.py) (Status checker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discord["Discord interface"]
  node_main["Bot entry point<br/>[main.py]"]
  node_minecraft["Minecraft commands<br/>[minecraft.py]"]
  node_config["Runtime config<br/>[config.py]"]
end

subgraph group_startup["Server startup"]
  node_start["Start orchestration<br/>[start_remote.py]"]
  node_script["Script launcher<br/>[script_handler.py]"]
  node_styling["Progress formatting<br/>[styling.py]"]
end

subgraph group_status["Availability checks"]
  node_status_check["Status checker<br/>[server_status.py]"]
end

subgraph group_web["Web serving"]
  node_http_server["Static HTTP server<br/>[dummy_http.py]"]
  node_website["Website files<br/>[index.html]"]
end

node_user(("Discord user"))
node_discord(("Discord platform"))
node_server_script["Server start script"]
node_remote_shell["Remote shell"]
node_minecraft_server["Minecraft server"]

node_user -->|"invokes commands"| node_discord
node_discord -->|"dispatches commands"| node_minecraft
node_main -->|"loads extension"| node_minecraft
node_main -->|"reads settings"| node_config
node_minecraft -->|"starts server"| node_start
node_minecraft -->|"checks status"| node_status_check
node_start -->|"launches script"| node_script
node_script -->|"runs"| node_server_script
node_start -->|"checks HTTP"| node_remote_shell
node_start -->|"checks availability"| node_status_check
node_status_check -->|"queries status"| node_minecraft_server
node_start -->|"formats progress"| node_styling
node_main -->|"starts thread"| node_http_server
node_http_server -->|"serves files"| node_website

click node_main "https://github.com/nisheri-ascar/kurisu/blob/main/main.py"
click node_minecraft "https://github.com/nisheri-ascar/kurisu/blob/main/cogs/minecraft.py"
click node_config "https://github.com/nisheri-ascar/kurisu/blob/main/config.py"
click node_start "https://github.com/nisheri-ascar/kurisu/blob/main/backend_interaction/start_remote.py"
click node_script "https://github.com/nisheri-ascar/kurisu/blob/main/script_handler.py"
click node_status_check "https://github.com/nisheri-ascar/kurisu/blob/main/server_status.py"
click node_styling "https://github.com/nisheri-ascar/kurisu/blob/main/styling.py"
click node_http_server "https://github.com/nisheri-ascar/kurisu/blob/main/dummy_http.py"
click node_website "https://github.com/nisheri-ascar/kurisu/blob/main/website/index.html"

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_main,node_minecraft,node_config,node_user toneBlue
class node_start,node_script,node_styling toneAmber
class node_status_check,node_server_script,node_minecraft_server toneMint
class node_http_server,node_website toneRose
class node_discord,node_remote_shell toneIndigo
```

## Components

### Discord interface

- [Bot entry point](https://github.com/nisheri-ascar/kurisu/blob/main/main.py): `main.py`
- [Minecraft commands](https://github.com/nisheri-ascar/kurisu/blob/main/cogs/minecraft.py): `cogs/minecraft.py`
- [Runtime config](https://github.com/nisheri-ascar/kurisu/blob/main/config.py): `config.py`

### Server startup

- [Start orchestration](https://github.com/nisheri-ascar/kurisu/blob/main/backend_interaction/start_remote.py): `backend_interaction/start_remote.py`
- [Script launcher](https://github.com/nisheri-ascar/kurisu/blob/main/script_handler.py): `script_handler.py`
- [Progress formatting](https://github.com/nisheri-ascar/kurisu/blob/main/styling.py): `styling.py`

### Availability checks

- [Status checker](https://github.com/nisheri-ascar/kurisu/blob/main/server_status.py): `server_status.py`

### Web serving

- [Static HTTP server](https://github.com/nisheri-ascar/kurisu/blob/main/dummy_http.py): `dummy_http.py`
- [Website files](https://github.com/nisheri-ascar/kurisu/blob/main/website/index.html): `website/index.html`

### Other components

- **Discord user**
- **Discord platform**
- **Server start script**
- **Remote shell**
- **Minecraft server**

## Connections

- Discord user → Discord platform: invokes commands
- Discord platform → Minecraft commands: dispatches commands
- Bot entry point → Minecraft commands: loads extension
- Bot entry point → Runtime config: reads settings
- Minecraft commands → Start orchestration: starts server
- Minecraft commands → Status checker: checks status
- Start orchestration → Script launcher: launches script
- Script launcher → Server start script: runs
- Start orchestration → Remote shell: checks HTTP
- Start orchestration → Status checker: checks availability
- Status checker → Minecraft server: queries status
- Start orchestration → Progress formatting: formats progress
- Bot entry point → Static HTTP server: starts thread
- Static HTTP server → Website files: serves files
