# zaigie/palworld-server-tool architecture

> Architecture diagram of the GitHub repository zaigie/palworld-server-tool, 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/zaigie/palworld-server-tool
- Repository: https://github.com/zaigie/palworld-server-tool

## Overview

PST is a Palworld dedicated-server management tool with a Go REST backend, Vue desktop/mobile interface, and Python save parser. The main workflow is: an administrator configures a save source and server connections, PST retrieves and parses saves, the UI/API exposes player and guild data, and administrators manage the game server and scheduled work. The README documents backups, whitelist, RCON automation, map views, and responsive UI; some corresponding source was not sampled, so those links are documented rather than source-verified.

Main entry points: [`api/router.go`](https://github.com/zaigie/palworld-server-tool/blob/main/api/router.go) (API Router), [`internal/tool/save.go`](https://github.com/zaigie/palworld-server-tool/blob/main/internal/tool/save.go) (Save Coordinator), [`sav_cli/sav_cli.py`](https://github.com/zaigie/palworld-server-tool/blob/main/sav_cli/sav_cli.py) (Save Parser), [`internal/database/bbolt.go`](https://github.com/zaigie/palworld-server-tool/blob/main/internal/database/bbolt.go) (Business Database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User Interfaces"]
  node_webapp["Web Application<br/>[App.vue]"]
  node_pcview["Desktop Views<br/>[PcHome.vue]"]
  node_mobileview["Mobile Views<br/>[MobileHome.vue]"]
  node_webapi["API Client<br/>[api.js]"]
end

subgraph group_api["REST Backend"]
  node_router["API Router<br/>[router.go]"]
  node_playerapi["Player API<br/>[player.go]"]
  node_serverapi["Server API<br/>[server.go]"]
  node_backupapi["Backup API<br/>[backup.go]"]
  node_rconapi["RCON API<br/>[rcon.go]"]
end

subgraph group_save["Save Processing"]
  node_saves["Save Coordinator<br/>[save.go]"]
  node_parser["Save Parser<br/>[sav_cli.py]"]
  node_structurer["Save Structurer<br/>[structurer.py]"]
  node_worldtypes["World Types<br/>[world_types.py]"]
  node_savelogger["Parser Logging<br/>[logger.py]"]
  node_agent["PST Agent<br/>[main.go]"]
end

subgraph group_operations["Server Operations"]
  node_rcon["RCON Connector<br/>[rcon.go]"]
  node_rest["Official REST Connector<br/>[rest_api.go]"]
  node_scheduler["Scheduled Tasks<br/>[task.go]"]
  node_rcontasks["RCON Task Runner<br/>[rcon_task.go]"]
end

subgraph group_state["Persistence"]
  node_guildsvc["Guild Services<br/>[guild.go]"]
  node_playersvc["Player Services<br/>[player.go]"]
  node_db[("Business Database<br/>[bbolt.go]")]
  node_config[("Configuration<br/>[config.go]")]
end

node_admin(("Administrator"))
node_gameserver(("Palworld Server"))
node_savefiles["Save Files"]

node_admin -->|"uses"| node_webapp
node_webapp -.->|"routes to"| node_pcview
node_webapp -.->|"routes to"| node_mobileview
node_pcview -.->|"requests data"| node_webapi
node_mobileview -.->|"requests data"| node_webapi
node_webapi -.->|"calls REST"| node_router
node_router -->|"routes to"| node_playerapi
node_router -->|"routes to"| node_serverapi
node_router -->|"routes to"| node_backupapi
node_router -->|"routes to"| node_rconapi
node_playerapi -->|"delegates to"| node_playersvc
node_playerapi -->|"reads data"| node_db
node_playersvc -->|"reads and writes"| node_db
node_guildsvc -.->|"reads and writes"| node_db
node_admin -->|"configures source"| node_saves
node_saves -->|"downloads from"| node_agent
node_agent -->|"copies and zips"| node_savefiles
node_saves -->|"retrieves"| node_savefiles
node_saves -->|"runs parser"| node_parser
node_parser -->|"structures saves"| node_structurer
node_structurer -->|"builds records"| node_worldtypes
node_parser -->|"logs progress"| node_savelogger
node_parser -->|"syncs records"| node_router
node_admin -->|"manages via PST"| node_gameserver
node_serverapi -->|"queries and controls"| node_rest
node_rest -->|"calls official API"| node_gameserver
node_rconapi -.->|"dispatches commands"| node_rcon
node_rcon -->|"sends RCON"| node_gameserver
node_admin -->|"configures automation"| node_scheduler
node_scheduler -->|"loads scheduled jobs"| node_rcontasks
node_scheduler -->|"syncs and backs up"| node_saves
node_admin -->|"sets PST options"| node_config
node_backupapi -.->|"records backups"| node_db

click node_webapp "https://github.com/zaigie/palworld-server-tool/blob/main/web/src/App.vue"
click node_pcview "https://github.com/zaigie/palworld-server-tool/blob/main/web/src/views/PcHome/PcHome.vue"
click node_mobileview "https://github.com/zaigie/palworld-server-tool/blob/main/web/src/views/MobileHome/MobileHome.vue"
click node_webapi "https://github.com/zaigie/palworld-server-tool/blob/main/web/src/service/api.js"
click node_router "https://github.com/zaigie/palworld-server-tool/blob/main/api/router.go"
click node_playerapi "https://github.com/zaigie/palworld-server-tool/blob/main/api/player.go"
click node_serverapi "https://github.com/zaigie/palworld-server-tool/blob/main/api/server.go"
click node_backupapi "https://github.com/zaigie/palworld-server-tool/blob/main/api/backup.go"
click node_rconapi "https://github.com/zaigie/palworld-server-tool/blob/main/api/rcon.go"
click node_guildsvc "https://github.com/zaigie/palworld-server-tool/blob/main/service/guild.go"
click node_playersvc "https://github.com/zaigie/palworld-server-tool/blob/main/service/player.go"
click node_db "https://github.com/zaigie/palworld-server-tool/blob/main/internal/database/bbolt.go"
click node_config "https://github.com/zaigie/palworld-server-tool/blob/main/internal/config/config.go"
click node_saves "https://github.com/zaigie/palworld-server-tool/blob/main/internal/tool/save.go"
click node_parser "https://github.com/zaigie/palworld-server-tool/blob/main/sav_cli/sav_cli.py"
click node_structurer "https://github.com/zaigie/palworld-server-tool/blob/main/sav_cli/structurer.py"
click node_worldtypes "https://github.com/zaigie/palworld-server-tool/blob/main/sav_cli/world_types.py"
click node_savelogger "https://github.com/zaigie/palworld-server-tool/blob/main/sav_cli/logger.py"
click node_agent "https://github.com/zaigie/palworld-server-tool/blob/main/cmd/pst-agent/main.go"
click node_rcon "https://github.com/zaigie/palworld-server-tool/blob/main/internal/tool/rcon.go"
click node_rest "https://github.com/zaigie/palworld-server-tool/blob/main/internal/tool/rest_api.go"
click node_scheduler "https://github.com/zaigie/palworld-server-tool/blob/main/internal/task/task.go"
click node_rcontasks "https://github.com/zaigie/palworld-server-tool/blob/main/internal/task/rcon_task.go"

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_webapp,node_pcview,node_mobileview,node_webapi toneBlue
class node_router,node_playerapi,node_serverapi,node_backupapi,node_rconapi toneAmber
class node_saves,node_parser,node_structurer,node_worldtypes,node_savelogger,node_agent,node_gameserver toneMint
class node_rcon,node_rest,node_scheduler,node_rcontasks toneRose
class node_guildsvc,node_playersvc,node_db,node_config,node_admin,node_savefiles toneIndigo
```

## Components

### User Interfaces

- [Web Application](https://github.com/zaigie/palworld-server-tool/blob/main/web/src/App.vue): `web/src/App.vue`
- [Desktop Views](https://github.com/zaigie/palworld-server-tool/blob/main/web/src/views/PcHome/PcHome.vue): `web/src/views/PcHome/PcHome.vue`
- [Mobile Views](https://github.com/zaigie/palworld-server-tool/blob/main/web/src/views/MobileHome/MobileHome.vue): `web/src/views/MobileHome/MobileHome.vue`
- [API Client](https://github.com/zaigie/palworld-server-tool/blob/main/web/src/service/api.js): `web/src/service/api.js`

### REST Backend

- [API Router](https://github.com/zaigie/palworld-server-tool/blob/main/api/router.go): `api/router.go`
- [Player API](https://github.com/zaigie/palworld-server-tool/blob/main/api/player.go): `api/player.go`
- [Server API](https://github.com/zaigie/palworld-server-tool/blob/main/api/server.go): `api/server.go`
- [Backup API](https://github.com/zaigie/palworld-server-tool/blob/main/api/backup.go): `api/backup.go`
- [RCON API](https://github.com/zaigie/palworld-server-tool/blob/main/api/rcon.go): `api/rcon.go`

### Save Processing

- [Save Coordinator](https://github.com/zaigie/palworld-server-tool/blob/main/internal/tool/save.go): `internal/tool/save.go`
- [Save Parser](https://github.com/zaigie/palworld-server-tool/blob/main/sav_cli/sav_cli.py): `sav_cli/sav_cli.py`
- [Save Structurer](https://github.com/zaigie/palworld-server-tool/blob/main/sav_cli/structurer.py): `sav_cli/structurer.py`
- [World Types](https://github.com/zaigie/palworld-server-tool/blob/main/sav_cli/world_types.py): `sav_cli/world_types.py`
- [Parser Logging](https://github.com/zaigie/palworld-server-tool/blob/main/sav_cli/logger.py): `sav_cli/logger.py`
- [PST Agent](https://github.com/zaigie/palworld-server-tool/blob/main/cmd/pst-agent/main.go): `cmd/pst-agent/main.go`

### Server Operations

- [RCON Connector](https://github.com/zaigie/palworld-server-tool/blob/main/internal/tool/rcon.go): `internal/tool/rcon.go`
- [Official REST Connector](https://github.com/zaigie/palworld-server-tool/blob/main/internal/tool/rest_api.go): `internal/tool/rest_api.go`
- [Scheduled Tasks](https://github.com/zaigie/palworld-server-tool/blob/main/internal/task/task.go): `internal/task/task.go`
- [RCON Task Runner](https://github.com/zaigie/palworld-server-tool/blob/main/internal/task/rcon_task.go): `internal/task/rcon_task.go`

### Persistence

- [Guild Services](https://github.com/zaigie/palworld-server-tool/blob/main/service/guild.go): `service/guild.go`
- [Player Services](https://github.com/zaigie/palworld-server-tool/blob/main/service/player.go): `service/player.go`
- [Business Database](https://github.com/zaigie/palworld-server-tool/blob/main/internal/database/bbolt.go): `internal/database/bbolt.go`
- [Configuration](https://github.com/zaigie/palworld-server-tool/blob/main/internal/config/config.go): `internal/config/config.go`

### Other components

- **Administrator**
- **Palworld Server**
- **Save Files**

## Connections

- Administrator → Web Application: uses (evidence: `README.md`)
- Web Application → Desktop Views: routes to
- Web Application → Mobile Views: routes to
- Desktop Views → API Client: requests data
- Mobile Views → API Client: requests data
- API Client → API Router: calls REST
- API Router → Player API: routes to (evidence: `api/router.go`)
- API Router → Server API: routes to (evidence: `api/router.go`)
- API Router → Backup API: routes to (evidence: `api/router.go`)
- API Router → RCON API: routes to (evidence: `api/router.go`)
- Player API → Player Services: delegates to (evidence: `api/player.go`)
- Player API → Business Database: reads data (evidence: `api/player.go`)
- Player Services → Business Database: reads and writes (evidence: `service/player.go`)
- Guild Services → Business Database: reads and writes
- Administrator → Save Coordinator: configures source (evidence: `README.md`)
- Save Coordinator → PST Agent: downloads from (evidence: `internal/tool/save.go`)
- PST Agent → Save Files: copies and zips (evidence: `cmd/pst-agent/main.go`)
- Save Coordinator → Save Files: retrieves (evidence: `internal/tool/save.go`)
- Save Coordinator → Save Parser: runs parser (evidence: `internal/tool/save.go`)
- Save Parser → Save Structurer: structures saves (evidence: `sav_cli/sav_cli.py`)
- Save Structurer → World Types: builds records (evidence: `sav_cli/structurer.py`)
- Save Parser → Parser Logging: logs progress (evidence: `sav_cli/sav_cli.py`)
- Save Parser → API Router: syncs records (evidence: `sav_cli/sav_cli.py`)
- Administrator → Palworld Server: manages via PST (evidence: `README.md`)
- Server API → Official REST Connector: queries and controls (evidence: `api/server.go`)
- Official REST Connector → Palworld Server: calls official API (evidence: `README.md`)
- RCON API → RCON Connector: dispatches commands
- RCON Connector → Palworld Server: sends RCON (evidence: `README.md`)
- Administrator → Scheduled Tasks: configures automation (evidence: `README.md`)
- Scheduled Tasks → RCON Task Runner: loads scheduled jobs (evidence: `internal/task/task.go`)
- Scheduled Tasks → Save Coordinator: syncs and backs up (evidence: `internal/task/task.go`)
- Administrator → Configuration: sets PST options (evidence: `README.md`)
- Backup API → Business Database: records backups
