# antswordproject/antsword architecture

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

- Interactive diagram: https://gitdiagram.com/antswordproject/antsword
- Repository: https://github.com/antswordproject/antsword

## Overview

AntSword is an Electron-based website administration tool intended for authorized security work and webmasters. Users manage target shells, then open terminal, file manager, database, or site-view tools; shell actions are dispatched from the shell manager, and the target-specific core supplies script-family implementations. The repository also includes shell persistence, plugins, settings, updates, and language support. Some feature branches are represented by their exact tree paths because their implementation was not sampled; those relationships are left unasserted where the excerpts do not show wiring.

Main entry points: [`source/modules/shellmanager/list/contextmenu.js`](https://github.com/antswordproject/antsword/blob/master/source/modules/shellmanager/list/contextmenu.js) (Shell manager), [`app.js`](https://github.com/antswordproject/antsword/blob/master/app.js) (Electron host), [`source/modules/filemanager/index.js`](https://github.com/antswordproject/antsword/blob/master/source/modules/filemanager/index.js) (File manager), [`source/app.entry.js`](https://github.com/antswordproject/antsword/blob/master/source/app.entry.js) (Application entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Desktop runtime"]
  node_electron["Electron host<br/>[app.js]"]
  node_frontend["Application entry<br/>[app.entry.js]"]
end

subgraph group_shells["Shell management"]
  node_shellui["Shell manager<br/>[contextmenu.js]"]
  node_shellform["Shell forms<br/>[form.js]"]
  node_shellrecords["Shell records<br/>[data.js]"]
  node_shellstore[("Shell database<br/>[database.js]")]
end

subgraph group_operations["Remote operations"]
  node_terminal["Remote terminal<br/>[index.js]"]
  node_filemanager["File manager<br/>[index.js]"]
  node_fileviews["File views<br/>[files.js]"]
  node_filetasks["File tasks<br/>[tasks.js]"]
  node_databaseui["Remote database<br/>[index.js]"]
  node_viewsite["Site viewer<br/>[index.js]"]
end

subgraph group_platform["Core platform"]
  node_core["Script cores<br/>[index.js]"]
  node_cache["Cache manager<br/>[cachemanager.js]"]
  node_decoders["Response decoders<br/>[decodes.js]"]
  node_encoders["Request encoders<br/>[encodes.js]"]
  node_config["Runtime configuration<br/>[config.js]"]
  node_request["HTTP requests<br/>[request.js]"]
end

subgraph group_extensions["Extensions and settings"]
  node_plugins["Plugin actions<br/>[index.js]"]
  node_pluginstore["Plugin store<br/>[plugStore.js]"]
  node_settings["Settings<br/>[index.js]"]
  node_updates["Update service<br/>[update.js]"]
  node_languages["Languages<br/>[index.js]"]
end

node_user(("Operator"))

node_user -->|"starts app"| node_electron
node_electron -->|"loads UI"| node_frontend
node_frontend -->|"loads cores"| node_core
node_frontend -->|"loads language"| node_languages
node_user -.->|"manages shells"| node_shellui
node_shellui -->|"opens terminal"| node_terminal
node_shellui -->|"opens files"| node_filemanager
node_shellui -->|"opens database"| node_databaseui
node_shellui -->|"opens site"| node_viewsite
node_shellui -->|"runs plugin"| node_plugins
node_shellui -->|"uses forms"| node_shellform
node_shellui -->|"reads records"| node_shellrecords
node_filemanager -->|"uses views"| node_fileviews
node_filemanager -->|"uses tasks"| node_filetasks
node_filemanager -->|"uses encoders"| node_encoders
node_terminal -->|"executes commands"| node_core
node_terminal -->|"reads and writes"| node_cache
node_filemanager -->|"requests file actions"| node_core
node_shellform -->|"uses encoders"| node_encoders
node_shellstore -->|"uses paths"| node_config
node_electron -->|"initializes service"| node_request
node_electron -->|"initializes service"| node_shellstore
node_electron -->|"initializes service"| node_pluginstore
node_electron -->|"initializes service"| node_updates
node_frontend -->|"exposes manager"| node_cache

click node_electron "https://github.com/antswordproject/antsword/blob/master/app.js"
click node_frontend "https://github.com/antswordproject/antsword/blob/master/source/app.entry.js"
click node_shellui "https://github.com/antswordproject/antsword/blob/master/source/modules/shellmanager/list/contextmenu.js"
click node_shellform "https://github.com/antswordproject/antsword/blob/master/source/modules/shellmanager/list/form.js"
click node_shellrecords "https://github.com/antswordproject/antsword/blob/master/source/modules/shellmanager/data.js"
click node_shellstore "https://github.com/antswordproject/antsword/blob/master/modules/database.js"
click node_terminal "https://github.com/antswordproject/antsword/blob/master/source/modules/terminal/index.js"
click node_filemanager "https://github.com/antswordproject/antsword/blob/master/source/modules/filemanager/index.js"
click node_fileviews "https://github.com/antswordproject/antsword/blob/master/source/modules/filemanager/files.js"
click node_filetasks "https://github.com/antswordproject/antsword/blob/master/source/modules/filemanager/tasks.js"
click node_databaseui "https://github.com/antswordproject/antsword/blob/master/source/modules/database/index.js"
click node_viewsite "https://github.com/antswordproject/antsword/blob/master/source/modules/viewsite/index.js"
click node_core "https://github.com/antswordproject/antsword/blob/master/source/core/index.js"
click node_cache "https://github.com/antswordproject/antsword/blob/master/source/base/cachemanager.js"
click node_decoders "https://github.com/antswordproject/antsword/blob/master/source/base/decodes.js"
click node_encoders "https://github.com/antswordproject/antsword/blob/master/source/base/encodes.js"
click node_config "https://github.com/antswordproject/antsword/blob/master/modules/config.js"
click node_plugins "https://github.com/antswordproject/antsword/blob/master/source/modules/plugin/index.js"
click node_pluginstore "https://github.com/antswordproject/antsword/blob/master/modules/plugStore.js"
click node_settings "https://github.com/antswordproject/antsword/blob/master/source/modules/settings/index.js"
click node_updates "https://github.com/antswordproject/antsword/blob/master/modules/update.js"
click node_languages "https://github.com/antswordproject/antsword/blob/master/source/language/index.js"
click node_request "https://github.com/antswordproject/antsword/blob/master/modules/request.js"

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_electron,node_frontend toneBlue
class node_shellui,node_shellform,node_shellrecords,node_shellstore toneAmber
class node_terminal,node_filemanager,node_fileviews,node_filetasks,node_databaseui,node_viewsite toneMint
class node_core,node_cache,node_decoders,node_encoders,node_config,node_request toneRose
class node_plugins,node_pluginstore,node_settings,node_updates,node_languages,node_user toneIndigo
```

## Components

### Desktop runtime

- [Electron host](https://github.com/antswordproject/antsword/blob/master/app.js): `app.js`
- [Application entry](https://github.com/antswordproject/antsword/blob/master/source/app.entry.js): `source/app.entry.js`

### Shell management

- [Shell manager](https://github.com/antswordproject/antsword/blob/master/source/modules/shellmanager/list/contextmenu.js): `source/modules/shellmanager/list/contextmenu.js`
- [Shell forms](https://github.com/antswordproject/antsword/blob/master/source/modules/shellmanager/list/form.js): `source/modules/shellmanager/list/form.js`
- [Shell records](https://github.com/antswordproject/antsword/blob/master/source/modules/shellmanager/data.js): `source/modules/shellmanager/data.js`
- [Shell database](https://github.com/antswordproject/antsword/blob/master/modules/database.js): `modules/database.js`

### Remote operations

- [Remote terminal](https://github.com/antswordproject/antsword/blob/master/source/modules/terminal/index.js): `source/modules/terminal/index.js`
- [File manager](https://github.com/antswordproject/antsword/blob/master/source/modules/filemanager/index.js): `source/modules/filemanager/index.js`
- [File views](https://github.com/antswordproject/antsword/blob/master/source/modules/filemanager/files.js): `source/modules/filemanager/files.js`
- [File tasks](https://github.com/antswordproject/antsword/blob/master/source/modules/filemanager/tasks.js): `source/modules/filemanager/tasks.js`
- [Remote database](https://github.com/antswordproject/antsword/blob/master/source/modules/database/index.js): `source/modules/database/index.js`
- [Site viewer](https://github.com/antswordproject/antsword/blob/master/source/modules/viewsite/index.js): `source/modules/viewsite/index.js`

### Core platform

- [Script cores](https://github.com/antswordproject/antsword/blob/master/source/core/index.js): `source/core/index.js`
- [Cache manager](https://github.com/antswordproject/antsword/blob/master/source/base/cachemanager.js): `source/base/cachemanager.js`
- [Response decoders](https://github.com/antswordproject/antsword/blob/master/source/base/decodes.js): `source/base/decodes.js`
- [Request encoders](https://github.com/antswordproject/antsword/blob/master/source/base/encodes.js): `source/base/encodes.js`
- [Runtime configuration](https://github.com/antswordproject/antsword/blob/master/modules/config.js): `modules/config.js`
- [HTTP requests](https://github.com/antswordproject/antsword/blob/master/modules/request.js): `modules/request.js`

### Extensions and settings

- [Plugin actions](https://github.com/antswordproject/antsword/blob/master/source/modules/plugin/index.js): `source/modules/plugin/index.js`
- [Plugin store](https://github.com/antswordproject/antsword/blob/master/modules/plugStore.js): `modules/plugStore.js`
- [Settings](https://github.com/antswordproject/antsword/blob/master/source/modules/settings/index.js): `source/modules/settings/index.js`
- [Update service](https://github.com/antswordproject/antsword/blob/master/modules/update.js): `modules/update.js`
- [Languages](https://github.com/antswordproject/antsword/blob/master/source/language/index.js): `source/language/index.js`

### Other components

- **Operator**

## Connections

- Operator → Electron host: starts app
- Electron host → Application entry: loads UI (evidence: `app.js`)
- Application entry → Script cores: loads cores (evidence: `source/app.entry.js`)
- Application entry → Languages: loads language (evidence: `source/app.entry.js`)
- Operator → Shell manager: manages shells
- Shell manager → Remote terminal: opens terminal (evidence: `source/modules/shellmanager/list/contextmenu.js`)
- Shell manager → File manager: opens files (evidence: `source/modules/shellmanager/list/contextmenu.js`)
- Shell manager → Remote database: opens database (evidence: `source/modules/shellmanager/list/contextmenu.js`)
- Shell manager → Site viewer: opens site (evidence: `source/modules/shellmanager/list/contextmenu.js`)
- Shell manager → Plugin actions: runs plugin (evidence: `source/modules/shellmanager/list/contextmenu.js`)
- Shell manager → Shell forms: uses forms (evidence: `source/modules/shellmanager/list/contextmenu.js`)
- Shell manager → Shell records: reads records (evidence: `source/modules/shellmanager/list/contextmenu.js`)
- File manager → File views: uses views (evidence: `source/modules/filemanager/index.js`)
- File manager → File tasks: uses tasks (evidence: `source/modules/filemanager/index.js`)
- File manager → Request encoders: uses encoders (evidence: `source/modules/filemanager/index.js`)
- Remote terminal → Script cores: executes commands (evidence: `source/modules/terminal/index.js`)
- Remote terminal → Cache manager: reads and writes (evidence: `source/modules/terminal/index.js`)
- File manager → Script cores: requests file actions (evidence: `source/modules/filemanager/index.js`)
- Shell forms → Request encoders: uses encoders (evidence: `source/modules/shellmanager/list/form.js`)
- Shell database → Runtime configuration: uses paths (evidence: `modules/database.js`)
- Electron host → HTTP requests: initializes service (evidence: `app.js`)
- Electron host → Shell database: initializes service (evidence: `app.js`)
- Electron host → Plugin store: initializes service (evidence: `app.js`)
- Electron host → Update service: initializes service (evidence: `app.js`)
- Application entry → Cache manager: exposes manager (evidence: `source/app.entry.js`)
