# crimsonrice/domner_admin_dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/crimsonrice/domner_admin_dashboard
- Repository: https://github.com/crimsonrice/domner_admin_dashboard

## Overview

##### Project type and purpose
- This is a single‐page admin dashboard front-end built with Vue 3, Vite, TailwindCSS.
- It connects to back-end services (Domner Rental mobile app API) via Axios.

##### File structure
- Root contains build/config files: package.json, vite.config.js, tailwind.config.js, .env, index.html.
- src/ holds all application code:
- App.vue, main.js (entry point)
- router/ (Vue Router setup)
- stores/ (Pinia state modules)
- api/ (Axios instance)
- services/ (authService, other domain services)
- components/ (reusable UI components, subfolders for charts)
- layouts/ (authenticated vs. guest layouts)
- views/ (route views: Home, Login, Users, etc.)
- assets/, css/, locales/, translations/, composables/

##### README for additional insights
- Tech stack: Vue 3, Vite, TailwindCSS, Vue Router, Pinia, Axios.
- No built-in back-end—relies on external REST API.
- Standard development workflow: npm run dev/build.

##### Detail
- File/folder references for key modules (e.g., stores/main.js, api/axios.js)
- Environment/config (e.g., .env endpoints, vite.config.js)

## Diagram (Mermaid)

```mermaid
graph TB
    %% Nodes
    Browser["Browser / Client"]:::frontend

    IndexHTML["index.html"]:::build

    subgraph "Vue SPA"
        App["App.vue"]:::frontend
        Main["main.js"]:::frontend
    end

    subgraph "Routing Layer"
        Router["Vue Router\nsrc/router/index.js"]:::frontend
    end

    subgraph "State Management"
        StoreMain["main.js\nsrc/stores/main.js"]:::state
        StoreDark["darkMode.js\nsrc/stores/darkMode.js"]:::state
    end

    subgraph "API Services"
        Axios["axios.js\nsrc/api/axios.js"]:::data
        AuthService["authService.js\nsrc/services/authService.js"]:::data
    end

    subgraph "UI Component Library"
        Components["components/"]:::frontend
        LayoutAuth["LayoutAuthenticated.vue"]:::frontend
        LayoutGuest["LayoutGuest.vue"]:::frontend
        Views["views/"]:::frontend
    end

    subgraph "Styling Engine"
        TailwindConfig["tailwind.config.js"]:::build
        CSSMain["src/css/main.css"]:::build
        CSSDirs["src/css/tailwind/ & src/css/styles/"]:::build
    end

    subgraph "Build Toolchain"
        ViteConfig["vite.config.js"]:::build
        PackageJson["package.json"]:::build
        EnvFile[".env"]:::build
    end

    ExternalAPI["Domner Rental REST API"]:::external

    %% Connections
    Browser -->|"loads"| IndexHTML
    IndexHTML -->|"bootstrap"| App
    App -->|"mounts"| Main
    Main -->|"init router"| Router
    Router -->|"renders view"| Views
    Views -->|"uses layout/components"| LayoutAuth
    Views -->|"uses layout/components"| LayoutGuest
    Views -->|"uses UI components"| Components
    Views -->|"dispatch action"| StoreMain
    Views -->|"dispatch action"| StoreDark
    StoreMain -->|"calls service"| AuthService
    StoreDark -->|"calls service"| AuthService
    AuthService -->|"uses HTTP client"| Axios
    Axios -->|"HTTP request"| ExternalAPI
    ExternalAPI -->|"HTTP response"| Axios
    Axios -->|"returns data"| AuthService
    AuthService -->|"updates state"| StoreMain
    AuthService -->|"updates state"| StoreDark

    %% Styling and Build flows
    TailwindConfig -->|"configures"| CSSMain
    CSSDirs -->|"assets"| CSSMain
    CSSMain -->|"styles applied to"| Components
    ViteConfig -->|"builds"| IndexHTML
    ViteConfig -->|"bundles"| Main
    PackageJson -->|"defines deps"| ViteConfig
    EnvFile -->|"provides URLs"| Axios

    %% Click Events
    click Browser "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/index.html"
    click App "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/src/App.vue"
    click Main "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/src/main.js"
    click Router "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/src/router/index.js"
    click StoreMain "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/src/stores/main.js"
    click StoreDark "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/src/stores/darkMode.js"
    click Axios "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/src/api/axios.js"
    click AuthService "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/src/services/authService.js"
    click Components "https://github.com/crimsonrice/domner_admin_dashboard/tree/main/src/components/"
    click LayoutAuth "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/src/layouts/LayoutAuthenticated.vue"
    click LayoutGuest "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/src/layouts/LayoutGuest.vue"
    click Views "https://github.com/crimsonrice/domner_admin_dashboard/tree/main/src/views/"
    click TailwindConfig "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/tailwind.config.js"
    click CSSMain "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/src/css/main.css"
    click CSSDirs "https://github.com/crimsonrice/domner_admin_dashboard/tree/main/src/css/tailwind/"
    click ViteConfig "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/vite.config.js"
    click PackageJson "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/package.json"
    click EnvFile "https://github.com/crimsonrice/domner_admin_dashboard/blob/main/.env"

    %% Styles
    classDef frontend fill:#add8e6,stroke:#333,stroke-width:1px
    classDef state fill:#98fb98,stroke:#333,stroke-width:1px
    classDef data fill:#ffa500,stroke:#333,stroke-width:1px
    classDef build fill:#d3d3d3,stroke:#333,stroke-width:1px
    classDef external fill:#ffcccc,stroke:#333,stroke-width:1px
```
