# shahinahmedrafi01-pro/test-001 architecture

> Architecture diagram of the GitHub repository shahinahmedrafi01-pro/test-001, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shahinahmedrafi01-pro/test-001
- Repository: https://github.com/shahinahmedrafi01-pro/test-001

## Overview

This repository is a small collection of browser games and standalone Discord/Minecraft bots, rather than one unified application. The clearest user-facing path is the arcade hub cataloging and launching games; separate bot runtimes provide music playback and Minecraft automation/Discord controls. The README also names Dino Run and Pixel Kingdom, but the supplied tree has no corresponding implementation paths, so those capabilities cannot be mapped here. Edges are limited to relationships shown in excerpts, the source index, or README; unsampled subsystems are represented only where their paths are explicit.

Main entry points: [`mc-bot/bot.js`](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/mc-bot/bot.js) (Bot lifecycle), [`discord-music/bot.js`](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/discord-music/bot.js) (Music bot), [`arcade.js`](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/arcade.js) (Arcade hub), [`police-chase/game.js`](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/police-chase/game.js) (Police Chase)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_arcade["Arcade games"]
  node_arcadehub["Arcade hub<br/>[arcade.js]"]
  node_police["Police Chase<br/>[game.js]"]
  node_galaxy["Galaxy Defender<br/>[game.js]"]
end

subgraph group_minecraft["Minecraft bot"]
  node_mcmain["Bot lifecycle<br/>[bot.js]"]
  node_panel["Panel command parser<br/>[panel-commands.js]"]
  node_pvp["PvP brain<br/>[pvp-brain.js]"]
end

subgraph group_discordmusic["Discord music"]
  node_musicbot["Music bot<br/>[bot.js]"]
end

subgraph group_commerce["Shop backend"]
  node_shopbackend["Shop backend<br/>[Code.gs]"]
  node_supabase[("Supabase schema<br/>[schema.sql]")]
  node_dailyclaim["Daily claim migration"]
end

node_player(("Player"))
node_mcuser(("Discord / MC users"))
node_discord["Discord service"]
node_minecraftserver["Minecraft server"]
node_musicuser(("Discord listeners"))
node_audiofetch["Audio extraction"]
node_voice["Discord voice"]

node_player -->|"browses"| node_arcadehub
node_arcadehub -->|"routes to"| node_police
node_mcuser -->|"sends commands"| node_discord
node_mcmain -->|"parses commands"| node_panel
node_mcmain -->|"attaches brain"| node_pvp
node_mcmain -->|"controls bot"| node_minecraftserver
node_mcmain -->|"bridges messages"| node_discord
node_musicuser -->|"sends commands"| node_discord
node_musicbot -->|"extracts audio"| node_audiofetch
node_musicbot -->|"plays stream"| node_voice

click node_arcadehub "https://github.com/shahinahmedrafi01-pro/test-001/blob/main/arcade.js"
click node_police "https://github.com/shahinahmedrafi01-pro/test-001/blob/main/police-chase/game.js"
click node_galaxy "https://github.com/shahinahmedrafi01-pro/test-001/blob/main/galaxy-defender/game.js"
click node_mcmain "https://github.com/shahinahmedrafi01-pro/test-001/blob/main/mc-bot/bot.js"
click node_panel "https://github.com/shahinahmedrafi01-pro/test-001/blob/main/mc-bot/lib/panel-commands.js"
click node_pvp "https://github.com/shahinahmedrafi01-pro/test-001/blob/main/mc-bot/lib/pvp-brain.js"
click node_musicbot "https://github.com/shahinahmedrafi01-pro/test-001/blob/main/discord-music/bot.js"
click node_shopbackend "https://github.com/shahinahmedrafi01-pro/test-001/blob/main/shop-backend/Code.gs"
click node_supabase "https://github.com/shahinahmedrafi01-pro/test-001/blob/main/supabase/schema.sql"
click node_dailyclaim "https://github.com/shahinahmedrafi01-pro/test-001/blob/main/supabase/migration_daily_claim.sql"

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_arcadehub,node_police,node_galaxy,node_mcuser toneBlue
class node_mcmain,node_panel,node_pvp toneAmber
class node_musicbot,node_minecraftserver toneMint
class node_shopbackend,node_supabase,node_dailyclaim toneRose
class node_player,node_discord,node_musicuser,node_audiofetch,node_voice toneIndigo
```

## Components

### Arcade games

- [Arcade hub](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/arcade.js): `arcade.js`
- [Police Chase](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/police-chase/game.js): `police-chase/game.js`
- [Galaxy Defender](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/galaxy-defender/game.js): `galaxy-defender/game.js`

### Minecraft bot

- [Bot lifecycle](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/mc-bot/bot.js): `mc-bot/bot.js`
- [Panel command parser](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/mc-bot/lib/panel-commands.js): `mc-bot/lib/panel-commands.js`
- [PvP brain](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/mc-bot/lib/pvp-brain.js): `mc-bot/lib/pvp-brain.js`

### Discord music

- [Music bot](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/discord-music/bot.js): `discord-music/bot.js`

### Shop backend

- [Shop backend](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/shop-backend/Code.gs): `shop-backend/Code.gs`
- [Supabase schema](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/supabase/schema.sql): `supabase/schema.sql`
- [Daily claim migration](https://github.com/shahinahmedrafi01-pro/test-001/blob/main/supabase/migration_daily_claim.sql): `supabase/migration_daily_claim.sql`

### Other components

- **Player**
- **Discord / MC users**
- **Discord service**
- **Minecraft server**
- **Discord listeners**
- **Audio extraction**
- **Discord voice**

## Connections

- Player → Arcade hub: browses (evidence: `arcade.js`)
- Arcade hub → Police Chase: routes to (evidence: `arcade.js`)
- Discord / MC users → Discord service: sends commands
- Bot lifecycle → Panel command parser: parses commands (evidence: `mc-bot/bot.js`)
- Bot lifecycle → PvP brain: attaches brain (evidence: `mc-bot/bot.js`)
- Bot lifecycle → Minecraft server: controls bot (evidence: `mc-bot/bot.js`)
- Bot lifecycle → Discord service: bridges messages (evidence: `mc-bot/bot.js`)
- Discord listeners → Discord service: sends commands
- Music bot → Audio extraction: extracts audio (evidence: `discord-music/bot.js`)
- Music bot → Discord voice: plays stream (evidence: `discord-music/bot.js`)
