# rebort-hub/fastapiwebadmin architecture

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

- Interactive diagram: https://gitdiagram.com/rebort-hub/fastapiwebadmin
- Repository: https://github.com/rebort-hub/fastapiwebadmin

## Overview

FastAPI Web Admin is a Vue 3 administration frontend backed by a FastAPI system API and business plugins. The user-facing flow is login or registration, then authenticated navigation through dynamically configured menus and permission-checked administration pages; requests are handled by module controllers and services and return a shared response format. Major documented branches include RBAC, system administration, file handling, project management, and Celery tasks. The README documents architecture and registration conventions; source excerpts verify selected calls. Some runtime wiring and unsampled subsystems are therefore shown only where documented.

Main entry points: [`backend/app/api/v1/system/user/controller.py`](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/system/user/controller.py) (User endpoints), [`backend/app/shared/router.py`](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/shared/router.py) (HTTP routing and logs), [`frontend/src/router/route.ts`](https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/router/route.ts) (Dynamic routing), [`backend/app/api/v1/system/user/service.py`](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/system/user/service.py) (User service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Admin frontend"]
  node_frontend_app["Vue application<br/>[App.vue]"]
  node_frontend_router["Dynamic routing<br/>[route.ts]"]
  node_login_ui["Login interface<br/>[index.vue]"]
  node_system_ui["Admin pages<br/>[index.vue]"]
  node_auth_api["Auth API client<br/>[index.ts]"]
  node_system_api["System API clients<br/>[user.ts]"]
end

subgraph group_identity["Identity and access"]
  node_auth_controller["Authentication endpoints<br/>[controller.py]"]
  node_auth_service["Authentication service<br/>[service.py]"]
  node_user_controller["User endpoints<br/>[controller.py]"]
  node_user_service["User service<br/>[service.py]"]
  node_user_model[("User records<br/>[model.py]")]
  node_authz["Permission checks<br/>[dependencies.py]"]
end

subgraph group_admin["System administration"]
  node_admin_modules["RBAC and system modules"]
  node_admin_pages["System management views"]
  node_file_api["File service<br/>[service.py]"]
  node_file_storage["Storage providers<br/>[storage.py]"]
end

subgraph group_plugins["Business plugins"]
  node_project_plugin["Project management<br/>[controller.py]"]
  node_celery_plugin["Background tasks<br/>[worker.py]"]
end

subgraph group_platform["API platform"]
  node_app_entry["Application startup<br/>[main.py]"]
  node_router_layer["HTTP routing and logs<br/>[router.py]"]
  node_response_layer["Unified responses<br/>[response.py]"]
  node_settings["Application settings<br/>[setting.py]"]
  node_database[("Database and Redis<br/>[database.py]")]
end

node_operator(("Administrator"))

node_operator -->|"uses"| node_login_ui
node_login_ui -.->|"submits credentials"| node_auth_api
node_auth_api -.->|"calls API"| node_auth_controller
node_auth_controller -->|"delegates"| node_auth_service
node_auth_service -->|"authenticates users"| node_user_model
node_operator -->|"uses"| node_frontend_app
node_frontend_app -->|"loads routes"| node_frontend_router
node_frontend_router -.->|"resolves navigation"| node_admin_pages
node_frontend_router -.->|"fetches menu data"| node_user_controller
node_operator -->|"manages system"| node_system_ui
node_system_ui -.->|"requests operations"| node_system_api
node_system_api -.->|"calls API"| node_user_controller
node_user_controller -->|"delegates"| node_user_service
node_user_controller -->|"checks permissions"| node_authz
node_authz -->|"loads user"| node_user_model
node_user_service -->|"updates records"| node_user_model
node_user_service -->|"uses authentication"| node_auth_service
node_user_controller -->|"returns response"| node_response_layer
node_admin_modules -.->|"includes user API"| node_user_controller
node_admin_modules -.->|"supports administration"| node_admin_pages
node_file_api -->|"uses storage"| node_file_storage
node_project_plugin -->|"checks permissions"| node_authz
node_app_entry -->|"loads configuration"| node_settings
node_app_entry -.->|"registers application"| node_router_layer
node_router_layer -.->|"routes system APIs"| node_admin_modules
node_router_layer -.->|"discovers plugin routes"| node_project_plugin
node_router_layer -.->|"wraps responses"| node_response_layer
node_router_layer -->|"records operation logs"| node_database
node_celery_plugin -.->|"uses task storage"| node_database

click node_frontend_app "https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/App.vue"
click node_frontend_router "https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/router/route.ts"
click node_login_ui "https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/views/login/index.vue"
click node_system_ui "https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/views/system/user/index.vue"
click node_auth_api "https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/api/auth/index.ts"
click node_system_api "https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/api/useSystemApi/user.ts"
click node_auth_controller "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/system/auth/controller.py"
click node_auth_service "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/system/auth/service.py"
click node_user_controller "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/system/user/controller.py"
click node_user_service "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/system/user/service.py"
click node_user_model "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/system/user/model.py"
click node_authz "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/core/dependencies.py"
click node_admin_modules "https://github.com/rebort-hub/fastapiwebadmin/tree/main/backend/app/api/v1/system"
click node_admin_pages "https://github.com/rebort-hub/fastapiwebadmin/tree/main/frontend/src/views/system"
click node_file_api "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/common/file/service.py"
click node_file_storage "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/utils/storage.py"
click node_project_plugin "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/plugin/fea_project/project/controller.py"
click node_celery_plugin "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/plugin/fea_celery/worker.py"
click node_app_entry "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/main.py"
click node_router_layer "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/shared/router.py"
click node_response_layer "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/utils/response.py"
click node_settings "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/config/setting.py"
click node_database "https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/database/database.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_app,node_frontend_router,node_login_ui,node_system_ui,node_auth_api,node_system_api toneBlue
class node_auth_controller,node_auth_service,node_user_controller,node_user_service,node_user_model,node_authz toneAmber
class node_admin_modules,node_admin_pages,node_file_api,node_file_storage toneMint
class node_project_plugin,node_celery_plugin toneRose
class node_app_entry,node_router_layer,node_response_layer,node_settings,node_database,node_operator toneIndigo
```

## Components

### Admin frontend

- [Vue application](https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Dynamic routing](https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/router/route.ts): `frontend/src/router/route.ts`
- [Login interface](https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/views/login/index.vue): `frontend/src/views/login/index.vue`
- [Admin pages](https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/views/system/user/index.vue): `frontend/src/views/system/user/index.vue`
- [Auth API client](https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/api/auth/index.ts): `frontend/src/api/auth/index.ts`
- [System API clients](https://github.com/rebort-hub/fastapiwebadmin/blob/main/frontend/src/api/useSystemApi/user.ts): `frontend/src/api/useSystemApi/user.ts`

### Identity and access

- [Authentication endpoints](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/system/auth/controller.py): `backend/app/api/v1/system/auth/controller.py`
- [Authentication service](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/system/auth/service.py): `backend/app/api/v1/system/auth/service.py`
- [User endpoints](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/system/user/controller.py): `backend/app/api/v1/system/user/controller.py`
- [User service](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/system/user/service.py): `backend/app/api/v1/system/user/service.py`
- [User records](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/system/user/model.py): `backend/app/api/v1/system/user/model.py`
- [Permission checks](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/core/dependencies.py): `backend/app/core/dependencies.py`

### System administration

- [RBAC and system modules](https://github.com/rebort-hub/fastapiwebadmin/tree/main/backend/app/api/v1/system): `backend/app/api/v1/system`
- [System management views](https://github.com/rebort-hub/fastapiwebadmin/tree/main/frontend/src/views/system): `frontend/src/views/system`
- [File service](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/api/v1/common/file/service.py): `backend/app/api/v1/common/file/service.py`
- [Storage providers](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/utils/storage.py): `backend/app/utils/storage.py`

### Business plugins

- [Project management](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/plugin/fea_project/project/controller.py): `backend/app/plugin/fea_project/project/controller.py`
- [Background tasks](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/plugin/fea_celery/worker.py): `backend/app/plugin/fea_celery/worker.py`

### API platform

- [Application startup](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/main.py): `backend/main.py`
- [HTTP routing and logs](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/shared/router.py): `backend/app/shared/router.py`
- [Unified responses](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/utils/response.py): `backend/app/utils/response.py`
- [Application settings](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/config/setting.py): `backend/app/config/setting.py`
- [Database and Redis](https://github.com/rebort-hub/fastapiwebadmin/blob/main/backend/app/database/database.py): `backend/app/database/database.py`

### Other components

- **Administrator**

## Connections

- Administrator → Login interface: uses (evidence: `README.md`)
- Login interface → Auth API client: submits credentials
- Auth API client → Authentication endpoints: calls API
- Authentication endpoints → Authentication service: delegates (evidence: `backend/app/api/v1/system/auth/controller.py`)
- Authentication service → User records: authenticates users (evidence: `backend/app/api/v1/system/auth/service.py`)
- Administrator → Vue application: uses (evidence: `README.md`)
- Vue application → Dynamic routing: loads routes
- Dynamic routing → System management views: resolves navigation
- Dynamic routing → User endpoints: fetches menu data
- Administrator → Admin pages: manages system (evidence: `README.md`)
- Admin pages → System API clients: requests operations
- System API clients → User endpoints: calls API
- User endpoints → User service: delegates (evidence: `backend/app/api/v1/system/user/controller.py`)
- User endpoints → Permission checks: checks permissions (evidence: `backend/app/api/v1/system/user/controller.py`)
- Permission checks → User records: loads user (evidence: `backend/app/core/dependencies.py`)
- User service → User records: updates records (evidence: `backend/app/api/v1/system/user/service.py`)
- User service → Authentication service: uses authentication (evidence: `backend/app/api/v1/system/user/service.py`)
- User endpoints → Unified responses: returns response (evidence: `backend/app/api/v1/system/user/controller.py`)
- RBAC and system modules → User endpoints: includes user API (evidence: `README.md`)
- RBAC and system modules → System management views: supports administration (evidence: `README.md`)
- File service → Storage providers: uses storage (evidence: `backend/app/api/v1/common/file/service.py`)
- Project management → Permission checks: checks permissions (evidence: `backend/app/plugin/fea_project/project/controller.py`)
- Application startup → Application settings: loads configuration (evidence: `backend/main.py`)
- Application startup → HTTP routing and logs: registers application (evidence: `README.md`)
- HTTP routing and logs → RBAC and system modules: routes system APIs (evidence: `README.md`)
- HTTP routing and logs → Project management: discovers plugin routes (evidence: `README.md`)
- HTTP routing and logs → Unified responses: wraps responses
- HTTP routing and logs → Database and Redis: records operation logs (evidence: `backend/app/shared/router.py`)
- Background tasks → Database and Redis: uses task storage
