# nuxt-ui-templates/dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/nuxt-ui-templates/dashboard
- Repository: https://github.com/nuxt-ui-templates/dashboard

## Overview

#### Purpose and Runtime
This is a Nuxt dashboard template: a Vue-based, multi-page admin interface with dashboard analytics, customer management, inbox, and settings views. Nuxt provides file-based routing, SSR/client rendering, and server API routes; Nuxt UI supplies the dashboard-oriented component system. It runs locally through Nuxt’s development server and can be deployed to standard Nuxt hosts, including Vercel.

Key runtime roots: `nuxt.config.ts`, `app/app.vue`, `server/api/`.

#### Application Shell and Navigation
The global application mounts through `app/app.vue`, with the default dashboard shell in `app/layouts/default.vue`. This boundary owns persistent chrome such as the collapsible sidebar, top-level navigation, theme/UI behavior, and shared overlays. `app/app.config.ts` centralizes application-level UI configuration, while `app/error.vue` handles route/application failures.

Relevant paths:
- `app/app.vue`
- `app/layouts/default.vue`
- `app/app.config.ts`

#### Route-Level Dashboard Areas
Nuxt maps page files directly to user-facing routes. The principal areas are the home dashboard (`/`), customers (`/customers`), inbox (`/inbox`), and nested settings routes. Pages compose domain-specific components rather than embedding all UI logic themselves.

Relevant paths:
- `app/pages/index.vue`
- `app/pages/customers.vue`
- `app/pages/inbox.vue`
- `app/pages/settings.vue`
- `app/pages/settings/members.vue`

#### Dashboard Analytics Flow
The home route presents summary statistics, sales information, date/period controls, and chart rendering. `useDashboard` is the central composable boundary for dashboard state/data coordination. Chart variants are explicitly split between client and server, allowing rendering behavior to respect SSR versus browser-only chart requirements.

Relevant paths:
- `app/composables/useDashboard.ts`
- `app/components/home/HomeChart.server.vue`
- `app/components/home/HomeChart.client.vue`
- `app/components/home/HomeStats.vue`

#### Domain Interaction Modules
Customer, inbox, and member-management UI are organized as component families. Customer mutations are represented through add/delete modal workflows; inbox presentation separates message list from selected-message content; settings exposes membership management alongside route-level notification and security views.

Relevant paths:
- `app/components/customers/AddModal.vue`
- `app/components/customers/DeleteModal.vue`
- `app/components/inbox/InboxList.vue`
- `app/components/inbox/InboxMail.vue`
- `app/components/settings/MembersList.vue`

#### Server API Boundary
Nuxt server handlers expose domain endpoints for customers, mail, members, and notifications. Client pages/components should treat these handlers as the backend boundary, typically accessed via Nuxt data-fetching facilities. No persistent database, authentication provider, or third-party business service is represented in the repository tree; these APIs appear to support template/demo data and interaction patterns.

Relevant paths:
- `server/api/customers.ts`
- `server/api/mails.ts`
- `server/api/members.ts`
- `server/api/notifications.ts`

#### Shared UI State and Types
Cross-cutting UI includes team/user menus and a notifications slideover, likely mounted by the shared layout and available across routes. Shared TypeScript declarations and utility exports provide common contracts/helpers across page, component, and server-facing code.

Relevant paths:
- `app/components/TeamsMenu.vue`
- `app/components/UserMenu.vue`
- `app/components/NotificationsSlideover.vue`
- `app/types/index.d.ts`
- `app/utils/index.ts`

Main entry points: [`app/layouts/default.vue`](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/layouts/default.vue) (Dashboard shell), [`app/app.vue`](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/app.vue) (Application root), [`app/pages/inbox.vue`](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages/inbox.vue) (Inbox), [`app/pages/index.vue`](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages/index.vue) (Home dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Nuxt Runtime"]
  node_nuxt{{"Nuxt configuration<br/>runtime config<br/>[nuxt.config.ts]"}}
  node_app["Application root<br/>Vue root<br/>[app.vue]"]
  node_layout["Dashboard shell<br/>default layout<br/>[default.vue]"]
  node_ui_config["UI configuration<br/>app config<br/>[app.config.ts]"]
  node_error["Error view<br/>error boundary<br/>[error.vue]"]
end

subgraph group_routes["Route Areas"]
  node_home["Home dashboard<br/>page /<br/>[index.vue]"]
  node_customers_page["Customers<br/>[customers.vue]"]
  node_inbox_page["Inbox<br/>[inbox.vue]"]
  node_settings_page["Settings<br/>[settings.vue]"]
  node_members_page["Members settings<br/>page /settings/members<br/>[members.vue]"]
end

subgraph group_dashboard["Dashboard Analytics"]
  node_dashboard_state["Dashboard state<br/>composable<br/>[useDashboard.ts]"]
  node_stats["Summary stats<br/>dashboard component<br/>[HomeStats.vue]"]
  node_chart_server["SSR chart<br/>server component"]
  node_chart_client["Browser chart<br/>client component"]
end

subgraph group_domains["Domain UI"]
  node_customer_modals["Customer mutations<br/>modal workflows<br/>[AddModal.vue]"]
  node_inbox_list["Message list<br/>inbox component<br/>[InboxList.vue]"]
  node_inbox_mail["Selected message<br/>inbox component<br/>[InboxMail.vue]"]
  node_members_list["Members list<br/>settings component<br/>[MembersList.vue]"]
  node_global_menus["Global menus<br/>shared UI<br/>[TeamsMenu.vue]"]
  node_notifications["Notifications panel<br/>shared overlay"]
end

subgraph group_api["Server API"]
  node_customers_api{{"Customers endpoint<br/>server handler<br/>[customers.ts]"}}
  node_mails_api{{"Mail endpoint<br/>server handler<br/>[mails.ts]"}}
  node_members_api{{"Members endpoint<br/>server handler<br/>[members.ts]"}}
  node_notifications_api{{"Notifications endpoint<br/>server handler<br/>[notifications.ts]"}}
end

node_nuxt -->|"boots"| node_app
node_app -->|"uses"| node_layout
node_app -->|"configures UI"| node_ui_config
node_app -.->|"handles failures"| node_error
node_layout -->|"renders routes"| node_home
node_layout -->|"renders routes"| node_customers_page
node_layout -->|"renders routes"| node_inbox_page
node_layout -->|"renders routes"| node_settings_page
node_layout -->|"mounts"| node_global_menus
node_layout -->|"mounts"| node_notifications
node_home -->|"coordinates through"| node_dashboard_state
node_home -->|"composes"| node_stats
node_dashboard_state -->|"feeds SSR variant"| node_chart_server
node_dashboard_state -->|"feeds browser variant"| node_chart_client
node_customers_page -->|"composes"| node_customer_modals
node_customer_modals -->|"fetches and mutates"| node_customers_api
node_inbox_page -->|"composes"| node_inbox_list
node_inbox_page -->|"composes"| node_inbox_mail
node_inbox_page -->|"loads mail"| node_mails_api
node_settings_page -->|"nests route"| node_members_page
node_members_page -->|"composes"| node_members_list
node_members_list -->|"loads members"| node_members_api
node_notifications -->|"loads notifications"| node_notifications_api

click node_nuxt "https://github.com/nuxt-ui-templates/dashboard/blob/main/nuxt.config.ts"
click node_app "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/app.vue"
click node_layout "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/layouts/default.vue"
click node_ui_config "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/app.config.ts"
click node_error "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/error.vue"
click node_home "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages/index.vue"
click node_customers_page "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages/customers.vue"
click node_inbox_page "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages/inbox.vue"
click node_settings_page "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages/settings.vue"
click node_members_page "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages/settings/members.vue"
click node_dashboard_state "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/composables/useDashboard.ts"
click node_stats "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/home/HomeStats.vue"
click node_chart_server "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/home/HomeChart.server.vue"
click node_chart_client "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/home/HomeChart.client.vue"
click node_customer_modals "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/customers/AddModal.vue"
click node_inbox_list "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/inbox/InboxList.vue"
click node_inbox_mail "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/inbox/InboxMail.vue"
click node_members_list "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/settings/MembersList.vue"
click node_global_menus "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/TeamsMenu.vue"
click node_notifications "https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/NotificationsSlideover.vue"
click node_customers_api "https://github.com/nuxt-ui-templates/dashboard/blob/main/server/api/customers.ts"
click node_mails_api "https://github.com/nuxt-ui-templates/dashboard/blob/main/server/api/mails.ts"
click node_members_api "https://github.com/nuxt-ui-templates/dashboard/blob/main/server/api/members.ts"
click node_notifications_api "https://github.com/nuxt-ui-templates/dashboard/blob/main/server/api/notifications.ts"

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_nuxt,node_app,node_layout,node_ui_config,node_error toneBlue
class node_home,node_customers_page,node_inbox_page,node_settings_page,node_members_page toneAmber
class node_dashboard_state,node_stats,node_chart_server,node_chart_client toneMint
class node_customer_modals,node_inbox_list,node_inbox_mail,node_members_list,node_global_menus,node_notifications toneRose
class node_customers_api,node_mails_api,node_members_api,node_notifications_api toneIndigo
```

## Components

### Nuxt Runtime

- [Nuxt configuration](https://github.com/nuxt-ui-templates/dashboard/blob/main/nuxt.config.ts): runtime config · Defines Nuxt application runtime and routing. · `nuxt.config.ts`
- [Application root](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/app.vue): Vue root · `app/app.vue`
- [Dashboard shell](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/layouts/default.vue): default layout · Owns persistent navigation, chrome, and overlays. · `app/layouts/default.vue`
- [UI configuration](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/app.config.ts): app config · `app/app.config.ts`
- [Error view](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/error.vue): error boundary · `app/error.vue`

### Route Areas

- [Home dashboard](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages/index.vue): page / · `app/pages/index.vue`
- [Customers](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages/customers.vue): page /customers · `app/pages/customers.vue`
- [Inbox](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages/inbox.vue): page /inbox · `app/pages/inbox.vue`
- [Settings](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages/settings.vue): page /settings · `app/pages/settings.vue`
- [Members settings](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages/settings/members.vue): page /settings/members · `app/pages/settings/members.vue`

### Dashboard Analytics

- [Dashboard state](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/composables/useDashboard.ts): composable · Coordinates dashboard data and period state. · `app/composables/useDashboard.ts`
- [Summary stats](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/home/HomeStats.vue): dashboard component · `app/components/home/HomeStats.vue`
- [SSR chart](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/home/HomeChart.server.vue): server component · Server-rendered chart variant. · `app/components/home/HomeChart.server.vue`
- [Browser chart](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/home/HomeChart.client.vue): client component · Client-only chart variant. · `app/components/home/HomeChart.client.vue`

### Domain UI

- [Customer mutations](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/customers/AddModal.vue): modal workflows · Add and delete customer UI. · `app/components/customers/AddModal.vue`
- [Message list](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/inbox/InboxList.vue): inbox component · `app/components/inbox/InboxList.vue`
- [Selected message](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/inbox/InboxMail.vue): inbox component · `app/components/inbox/InboxMail.vue`
- [Members list](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/settings/MembersList.vue): settings component · `app/components/settings/MembersList.vue`
- [Global menus](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/TeamsMenu.vue): shared UI · Team and user menu controls. · `app/components/TeamsMenu.vue`
- [Notifications panel](https://github.com/nuxt-ui-templates/dashboard/blob/main/app/components/NotificationsSlideover.vue): shared overlay · `app/components/NotificationsSlideover.vue`

### Server API

Demo-oriented backend boundary.

- [Customers endpoint](https://github.com/nuxt-ui-templates/dashboard/blob/main/server/api/customers.ts): server handler · `server/api/customers.ts`
- [Mail endpoint](https://github.com/nuxt-ui-templates/dashboard/blob/main/server/api/mails.ts): server handler · `server/api/mails.ts`
- [Members endpoint](https://github.com/nuxt-ui-templates/dashboard/blob/main/server/api/members.ts): server handler · `server/api/members.ts`
- [Notifications endpoint](https://github.com/nuxt-ui-templates/dashboard/blob/main/server/api/notifications.ts): server handler · `server/api/notifications.ts`

## Connections

- Nuxt configuration → Application root: boots
- Application root → Dashboard shell: uses
- Application root → UI configuration: configures UI
- Application root → Error view: handles failures
- Dashboard shell → Home dashboard: renders routes
- Dashboard shell → Customers: renders routes
- Dashboard shell → Inbox: renders routes
- Dashboard shell → Settings: renders routes
- Dashboard shell → Global menus: mounts
- Dashboard shell → Notifications panel: mounts
- Home dashboard → Dashboard state: coordinates through
- Home dashboard → Summary stats: composes
- Dashboard state → SSR chart: feeds SSR variant
- Dashboard state → Browser chart: feeds browser variant
- Customers → Customer mutations: composes
- Customer mutations → Customers endpoint: fetches and mutates
- Inbox → Message list: composes
- Inbox → Selected message: composes
- Inbox → Mail endpoint: loads mail
- Settings → Members settings: nests route
- Members settings → Members list: composes
- Members list → Members endpoint: loads members
- Notifications panel → Notifications endpoint: loads notifications
