# darklord20105/dashboard-core architecture

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

- Interactive diagram: https://gitdiagram.com/darklord20105/dashboard-core
- Repository: https://github.com/darklord20105/dashboard-core

## Overview

AdminCN is a Next.js admin dashboard template. Users enter through dashboard or account-management pages; the dashboard presents order metrics and transactions, while administrators can list users and provision accounts through authenticated server actions/API handlers. The repository also includes authentication, profile/settings pages, and Mail, Calendar, and Users demo-app data/hooks. The README documents these capabilities, but several app views it describes are absent from this tree. Arrows are limited to relationships shown in excerpts, the source index, or README; unsampled subsystem links are omitted.

Main entry points: [`src/views/admin/list/index.js`](https://github.com/darklord20105/dashboard-core/blob/main/src/views/admin/list/index.js) (User list), [`src/app/(pages)/dashboard/page.tsx`](https://github.com/darklord20105/dashboard-core/blob/main/src/app/(pages)/dashboard/page.tsx) (Orders dashboard), [`src/lib/auth.js`](https://github.com/darklord20105/dashboard-core/blob/main/src/lib/auth.js) (Auth server), [`src/app/(pages)/admin/admin-list-user/actions.js`](https://github.com/darklord20105/dashboard-core/blob/main/src/app/(pages)/admin/admin-list-user/actions.js) (User server actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_route_shell["Route layouts"]
  node_sidebar["Navigation sidebar<br/>[Sidebar.tsx]"]
  node_sidebar_ui["Sidebar primitives<br/>[sidebar.tsx]"]
end

subgraph group_dashboard["Dashboard and tables"]
  node_dashboard_route["Orders dashboard<br/>[page.tsx]"]
  node_dashboard_widgets["Dashboard widgets"]
  node_transactions["Transaction table"]
end

subgraph group_admin["User administration"]
  node_admin_list["User list<br/>[index.js]"]
  node_user_state["User list state<br/>[use-user-app.js]"]
  node_admin_actions["User server actions<br/>[actions.js]"]
  node_admin_create_api["Create-user API<br/>[route.js]"]
  node_admin_detail["User detail view<br/>[index.js]"]
end

subgraph group_identity["Identity and access"]
  node_auth_pages["Authentication screens"]
  node_auth_client["Auth client<br/>[auth-client.js]"]
  node_auth_server["Auth server<br/>[auth.js]"]
  node_mongoose["Mongo connection<br/>[mongoose.js]"]
end

subgraph group_demo["Demo apps and pages"]
  node_mail_demo["Mail demo data<br/>[mail.ts]"]
  node_calendar_demo["Calendar demo data<br/>[calendar.ts]"]
  node_users_demo["Users demo data<br/>[users.ts]"]
  node_profile_settings["Profile and settings"]
end

node_admin_user(("Admin user"))

node_admin_user -->|"opens dashboard"| node_dashboard_route
node_dashboard_route -->|"renders widgets"| node_dashboard_widgets
node_dashboard_route -->|"renders table"| node_transactions
node_admin_user -->|"manages users"| node_admin_list
node_admin_list -->|"calls action"| node_admin_actions
node_admin_list -->|"uses hook"| node_user_state
node_admin_list -->|"queries users"| node_auth_client
node_admin_list -.->|"views account"| node_admin_detail
node_admin_user -->|"requests account creation"| node_admin_create_api
node_admin_create_api -->|"checks session"| node_auth_server
node_admin_actions -->|"uses auth"| node_auth_server
node_auth_server -->|"connects database"| node_mongoose
node_admin_user -->|"authenticates"| node_auth_pages
node_auth_pages -.->|"uses auth client"| node_auth_client
node_sidebar -->|"uses primitives"| node_sidebar_ui
node_admin_user -->|"uses Mail app"| node_mail_demo
node_admin_user -->|"uses Calendar app"| node_calendar_demo
node_admin_user -->|"uses Users app"| node_users_demo
node_admin_user -->|"opens account pages"| node_profile_settings

click node_route_shell "https://github.com/darklord20105/dashboard-core/tree/main/src/app"
click node_sidebar "https://github.com/darklord20105/dashboard-core/blob/main/src/components/layout/Sidebar.tsx"
click node_sidebar_ui "https://github.com/darklord20105/dashboard-core/blob/main/src/components/ui/sidebar.tsx"
click node_dashboard_route "https://github.com/darklord20105/dashboard-core/blob/main/src/app/(pages)/dashboard/page.tsx"
click node_dashboard_widgets "https://github.com/darklord20105/dashboard-core/tree/main/src/views/dashboards"
click node_transactions "https://github.com/darklord20105/dashboard-core/blob/main/src/views/datatables/datatable-transaction.tsx"
click node_admin_list "https://github.com/darklord20105/dashboard-core/blob/main/src/views/admin/list/index.js"
click node_user_state "https://github.com/darklord20105/dashboard-core/blob/main/src/hooks/use-user-app.js"
click node_admin_actions "https://github.com/darklord20105/dashboard-core/blob/main/src/app/(pages)/admin/admin-list-user/actions.js"
click node_admin_create_api "https://github.com/darklord20105/dashboard-core/blob/main/src/app/api/admin/create-user/route.js"
click node_admin_detail "https://github.com/darklord20105/dashboard-core/blob/main/src/views/admin/view/index.js"
click node_auth_pages "https://github.com/darklord20105/dashboard-core/tree/main/src/views/pages/auth/login"
click node_auth_client "https://github.com/darklord20105/dashboard-core/blob/main/src/lib/auth-client.js"
click node_auth_server "https://github.com/darklord20105/dashboard-core/blob/main/src/lib/auth.js"
click node_mongoose "https://github.com/darklord20105/dashboard-core/blob/main/src/lib/mongoose.js"
click node_mail_demo "https://github.com/darklord20105/dashboard-core/blob/main/src/fake-db/apps/mail.ts"
click node_calendar_demo "https://github.com/darklord20105/dashboard-core/blob/main/src/fake-db/apps/calendar.ts"
click node_users_demo "https://github.com/darklord20105/dashboard-core/blob/main/src/fake-db/apps/users.ts"
click node_profile_settings "https://github.com/darklord20105/dashboard-core/tree/main/src/views/pages/user-profile"

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_route_shell,node_sidebar,node_sidebar_ui,node_admin_user toneBlue
class node_dashboard_route,node_dashboard_widgets,node_transactions toneAmber
class node_admin_list,node_user_state,node_admin_actions,node_admin_create_api,node_admin_detail toneMint
class node_auth_pages,node_auth_client,node_auth_server,node_mongoose toneRose
class node_mail_demo,node_calendar_demo,node_users_demo,node_profile_settings toneIndigo
```

## Components

### Application shell

- [Route layouts](https://github.com/darklord20105/dashboard-core/tree/main/src/app): `src/app`
- [Navigation sidebar](https://github.com/darklord20105/dashboard-core/blob/main/src/components/layout/Sidebar.tsx): `src/components/layout/Sidebar.tsx`
- [Sidebar primitives](https://github.com/darklord20105/dashboard-core/blob/main/src/components/ui/sidebar.tsx): `src/components/ui/sidebar.tsx`

### Dashboard and tables

- [Orders dashboard](https://github.com/darklord20105/dashboard-core/blob/main/src/app/(pages)/dashboard/page.tsx): `src/app/(pages)/dashboard/page.tsx`
- [Dashboard widgets](https://github.com/darklord20105/dashboard-core/tree/main/src/views/dashboards): `src/views/dashboards`
- [Transaction table](https://github.com/darklord20105/dashboard-core/blob/main/src/views/datatables/datatable-transaction.tsx): `src/views/datatables/datatable-transaction.tsx`

### User administration

- [User list](https://github.com/darklord20105/dashboard-core/blob/main/src/views/admin/list/index.js): `src/views/admin/list/index.js`
- [User list state](https://github.com/darklord20105/dashboard-core/blob/main/src/hooks/use-user-app.js): `src/hooks/use-user-app.js`
- [User server actions](https://github.com/darklord20105/dashboard-core/blob/main/src/app/(pages)/admin/admin-list-user/actions.js): `src/app/(pages)/admin/admin-list-user/actions.js`
- [Create-user API](https://github.com/darklord20105/dashboard-core/blob/main/src/app/api/admin/create-user/route.js): `src/app/api/admin/create-user/route.js`
- [User detail view](https://github.com/darklord20105/dashboard-core/blob/main/src/views/admin/view/index.js): `src/views/admin/view/index.js`

### Identity and access

- [Authentication screens](https://github.com/darklord20105/dashboard-core/tree/main/src/views/pages/auth/login): `src/views/pages/auth/login`
- [Auth client](https://github.com/darklord20105/dashboard-core/blob/main/src/lib/auth-client.js): `src/lib/auth-client.js`
- [Auth server](https://github.com/darklord20105/dashboard-core/blob/main/src/lib/auth.js): `src/lib/auth.js`
- [Mongo connection](https://github.com/darklord20105/dashboard-core/blob/main/src/lib/mongoose.js): `src/lib/mongoose.js`

### Demo apps and pages

- [Mail demo data](https://github.com/darklord20105/dashboard-core/blob/main/src/fake-db/apps/mail.ts): `src/fake-db/apps/mail.ts`
- [Calendar demo data](https://github.com/darklord20105/dashboard-core/blob/main/src/fake-db/apps/calendar.ts): `src/fake-db/apps/calendar.ts`
- [Users demo data](https://github.com/darklord20105/dashboard-core/blob/main/src/fake-db/apps/users.ts): `src/fake-db/apps/users.ts`
- [Profile and settings](https://github.com/darklord20105/dashboard-core/tree/main/src/views/pages/user-profile): `src/views/pages/user-profile`

### Other components

- **Admin user**

## Connections

- Admin user → Orders dashboard: opens dashboard
- Orders dashboard → Dashboard widgets: renders widgets (evidence: `src/app/(pages)/dashboard/page.tsx`)
- Orders dashboard → Transaction table: renders table (evidence: `src/app/(pages)/dashboard/page.tsx`)
- Admin user → User list: manages users
- User list → User server actions: calls action (evidence: `src/views/admin/list/index.js`)
- User list → User list state: uses hook (evidence: `src/views/admin/list/index.js`)
- User list → Auth client: queries users (evidence: `src/views/admin/list/index.js`)
- User list → User detail view: views account
- Admin user → Create-user API: requests account creation
- Create-user API → Auth server: checks session (evidence: `src/app/api/admin/create-user/route.js`)
- User server actions → Auth server: uses auth (evidence: `src/app/(pages)/admin/admin-list-user/actions.js`)
- Auth server → Mongo connection: connects database (evidence: `src/lib/auth.js`)
- Admin user → Authentication screens: authenticates
- Authentication screens → Auth client: uses auth client
- Navigation sidebar → Sidebar primitives: uses primitives (evidence: `src/components/layout/Sidebar.tsx`)
- Admin user → Mail demo data: uses Mail app
- Admin user → Calendar demo data: uses Calendar app
- Admin user → Users demo data: uses Users app
- Admin user → Profile and settings: opens account pages
