# nguyenvantanphatit/react-shadcn-admin-dashboard architecture

> Architecture diagram of the GitHub repository nguyenvantanphatit/react-shadcn-admin-dashboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nguyenvantanphatit/react-shadcn-admin-dashboard
- Repository: https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard

## Overview

##### Project type and purpose
- This is a single-page, full-featured React admin dashboard built with TypeScript, Tailwind CSS, and the Shadcn UI library.
- Its goal is to provide a rich UI for project management (Kanban), data tables, charts, calendar, chat, user/product management, theming, and responsive layouts.

##### File structure
- Top-level files: package.json, Vite/Tailwind/TS configs, public/index.html → indicates a Vite‐powered front-end build
- src/main.tsx → React entrypoint
- src/router.tsx → client-side routing
- src/components → shared UI components (app shell, layout, buttons, inputs, theme provider, nav, loader, custom & primitive ui)
- src/pages → feature modules (auth, calendar, chats, dashboard, email, kanban, order, product, settings, support, tasks, users), each with subfolders for components, data, schema
- src/hooks, src/lib → utility and custom React hooks, helper functions (exportExcel, utils)
- src/data → static JSON (conversations, sidemenus)
- public/images → static assets

##### README for additional insights
- Key features: Kanban, data tables, chat, charts, calendar, user/product management, theming, responsive design
- Tech stack: React, Shadcn, Tailwind, TypeScript, Recharts, FullCalendar, React-Table (TanStack), Leaflet & routing, React Router
- Live demo hosted on Vercel

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% User and Hosting
    User[/"User Device"/]:::external
    CDN[(CDN / Static Hosting)]:::external

    User -->|"GET index.html + assets"| CDN
    CDN -->|"Serves index.html"| Browser

    subgraph "Browser"
        direction TB
        Browser[/"Browser"/]:::external

        subgraph "Application Shell"
            direction TB
            HTML["index.html"]:::core
            CSS["src/index.css"]:::core
            HTML -->|loads| CSS
        end

        subgraph "React Runtime"
            direction TB
            Main["main.tsx"]:::core
            Router["router.tsx"]:::core
            Main -->|bootstrap App| Router
        end

        subgraph "Feature Modules (Pages)"
            direction TB
            Auth["Auth Page"]:::frontend
            Calendar["Calendar Page"]:::frontend
            Chats["Chats Page"]:::frontend
            Dashboard["Dashboard Page"]:::frontend
            Email["Email Page"]:::frontend
            Errors["Error Pages"]:::frontend
            Kanban["Kanban Page"]:::frontend
            Orders["Orders Page"]:::frontend
            Product["Product Page"]:::frontend
            Settings["Settings Page"]:::frontend
            Support["Support Page"]:::frontend
            Tasks["Tasks Page"]:::frontend
            Users["Users Page"]:::frontend
        end

        subgraph "Shared UI Components"
            direction TB
            UIPrims["UI Primitives"]:::frontend
            AppShell["App Shell"]:::frontend
            ThemeProv["Theme Provider"]:::frontend
            Sidebar["Sidebar Nav"]:::frontend
            TopNav["Top Nav Bar"]:::frontend
            UserNav["User Nav Menu"]:::frontend
            Loader["Loader"]:::frontend

            subgraph "Custom UI"
                direction TB
                Breadcrumb["Breadcrumb"]:::frontend
                Button["Button"]:::frontend
                LayoutHelpers["Layout Helpers"]:::frontend
                PwInput["Password Input"]:::frontend
                PinInput["PIN Input"]:::frontend
            end
        end

        subgraph "Data Layer"
            direction TB
            StaticData["Static JSON Data"]:::data
            DataHooks["Custom Hooks"]:::util
            Libs["Helper Libraries"]:::util

            subgraph "Static JSON"
                direction TB
                Conv["conversations.json"]:::data
                SideLinks["sidelinks.tsx"]:::data
            end

            subgraph "Hooks"
                direction TB
                HookNav["use-check-active-nav"]:::util
                HookDialog["use-dialog-state"]:::util
                HookCollapse["use-is-collapsed"]:::util
                HookStorage["use-local-storage"]:::util
                HookPrev["use-previous"]:::util
            end

            subgraph "Libs"
                direction TB
                ExportExcel["exportExcel.ts"]:::util
                Utils["utils.ts"]:::util
            end
        end

        subgraph "External Services"
            direction TB
            API[(REST/WebSocket APIs)]:::external
            Recharts[(Recharts)]:::external
            FullCal[(FullCalendar)]:::external
            Leaflet[(Leaflet & Routing)]:::external
        end

        %% Data flow
        Router -->|routes to| Auth
        Router -->|routes to| Calendar
        Router -->|routes to| Chats
        Router -->|routes to| Dashboard
        Router -->|routes to| Email
        Router -->|routes to| Errors
        Router -->|routes to| Kanban
        Router -->|routes to| Orders
        Router -->|routes to| Product
        Router -->|routes to| Settings
        Router -->|routes to| Support
        Router -->|routes to| Tasks
        Router -->|routes to| Users

        %% Components used by pages
        Auth -->|uses| AppShell
        Calendar -->|uses| FullCal
        Calendar -->|uses| StaticData
        Chats -->|uses| API
        Dashboard -->|uses| Recharts
        Board[Kanban] -->|uses drag-drop| API
        Product -->|uses| UIPrims
        Orders -->|uses| DataHooks
        Settings -->|uses| ThemeProv
        Tasks -->|uses| Libs

        %% Shared components link
        AppShell --> Sidebar
        AppShell --> TopNav
        TopNav --> UserNav
        AppShell --> Loader
        UIPrims -->|built on| Libs

        %% Hooks and libs
        PagesHooks[DataHooks] -->|fetch/state| API
        Libs -->|utility| Browser

    end

    %% Build Pipeline
    subgraph "Build & Deploy"
        direction TB
        Vite[Vite Build]:::core
        Configs["vite.config.ts<br/>tailwind.config.js<br/>tsconfig.json"]:::core
        Vite -->|bundles| Browser
        Configs --> Vite
        Browser --> CDN
    end

    %% Click Events
    click Main "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/main.tsx"
    click Router "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/router.tsx"
    click UIPrims "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/tree/main/src/components/ui"
    click AppShell "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/components/app-shell.tsx"
    click ThemeProv "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/components/theme-provider.tsx"
    click Sidebar "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/components/sidebar.tsx"
    click TopNav "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/components/top-nav.tsx"
    click UserNav "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/components/user-nav.tsx"
    click Loader "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/components/loader.tsx"
    click Breadcrumb "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/components/custom/breadcrumb.tsx"
    click Button "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/components/custom/button.tsx"
    click LayoutHelpers "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/components/custom/layout.tsx"
    click PwInput "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/components/custom/password-input.tsx"
    click PinInput "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/components/custom/pin-input.tsx"
    click CSS "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/index.css"
    click Conv "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/data/conversations.json"
    click SideLinks "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/data/sidelinks.tsx"
    click ExportExcel "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/lib/exportExcel.ts"
    click Utils "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/lib/utils.ts"
    click HookNav "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/hooks/use-check-active-nav.tsx"
    click HookDialog "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/hooks/use-dialog-state.tsx"
    click HookCollapse "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/hooks/use-is-collapsed.tsx"
    click HookStorage "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/hooks/use-local-storage.tsx"
    click HookPrev "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/src/hooks/use-previous.tsx"
    click Vite "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/vite.config.ts"
    click Configs "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/vite.config.ts"
    click Configs "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/tailwind.config.js"
    click Configs "https://github.com/nguyenvantanphatit/react-shadcn-admin-dashboard/blob/main/tsconfig.json"

    %% Styles
    classDef frontend fill:#BBDEFB,stroke:#0D47A1,stroke-width:1px
    classDef data fill:#C8E6C9,stroke:#1B5E20,stroke-width:1px
    classDef util fill:#F8BBD0,stroke:#880E4F,stroke-width:1px
    classDef core fill:#E0E0E0,stroke:#424242,stroke-width:1px
    classDef external fill:#FFF9C4,stroke:#F57F17,stroke-width:1px
```
