# restufauzi697/wabase-toram architecture

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

- Interactive diagram: https://gitdiagram.com/restufauzi697/wabase-toram
- Repository: https://github.com/restufauzi697/wabase-toram

## Overview

Wabase Toram appears to be a WhatsApp bot centered on Toram Online tools, with additional games, group administration, information, media utilities, and entertainment commands. The likely user workflow is a WhatsApp request handled by the bot, dispatched to a command, and answered with text or media; the tree also shows game and Toram reference data. Source excerpts and README content were not provided, so most runtime links below are dashed and unverified rather than asserted as observed calls.

Main entry points: [`dist/commands`](https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands) (Command handlers), [`dist/commands/toram`](https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/toram) (Toram commands), [`dist/commands/games`](https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/games) (Game commands), [`dist/index.js`](https://github.com/restufauzi697/wabase-toram/blob/main/dist/index.js) (Bot entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot runtime"]
  node_entry["Bot entry<br/>[index.js]"]
  node_commands["Command handlers"]
  node_sessions[("Session state<br/>[db.js]")]
  node_userdb[("User and group data")]
end

subgraph group_toram["Toram tools"]
  node_toramcmd["Toram commands"]
  node_coryn["Coryn lookup"]
  node_toramdata[("Toram reference data")]
  node_leveling["Level system"]
end

subgraph group_games["Games"]
  node_gamecmd["Game commands"]
  node_gameengine["Game engine<br/>[game_engine.js]"]
  node_gamedata[("Game content")]
end

subgraph group_features["Other commands"]
  node_anime["Anime commands"]
  node_groupcmd["Group administration"]
  node_infocmd["Information commands"]
  node_quran["Quran commands"]
  node_utility["Media utilities"]
end

node_user(("WhatsApp user"))
node_whatsapp(("WhatsApp service"))
node_toramapi(("Toram data service"))
node_media(("Media services"))

node_user -.->|"sends request"| node_whatsapp
node_whatsapp -.->|"delivers message"| node_entry
node_entry -.->|"dispatches"| node_commands
node_commands -.->|"uses state"| node_sessions
node_commands -.->|"uses records"| node_userdb
node_commands -.->|"sends response"| node_whatsapp
node_commands -.->|"dispatches"| node_toramcmd
node_toramcmd -.->|"uses lookup"| node_coryn
node_toramcmd -.->|"reads data"| node_toramdata
node_toramcmd -.->|"uses levels"| node_leveling
node_toramcmd -.->|"queries"| node_toramapi
node_commands -.->|"dispatches"| node_gamecmd
node_gamecmd -.->|"uses engine"| node_gameengine
node_gamecmd -.->|"reads content"| node_gamedata
node_commands -.->|"dispatches"| node_anime
node_commands -.->|"dispatches"| node_groupcmd
node_commands -.->|"dispatches"| node_infocmd
node_commands -.->|"dispatches"| node_quran
node_commands -.->|"dispatches"| node_utility
node_utility -.->|"uses services"| node_media

click node_entry "https://github.com/restufauzi697/wabase-toram/blob/main/dist/index.js"
click node_commands "https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands"
click node_sessions "https://github.com/restufauzi697/wabase-toram/blob/main/dist/utils/session/db.js"
click node_userdb "https://github.com/restufauzi697/wabase-toram/tree/main/database"
click node_toramcmd "https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/toram"
click node_coryn "https://github.com/restufauzi697/wabase-toram/tree/main/dist/utils/coryn"
click node_toramdata "https://github.com/restufauzi697/wabase-toram/tree/main/assets/toram"
click node_leveling "https://github.com/restufauzi697/wabase-toram/blob/main/dist/lib/ToramLevelSystem.js"
click node_gamecmd "https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/games"
click node_gameengine "https://github.com/restufauzi697/wabase-toram/blob/main/dist/plugin/game/game_engine.js"
click node_gamedata "https://github.com/restufauzi697/wabase-toram/tree/main/assets/games/source"
click node_anime "https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/anime"
click node_groupcmd "https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/group"
click node_infocmd "https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/info"
click node_quran "https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/ensiklopedia"
click node_utility "https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/utility"

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_entry,node_commands,node_sessions,node_userdb,node_user toneBlue
class node_toramcmd,node_coryn,node_toramdata,node_leveling toneAmber
class node_gamecmd,node_gameengine,node_gamedata toneMint
class node_anime,node_groupcmd,node_infocmd,node_quran,node_utility toneRose
class node_whatsapp,node_toramapi,node_media toneIndigo
```

## Components

### Bot runtime

- [Bot entry](https://github.com/restufauzi697/wabase-toram/blob/main/dist/index.js): `dist/index.js`
- [Command handlers](https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands): `dist/commands`
- [Session state](https://github.com/restufauzi697/wabase-toram/blob/main/dist/utils/session/db.js): `dist/utils/session/db.js`
- [User and group data](https://github.com/restufauzi697/wabase-toram/tree/main/database): `database`

### Toram tools

- [Toram commands](https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/toram): `dist/commands/toram`
- [Coryn lookup](https://github.com/restufauzi697/wabase-toram/tree/main/dist/utils/coryn): `dist/utils/coryn`
- [Toram reference data](https://github.com/restufauzi697/wabase-toram/tree/main/assets/toram): `assets/toram`
- [Level system](https://github.com/restufauzi697/wabase-toram/blob/main/dist/lib/ToramLevelSystem.js): `dist/lib/ToramLevelSystem.js`

### Games

- [Game commands](https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/games): `dist/commands/games`
- [Game engine](https://github.com/restufauzi697/wabase-toram/blob/main/dist/plugin/game/game_engine.js): `dist/plugin/game/game_engine.js`
- [Game content](https://github.com/restufauzi697/wabase-toram/tree/main/assets/games/source): `assets/games/source`

### Other commands

- [Anime commands](https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/anime): `dist/commands/anime`
- [Group administration](https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/group): `dist/commands/group`
- [Information commands](https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/info): `dist/commands/info`
- [Quran commands](https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/ensiklopedia): `dist/commands/ensiklopedia`
- [Media utilities](https://github.com/restufauzi697/wabase-toram/tree/main/dist/commands/utility): `dist/commands/utility`

### Other components

- **WhatsApp user**
- **WhatsApp service**
- **Toram data service**
- **Media services**

## Connections

- WhatsApp user → WhatsApp service: sends request
- WhatsApp service → Bot entry: delivers message
- Bot entry → Command handlers: dispatches
- Command handlers → Session state: uses state
- Command handlers → User and group data: uses records
- Command handlers → WhatsApp service: sends response
- Command handlers → Toram commands: dispatches
- Toram commands → Coryn lookup: uses lookup
- Toram commands → Toram reference data: reads data
- Toram commands → Level system: uses levels
- Toram commands → Toram data service: queries
- Command handlers → Game commands: dispatches
- Game commands → Game engine: uses engine
- Game commands → Game content: reads content
- Command handlers → Anime commands: dispatches
- Command handlers → Group administration: dispatches
- Command handlers → Information commands: dispatches
- Command handlers → Quran commands: dispatches
- Command handlers → Media utilities: dispatches
- Media utilities → Media services: uses services
