# xxdlovo/xxdl-nuxt-admin architecture

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

- Interactive diagram: https://gitdiagram.com/xxdlovo/xxdl-nuxt-admin
- Repository: https://github.com/xxdlovo/xxdl-nuxt-admin

## Overview

NuxtAdmin is a full-stack administrative system. Administrators use protected pages to manage business and system records; the Nuxt client sends typed tRPC requests, server routers apply authentication and permission controls, and domain services access MySQL through repositories. Separate product areas cover account and RBAC management, operational system modules, dashboard/landing and theme customization, file/object storage, and scheduled jobs. The README documents these capabilities; sampled sources confirm the client, RBAC profile assembly, and selected service behavior, but not every router-to-service call.

Main entry points: [`server/trpc/routers.ts`](https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/server/trpc/routers.ts) (Routers and middleware), [`server/drizzle/CommonRepo.ts`](https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/server/drizzle/CommonRepo.ts) (Repositories), [`server/sys-router/auth/AuthService.ts`](https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/server/sys-router/auth/AuthService.ts) (Authentication and RBAC), [`app/pages/system`](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/app/pages/system) (Admin pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Admin interface"]
  node_admin_ui["Admin pages"]
  node_auth_ui["Login and registration<br/>[login.vue]"]
  node_dashboard["Dashboard"]
  node_layout["Navigation and themes"]
  node_trpc_client["tRPC client<br/>[01.client.ts]"]
end

subgraph group_api["API and access"]
  node_auth_middleware["Route protection<br/>[auth.global.ts]"]
  node_trpc_endpoint["tRPC endpoint<br/>[&#91;trpc&#93;.ts]"]
  node_trpc_stack["Routers and middleware<br/>[routers.ts]"]
  node_auth_service["Authentication and RBAC<br/>[AuthService.ts]"]
  node_shared_dto["Shared DTOs and RBAC"]
end

subgraph group_domain["Management domains"]
  node_user_domain["User management"]
  node_role_domain["Roles and permissions"]
  node_menu_domain["Menus and navigation"]
  node_system_domains["System administration"]
  node_storage_domain["Object and resource storage"]
  node_job_domain["Scheduled jobs"]
end

subgraph group_data["Persistence and jobs"]
  node_repos["Repositories<br/>[CommonRepo.ts]"]
  node_mysql_schema["MySQL schemas"]
  node_job_runner["Job dispatch and execution"]
end

node_administrator(("Administrator"))
node_mysql[("MySQL")]

node_administrator -->|"signs in"| node_auth_ui
node_administrator -->|"uses"| node_admin_ui
node_administrator -->|"views"| node_dashboard
node_admin_ui -->|"protected by"| node_auth_middleware
node_auth_ui -->|"submits credentials"| node_trpc_client
node_admin_ui -->|"requests data"| node_trpc_client
node_dashboard -->|"requests data"| node_trpc_client
node_layout -->|"renders routes"| node_auth_ui
node_layout -->|"renders routes"| node_admin_ui
node_trpc_client -->|"sends requests"| node_trpc_endpoint
node_trpc_endpoint -->|"dispatches"| node_trpc_stack
node_trpc_stack -->|"routes auth calls"| node_auth_service
node_trpc_stack -->|"routes module calls"| node_user_domain
node_trpc_stack -->|"routes module calls"| node_role_domain
node_trpc_stack -->|"routes module calls"| node_menu_domain
node_trpc_stack -->|"routes module calls"| node_system_domains
node_trpc_stack -->|"routes module calls"| node_storage_domain
node_trpc_stack -->|"routes module calls"| node_job_domain
node_auth_service -->|"loads user roles"| node_user_domain
node_auth_service -->|"loads roles"| node_role_domain
node_auth_service -->|"loads permitted menus"| node_menu_domain
node_user_domain -->|"accesses data"| node_repos
node_role_domain -->|"accesses data"| node_repos
node_menu_domain -->|"accesses data"| node_repos
node_system_domains -->|"accesses data"| node_repos
node_storage_domain -->|"accesses metadata"| node_repos
node_job_domain -->|"accesses job data"| node_repos
node_repos -->|"queries"| node_mysql
node_mysql_schema -->|"defines tables"| node_mysql
node_job_domain -->|"dispatches scheduled work"| node_job_runner
node_shared_dto -->|"defines typed contracts"| node_trpc_stack

click node_admin_ui "https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/app/pages/system"
click node_auth_ui "https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/app/pages/login.vue"
click node_dashboard "https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/app/pages/system/home"
click node_layout "https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/app/layouts"
click node_trpc_client "https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/app/plugins/01.client.ts"
click node_auth_middleware "https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/app/middleware/auth.global.ts"
click node_trpc_endpoint "https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/server/api/trpc/%5Btrpc%5D.ts"
click node_trpc_stack "https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/server/trpc/routers.ts"
click node_auth_service "https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/server/sys-router/auth/AuthService.ts"
click node_user_domain "https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/sys-router/user"
click node_role_domain "https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/sys-router/role"
click node_menu_domain "https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/sys-router/menu"
click node_system_domains "https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/sys-router"
click node_storage_domain "https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/sys-router/oss"
click node_job_domain "https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/sys-router/job"
click node_shared_dto "https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/shared/system"
click node_repos "https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/server/drizzle/CommonRepo.ts"
click node_mysql_schema "https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/drizzle/schema"
click node_job_runner "https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/tasks/sys-job"

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_admin_ui,node_auth_ui,node_dashboard,node_layout,node_trpc_client toneBlue
class node_auth_middleware,node_trpc_endpoint,node_trpc_stack,node_auth_service,node_shared_dto,node_mysql toneAmber
class node_user_domain,node_role_domain,node_menu_domain,node_system_domains,node_storage_domain,node_job_domain toneMint
class node_repos,node_mysql_schema,node_job_runner toneRose
class node_administrator toneIndigo
```

## Components

### Admin interface

- [Admin pages](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/app/pages/system): `app/pages/system`
- [Login and registration](https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/app/pages/login.vue): `app/pages/login.vue`
- [Dashboard](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/app/pages/system/home): `app/pages/system/home`
- [Navigation and themes](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/app/layouts): `app/layouts`
- [tRPC client](https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/app/plugins/01.client.ts): `app/plugins/01.client.ts`

### API and access

- [Route protection](https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/app/middleware/auth.global.ts): `app/middleware/auth.global.ts`
- [tRPC endpoint](https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/server/api/trpc/%5Btrpc%5D.ts): `server/api/trpc/[trpc].ts`
- [Routers and middleware](https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/server/trpc/routers.ts): `server/trpc/routers.ts`
- [Authentication and RBAC](https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/server/sys-router/auth/AuthService.ts): `server/sys-router/auth/AuthService.ts`
- [Shared DTOs and RBAC](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/shared/system): `shared/system`

### Management domains

- [User management](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/sys-router/user): `server/sys-router/user`
- [Roles and permissions](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/sys-router/role): `server/sys-router/role`
- [Menus and navigation](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/sys-router/menu): `server/sys-router/menu`
- [System administration](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/sys-router): `server/sys-router`
- [Object and resource storage](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/sys-router/oss): `server/sys-router/oss`
- [Scheduled jobs](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/sys-router/job): `server/sys-router/job`

### Persistence and jobs

- [Repositories](https://github.com/xxdlovo/xxdl-nuxt-admin/blob/main/server/drizzle/CommonRepo.ts): `server/drizzle/CommonRepo.ts`
- [MySQL schemas](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/drizzle/schema): `server/drizzle/schema`
- [Job dispatch and execution](https://github.com/xxdlovo/xxdl-nuxt-admin/tree/main/server/tasks/sys-job): `server/tasks/sys-job`

### Other components

- **Administrator**
- **MySQL**

## Connections

- Administrator → Login and registration: signs in
- Administrator → Admin pages: uses
- Administrator → Dashboard: views
- Admin pages → Route protection: protected by
- Login and registration → tRPC client: submits credentials
- Admin pages → tRPC client: requests data
- Dashboard → tRPC client: requests data
- Navigation and themes → Login and registration: renders routes
- Navigation and themes → Admin pages: renders routes
- tRPC client → tRPC endpoint: sends requests
- tRPC endpoint → Routers and middleware: dispatches
- Routers and middleware → Authentication and RBAC: routes auth calls
- Routers and middleware → User management: routes module calls
- Routers and middleware → Roles and permissions: routes module calls
- Routers and middleware → Menus and navigation: routes module calls
- Routers and middleware → System administration: routes module calls
- Routers and middleware → Object and resource storage: routes module calls
- Routers and middleware → Scheduled jobs: routes module calls
- Authentication and RBAC → User management: loads user roles
- Authentication and RBAC → Roles and permissions: loads roles
- Authentication and RBAC → Menus and navigation: loads permitted menus
- User management → Repositories: accesses data
- Roles and permissions → Repositories: accesses data
- Menus and navigation → Repositories: accesses data
- System administration → Repositories: accesses data
- Object and resource storage → Repositories: accesses metadata
- Scheduled jobs → Repositories: accesses job data
- Repositories → MySQL: queries
- MySQL schemas → MySQL: defines tables
- Scheduled jobs → Job dispatch and execution: dispatches scheduled work
- Shared DTOs and RBAC → Routers and middleware: defines typed contracts
