# zrqg-znb/sensitivewordsdetection architecture

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

- Interactive diagram: https://gitdiagram.com/zrqg-znb/sensitivewordsdetection
- Repository: https://github.com/zrqg-znb/sensitivewordsdetection

## Overview

This is a web-based sensitive-word moderation system: administrators configure categorized, levelled, enabled/disabled terms, then users submit text or web-page content for detection and receive results. The Vue application provides login, navigation and management screens; its API client communicates with FastAPI routes, which delegate domain work to controllers and persist through the ORM models. The README also documents batch, real-time, OCR and request-parameter checks. Those capabilities are represented at the available view/API paths, but their internal implementation and wiring could not be verified from the sampled source.

Main entry points: [`app/core/crud.py`](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/core/crud.py) (CRUD layer), [`web/src/api/index.js`](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/api/index.js) (HTTP client), [`app/api/v1`](https://github.com/zrqg-znb/sensitivewordsdetection/tree/main/app/api/v1) (API routes), [`app/api/v1/sen_words/sensitive_words.py`](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/api/v1/sen_words/sensitive_words.py) (Sensitive-word routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Vue application"]
  node_frontend["Vue application<br/>[main.js]"]
  node_login["Login<br/>[index.vue]"]
  node_wordui["Sensitive words<br/>[index.vue]"]
  node_textui["Text detection<br/>[index.vue]"]
  node_crawlerui["Crawler screens<br/>[index.vue]"]
  node_systemui["System administration"]
  node_clientapi["HTTP client<br/>[index.js]"]
  node_router["Routes and guards"]
  node_authguard["Authentication guard<br/>[auth-guard.js]"]
end

subgraph group_api["FastAPI interface"]
  node_apiroot["API routes"]
  node_wordroute["Sensitive-word routes<br/>[sensitive_words.py]"]
  node_textschema["Text-check schema<br/>[text_check.py]"]
  node_crawlerroute["Crawler routes<br/>[crawler.py]"]
  node_adminroutes["Admin routes"]
end

subgraph group_domain["Moderation and administration"]
  node_wordctrl["Sensitive-word controller<br/>[sensitive_word.py]"]
  node_crawlerctrl["Crawler controller<br/>[crawler.py]"]
  node_adminctrl["Admin controllers"]
end

subgraph group_runtime["Identity and persistence"]
  node_usermodel["Domain models<br/>[admin.py]"]
  node_crud["CRUD layer<br/>[crud.py]"]
  node_database[("Application database<br/>[base.py]")]
  node_jwt["JWT utilities<br/>[jwt.py]"]
  node_settings["Runtime settings<br/>[config.py]"]
end

node_admin(("Administrator / user"))

node_admin -->|"uses"| node_frontend
node_frontend -->|"mounts routes"| node_router
node_router -->|"checks access"| node_authguard
node_admin -->|"signs in"| node_login
node_wordui -->|"requests management"| node_clientapi
node_textui -->|"submits text"| node_clientapi
node_crawlerui -->|"requests crawl"| node_clientapi
node_systemui -->|"requests administration"| node_clientapi
node_clientapi -->|"HTTP requests"| node_apiroot
node_apiroot -->|"dispatches"| node_wordroute
node_apiroot -->|"dispatches"| node_crawlerroute
node_apiroot -->|"dispatches"| node_adminroutes
node_wordroute -->|"delegates"| node_wordctrl
node_crawlerroute -->|"delegates"| node_crawlerctrl
node_adminroutes -->|"delegates"| node_adminctrl
node_wordctrl -->|"uses CRUD"| node_crud
node_adminctrl -->|"uses CRUD"| node_crud
node_crawlerctrl -->|"uses CRUD"| node_crud
node_crud -->|"operates on"| node_usermodel
node_usermodel -->|"persists data"| node_database
node_wordroute -->|"validates input"| node_textschema
node_adminroutes -->|"uses tokens"| node_jwt
node_crud -->|"uses configuration"| node_settings

click node_frontend "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/main.js"
click node_login "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/views/login/index.vue"
click node_wordui "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/views/sen-word/index.vue"
click node_textui "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/views/text-det/index.vue"
click node_crawlerui "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/views/web-crawler/index.vue"
click node_systemui "https://github.com/zrqg-znb/sensitivewordsdetection/tree/main/web/src/views/system"
click node_clientapi "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/api/index.js"
click node_router "https://github.com/zrqg-znb/sensitivewordsdetection/tree/main/web/src/router"
click node_authguard "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/router/guard/auth-guard.js"
click node_apiroot "https://github.com/zrqg-znb/sensitivewordsdetection/tree/main/app/api/v1"
click node_wordroute "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/api/v1/sen_words/sensitive_words.py"
click node_textschema "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/schemas/text_check.py"
click node_crawlerroute "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/api/v1/crawler/crawler.py"
click node_adminroutes "https://github.com/zrqg-znb/sensitivewordsdetection/tree/main/app/api/v1"
click node_wordctrl "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/controllers/sensitive_word.py"
click node_crawlerctrl "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/controllers/crawler.py"
click node_adminctrl "https://github.com/zrqg-znb/sensitivewordsdetection/tree/main/app/controllers"
click node_usermodel "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/models/admin.py"
click node_crud "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/core/crud.py"
click node_database "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/models/base.py"
click node_jwt "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/utils/jwt.py"
click node_settings "https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/settings/config.py"

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_frontend,node_login,node_wordui,node_textui,node_crawlerui,node_systemui,node_clientapi,node_router,node_authguard,node_admin toneBlue
class node_apiroot,node_wordroute,node_textschema,node_crawlerroute,node_adminroutes toneAmber
class node_wordctrl,node_crawlerctrl,node_adminctrl toneMint
class node_usermodel,node_crud,node_database,node_jwt,node_settings toneRose
```

## Components

### Vue application

- [Vue application](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/main.js): `web/src/main.js`
- [Login](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/views/login/index.vue): `web/src/views/login/index.vue`
- [Sensitive words](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/views/sen-word/index.vue): `web/src/views/sen-word/index.vue`
- [Text detection](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/views/text-det/index.vue): `web/src/views/text-det/index.vue`
- [Crawler screens](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/views/web-crawler/index.vue): `web/src/views/web-crawler/index.vue`
- [System administration](https://github.com/zrqg-znb/sensitivewordsdetection/tree/main/web/src/views/system): `web/src/views/system`
- [HTTP client](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/api/index.js): `web/src/api/index.js`
- [Routes and guards](https://github.com/zrqg-znb/sensitivewordsdetection/tree/main/web/src/router): `web/src/router`
- [Authentication guard](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/web/src/router/guard/auth-guard.js): `web/src/router/guard/auth-guard.js`

### FastAPI interface

- [API routes](https://github.com/zrqg-znb/sensitivewordsdetection/tree/main/app/api/v1): `app/api/v1`
- [Sensitive-word routes](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/api/v1/sen_words/sensitive_words.py): `app/api/v1/sen_words/sensitive_words.py`
- [Text-check schema](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/schemas/text_check.py): `app/schemas/text_check.py`
- [Crawler routes](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/api/v1/crawler/crawler.py): `app/api/v1/crawler/crawler.py`
- [Admin routes](https://github.com/zrqg-znb/sensitivewordsdetection/tree/main/app/api/v1): `app/api/v1`

### Moderation and administration

- [Sensitive-word controller](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/controllers/sensitive_word.py): `app/controllers/sensitive_word.py`
- [Crawler controller](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/controllers/crawler.py): `app/controllers/crawler.py`
- [Admin controllers](https://github.com/zrqg-znb/sensitivewordsdetection/tree/main/app/controllers): `app/controllers`

### Identity and persistence

- [Domain models](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/models/admin.py): `app/models/admin.py`
- [CRUD layer](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/core/crud.py): `app/core/crud.py`
- [Application database](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/models/base.py): `app/models/base.py`
- [JWT utilities](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/utils/jwt.py): `app/utils/jwt.py`
- [Runtime settings](https://github.com/zrqg-znb/sensitivewordsdetection/blob/main/app/settings/config.py): `app/settings/config.py`

### Other components

- **Administrator / user**

## Connections

- Administrator / user → Vue application: uses
- Vue application → Routes and guards: mounts routes
- Routes and guards → Authentication guard: checks access
- Administrator / user → Login: signs in
- Sensitive words → HTTP client: requests management
- Text detection → HTTP client: submits text
- Crawler screens → HTTP client: requests crawl
- System administration → HTTP client: requests administration
- HTTP client → API routes: HTTP requests
- API routes → Sensitive-word routes: dispatches
- API routes → Crawler routes: dispatches
- API routes → Admin routes: dispatches
- Sensitive-word routes → Sensitive-word controller: delegates
- Crawler routes → Crawler controller: delegates
- Admin routes → Admin controllers: delegates
- Sensitive-word controller → CRUD layer: uses CRUD
- Admin controllers → CRUD layer: uses CRUD
- Crawler controller → CRUD layer: uses CRUD
- CRUD layer → Domain models: operates on
- Domain models → Application database: persists data
- Sensitive-word routes → Text-check schema: validates input
- Admin routes → JWT utilities: uses tokens
- CRUD layer → Runtime settings: uses configuration
