# vanillanahida/group-verify-service architecture

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

- Interactive diagram: https://gitdiagram.com/vanillanahida/group-verify-service
- Repository: https://github.com/vanillanahida/group-verify-service

## Overview

This is a ThinkPHP backend and Vue frontend for group-join human verification. The primary workflow is a bot creating a ticket, a user completing Geetest on the short-link page, and the bot checking the resulting one-time code. Separate branches cover setup, admin settings, API-key management and call-log/dashboard views. The excerpts show route ownership, controller/model calls and frontend view/API usage; unsampled capabilities are included where the README or route table documents them, without assuming their internal implementation.

Main entry points: [`backend/app/controller/VerifyController.php`](https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/controller/VerifyController.php) (Verify endpoints), [`backend/config/database.php`](https://github.com/vanillanahida/group-verify-service/blob/main/backend/config/database.php) (Application database), [`backend/app/controller/AdminSettingsController.php`](https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/controller/AdminSettingsController.php) (Settings and dashboard), [`backend/app/controller/AdminApiKeysController.php`](https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/controller/AdminApiKeysController.php) (API-key management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_verify["Verification workflow"]
  node_verify_api["Verify endpoints"]
  node_verify_page["Verification page<br/>[index.vue]"]
  node_verify_client_api["Verification API client<br/>[verify.js]"]
  node_captcha_model["Captcha and code model<br/>[GeetestModel.php]"]
  node_captcha_record["Ticket records<br/>[GeetestTable.php]"]
end

subgraph group_security["Access and configuration"]
  node_api_auth["Bot API auth<br/>[ApiAuth.php]"]
  node_admin_auth["Admin API auth"]
  node_key_settings["Key and settings helpers<br/>[ApiKeyTrait.php]"]
end

subgraph group_admin["Admin console"]
  node_settings_api["Settings and dashboard"]
  node_keys_api["API-key management"]
  node_admin_shell["Admin console<br/>[index.vue]"]
  node_admin_login["Admin login<br/>[index.vue]"]
  node_settings_view["Settings view<br/>[index.vue]"]
  node_keys_view["API-key view<br/>[index.vue]"]
  node_settings_client["Settings API client<br/>[adminSettings.js]"]
  node_keys_client["Keys API client<br/>[adminApiKeys.js]"]
end

subgraph group_platform["Shared runtime"]
  node_app_shell["Frontend application<br/>[App.vue]"]
  node_setup["Setup and admin pages<br/>[Index.php]"]
  node_database[("Application database<br/>[database.php]")]
end

node_bot(("Bot"))
node_visitor(("Joining user"))
node_admin_user(("Admin user"))
node_geetest{{"Geetest V4"}}

node_bot -->|"creates ticket"| node_verify_api
node_verify_api -->|"creates and checks"| node_captcha_model
node_verify_api -->|"protected by"| node_api_auth
node_verify_api -->|"serves ticket page"| node_verify_page
node_visitor -->|"opens link"| node_verify_page
node_verify_page -->|"requests status and callback"| node_verify_client_api
node_verify_client_api -->|"calls verify endpoints"| node_verify_api
node_verify_page -->|"submits challenge"| node_geetest
node_verify_api -->|"validates challenge"| node_geetest
node_captcha_model -->|"reads and writes"| node_captcha_record
node_captcha_model -->|"persists verification state"| node_database
node_captcha_record -.->|"maps records"| node_database
node_bot -->|"checks code"| node_verify_api
node_admin_user -->|"uses console"| node_app_shell
node_app_shell -->|"renders login"| node_admin_login
node_app_shell -->|"renders console"| node_admin_shell
node_admin_shell -->|"renders settings"| node_settings_view
node_admin_shell -->|"renders key manager"| node_keys_view
node_admin_login -->|"authenticates"| node_settings_client
node_settings_view -->|"loads and updates"| node_settings_client
node_keys_view -->|"manages keys"| node_keys_client
node_settings_client -.->|"calls admin endpoints"| node_settings_api
node_keys_client -.->|"calls key endpoints"| node_keys_api
node_settings_api -->|"protected by"| node_admin_auth
node_keys_api -->|"protected by"| node_admin_auth
node_settings_api -->|"uses shared settings"| node_key_settings
node_keys_api -->|"uses shared key helpers"| node_key_settings
node_api_auth -->|"checks key data"| node_key_settings
node_settings_api -->|"reads settings and logs"| node_database
node_keys_api -->|"manages API keys"| node_database
node_key_settings -->|"reads and writes settings"| node_database
node_setup -.->|"initializes storage"| node_database
node_admin_user -->|"initializes service"| node_setup

click node_verify_api "https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/controller/VerifyController.php"
click node_verify_page "https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/view/Verify/index.vue"
click node_verify_client_api "https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/api/verify.js"
click node_captcha_model "https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/model/GeetestModel.php"
click node_captcha_record "https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/model/GeetestTable.php"
click node_api_auth "https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/middleware/ApiAuth.php"
click node_admin_auth "https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/middleware/AdminApiKeyAuth.php"
click node_key_settings "https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/traits/ApiKeyTrait.php"
click node_settings_api "https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/controller/AdminSettingsController.php"
click node_keys_api "https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/controller/AdminApiKeysController.php"
click node_admin_shell "https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/view/Admin/index.vue"
click node_admin_login "https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/view/Admin/Login/index.vue"
click node_settings_view "https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/view/Admin/Settings/index.vue"
click node_keys_view "https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/view/Admin/ApiKeys/index.vue"
click node_settings_client "https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/api/adminSettings.js"
click node_keys_client "https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/api/adminApiKeys.js"
click node_app_shell "https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/App.vue"
click node_setup "https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/controller/Index.php"
click node_database "https://github.com/vanillanahida/group-verify-service/blob/main/backend/config/database.php"

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_verify_api,node_verify_page,node_verify_client_api,node_captcha_model,node_captcha_record,node_visitor,node_admin_user toneBlue
class node_api_auth,node_admin_auth,node_key_settings toneAmber
class node_settings_api,node_keys_api,node_admin_shell,node_admin_login,node_settings_view,node_keys_view,node_settings_client,node_keys_client toneMint
class node_app_shell,node_setup,node_database toneRose
class node_bot,node_geetest toneIndigo
```

## Components

### Verification workflow

- [Verify endpoints](https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/controller/VerifyController.php): `backend/app/controller/VerifyController.php`
- [Verification page](https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/view/Verify/index.vue): `frontend/src/view/Verify/index.vue`
- [Verification API client](https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/api/verify.js): `frontend/src/api/verify.js`
- [Captcha and code model](https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/model/GeetestModel.php): `backend/app/model/GeetestModel.php`
- [Ticket records](https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/model/GeetestTable.php): `backend/app/model/GeetestTable.php`

### Access and configuration

- [Bot API auth](https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/middleware/ApiAuth.php): `backend/app/middleware/ApiAuth.php`
- [Admin API auth](https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/middleware/AdminApiKeyAuth.php): `backend/app/middleware/AdminApiKeyAuth.php`
- [Key and settings helpers](https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/traits/ApiKeyTrait.php): `backend/app/traits/ApiKeyTrait.php`

### Admin console

- [Settings and dashboard](https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/controller/AdminSettingsController.php): `backend/app/controller/AdminSettingsController.php`
- [API-key management](https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/controller/AdminApiKeysController.php): `backend/app/controller/AdminApiKeysController.php`
- [Admin console](https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/view/Admin/index.vue): `frontend/src/view/Admin/index.vue`
- [Admin login](https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/view/Admin/Login/index.vue): `frontend/src/view/Admin/Login/index.vue`
- [Settings view](https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/view/Admin/Settings/index.vue): `frontend/src/view/Admin/Settings/index.vue`
- [API-key view](https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/view/Admin/ApiKeys/index.vue): `frontend/src/view/Admin/ApiKeys/index.vue`
- [Settings API client](https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/api/adminSettings.js): `frontend/src/api/adminSettings.js`
- [Keys API client](https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/api/adminApiKeys.js): `frontend/src/api/adminApiKeys.js`

### Shared runtime

- [Frontend application](https://github.com/vanillanahida/group-verify-service/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Setup and admin pages](https://github.com/vanillanahida/group-verify-service/blob/main/backend/app/controller/Index.php): `backend/app/controller/Index.php`
- [Application database](https://github.com/vanillanahida/group-verify-service/blob/main/backend/config/database.php): `backend/config/database.php`

### Other components

- **Bot**
- **Joining user**
- **Admin user**
- **Geetest V4**

## Connections

- Bot → Verify endpoints: creates ticket (evidence: `README.md`)
- Verify endpoints → Captcha and code model: creates and checks (evidence: `backend/app/controller/VerifyController.php`)
- Verify endpoints → Bot API auth: protected by (evidence: `backend/route/app.php`)
- Verify endpoints → Verification page: serves ticket page
- Joining user → Verification page: opens link (evidence: `README.md`)
- Verification page → Verification API client: requests status and callback (evidence: `frontend/src/view/Verify/index.vue`)
- Verification API client → Verify endpoints: calls verify endpoints (evidence: `README.md`)
- Verification page → Geetest V4: submits challenge (evidence: `README.md`)
- Verify endpoints → Geetest V4: validates challenge (evidence: `backend/app/controller/VerifyController.php`)
- Captcha and code model → Ticket records: reads and writes (evidence: `backend/app/model/GeetestModel.php`)
- Captcha and code model → Application database: persists verification state (evidence: `backend/app/model/GeetestModel.php`)
- Ticket records → Application database: maps records
- Bot → Verify endpoints: checks code (evidence: `README.md`)
- Admin user → Frontend application: uses console (evidence: `README.md`)
- Frontend application → Admin login: renders login (evidence: `frontend/src/App.vue`)
- Frontend application → Admin console: renders console (evidence: `frontend/src/App.vue`)
- Admin console → Settings view: renders settings (evidence: `frontend/src/view/Admin/index.vue`)
- Admin console → API-key view: renders key manager (evidence: `frontend/src/view/Admin/index.vue`)
- Admin login → Settings API client: authenticates (evidence: `frontend/src/view/Admin/Login/index.vue`)
- Settings view → Settings API client: loads and updates (evidence: `frontend/src/view/Admin/Settings/index.vue`)
- API-key view → Keys API client: manages keys (evidence: `frontend/src/view/Admin/ApiKeys/index.vue`)
- Settings API client → Settings and dashboard: calls admin endpoints
- Keys API client → API-key management: calls key endpoints
- Settings and dashboard → Admin API auth: protected by (evidence: `backend/route/app.php`)
- API-key management → Admin API auth: protected by (evidence: `backend/route/app.php`)
- Settings and dashboard → Key and settings helpers: uses shared settings (evidence: `backend/app/controller/AdminSettingsController.php`)
- API-key management → Key and settings helpers: uses shared key helpers (evidence: `backend/app/controller/AdminApiKeysController.php`)
- Bot API auth → Key and settings helpers: checks key data (evidence: `backend/app/middleware/ApiAuth.php`)
- Settings and dashboard → Application database: reads settings and logs (evidence: `backend/app/controller/AdminSettingsController.php`)
- API-key management → Application database: manages API keys (evidence: `backend/app/controller/AdminApiKeysController.php`)
- Key and settings helpers → Application database: reads and writes settings (evidence: `backend/app/traits/ApiKeyTrait.php`)
- Setup and admin pages → Application database: initializes storage
- Admin user → Setup and admin pages: initializes service (evidence: `README.md`)
