# leepule/geeker-admin architecture

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

- Interactive diagram: https://gitdiagram.com/leepule/geeker-admin
- Repository: https://github.com/leepule/geeker-admin

## Overview

##### Main System Components

The system architecture should be represented with these key components:

Frontend Architecture:
- Core Framework Layer
- Vue 3.4 + TypeScript as the foundation
- Vite 5 as build tool
- Pinia for state management
- Vue Router for routing

- Feature Layers:
- Authentication & Authorization
- Layouts & Themes
- Internationalization (i18n)
- Component Library
- API Integration

##### Detailed Component Relationships

**[Client Browser] → [Frontend Application]**
- [Core Framework]
- Vue 3.4 + TypeScript
- Vite 5
- Pinia Store

- [Layout System]
- Classic Layout
- Columns Layout
- Transverse Layout
- Vertical Layout

- [Feature Modules]
- Authentication
- Authorization
- i18n
- Theme Management

- [Component Library]
- ProTable
- ECharts
- Custom Components

- [API Layer]
- Axios Instance
- API Modules
- Mock Services

##### Key Design Elements

Use these visual elements:
- Blue: Core framework components
- Green: Feature modules
- Orange: External services/APIs
- Purple: Security components

##### Implementation Details

a) State Management:
**[Pinia Stores]**
- Auth Store
- Global Store
- Tabs Store
- User Store

b) Router Structure:
**[Vue Router]**
- Static Routes
- Dynamic Routes
- Route Guards

c) Component Architecture:
**[Components]**
- Layouts
- Common Components
- Feature Components
- Page Components

##### Technical Stack Callout

**[Technical Stack]**
- Vue 3.4
- TypeScript
- Vite 5
- Pinia
- Element-Plus
- ECharts
- Axios

##### Development Workflow

A small section showing:
**[Development Workflow]**
- ESLint/Prettier
- Husky
- Commitlint
- Build Process

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Web Browser"]
    end

    subgraph "Frontend Application"
        subgraph "Core Framework"
            Vue["Vue 3.4 + TypeScript"]
            Vite["Vite 5"]
            Pinia["Pinia Store"]
            Router["Vue Router"]
        end

        subgraph "Layout System"
            Classic["Classic Layout"]
            Columns["Columns Layout"]
            Transverse["Transverse Layout"]
            Vertical["Vertical Layout"]
        end

        subgraph "Feature Modules"
            Auth["Authentication"]
            AuthZ["Authorization"]
            I18n["i18n"]
            Theme["Theme Management"]
        end

        subgraph "Component Library"
            ProTable["ProTable"]
            ECharts["ECharts"]
            CustomComp["Custom Components"]
        end

        subgraph "API Layer"
            Axios["Axios Instance"]
            ApiModules["API Modules"]
            Mock["Mock Services"]
        end

        subgraph "State Management"
            AuthStore["Auth Store"]
            GlobalStore["Global Store"]
            TabsStore["Tabs Store"]
            UserStore["User Store"]
        end

        subgraph "Development Tools"
            ESLint["ESLint"]
            Prettier["Prettier"]
            Husky["Husky"]
            Commitlint["Commitlint"]
        end
    end

    %% Relationships
    Browser --> Vue
    Vue --> Router
    Vue --> Pinia
    Pinia --> AuthStore
    Pinia --> GlobalStore
    Pinia --> TabsStore
    Pinia --> UserStore
    Auth --> Axios
    AuthZ --> Auth
    ApiModules --> Axios
    Mock -.-> ApiModules

    %% Click Events
    click Vue "https://github.com/leepule/Geeker-Admin/blob/master/src/main.ts"
    click Vite "https://github.com/leepule/Geeker-Admin/blob/master/vite.config.ts"
    click Pinia "https://github.com/leepule/Geeker-Admin/tree/master/src/stores"
    click Router "https://github.com/leepule/Geeker-Admin/tree/master/src/routers"
    click Classic "https://github.com/leepule/Geeker-Admin/tree/master/src/layouts/LayoutClassic"
    click Columns "https://github.com/leepule/Geeker-Admin/tree/master/src/layouts/LayoutColumns"
    click Transverse "https://github.com/leepule/Geeker-Admin/tree/master/src/layouts/LayoutTransverse"
    click Vertical "https://github.com/leepule/Geeker-Admin/tree/master/src/layouts/LayoutVertical"
    click Auth "https://github.com/leepule/Geeker-Admin/tree/master/src/views/login"
    click AuthZ "https://github.com/leepule/Geeker-Admin/blob/master/src/directives/modules/auth.ts"
    click I18n "https://github.com/leepule/Geeker-Admin/tree/master/src/languages"
    click Theme "https://github.com/leepule/Geeker-Admin/tree/master/src/layouts/components/ThemeDrawer"
    click ProTable "https://github.com/leepule/Geeker-Admin/tree/master/src/components/ProTable"
    click ECharts "https://github.com/leepule/Geeker-Admin/tree/master/src/components/ECharts"
    click CustomComp "https://github.com/leepule/Geeker-Admin/tree/master/src/components"
    click Axios "https://github.com/leepule/Geeker-Admin/tree/master/src/api/helper"
    click ApiModules "https://github.com/leepule/Geeker-Admin/tree/master/src/api/modules"
    click Mock "https://github.com/leepule/Geeker-Admin/tree/master/src/assets/mock"
    click AuthStore "https://github.com/leepule/Geeker-Admin/blob/master/src/stores/modules/auth.ts"
    click GlobalStore "https://github.com/leepule/Geeker-Admin/blob/master/src/stores/modules/global.ts"
    click TabsStore "https://github.com/leepule/Geeker-Admin/blob/master/src/stores/modules/tabs.ts"
    click UserStore "https://github.com/leepule/Geeker-Admin/blob/master/src/stores/modules/user.ts"
    click ESLint "https://github.com/leepule/Geeker-Admin/blob/master/.eslintrc.cjs"
    click Prettier "https://github.com/leepule/Geeker-Admin/blob/master/.prettierrc.cjs"
    click Husky "https://github.com/leepule/Geeker-Admin/blob/master/.husky"
    click Commitlint "https://github.com/leepule/Geeker-Admin/blob/master/commitlint.config.cjs"

    %% Styling
    classDef core fill:#2196F3,color:white
    classDef feature fill:#4CAF50,color:white
    classDef api fill:#FF9800,color:white
    classDef security fill:#9C27B0,color:white
    classDef default fill:#FFFFFF,stroke:#000000
    classDef tools fill:#607D8B,color:white

    class Vue,Vite,Pinia,Router core
    class Auth,AuthZ,I18n,Theme feature
    class Axios,ApiModules,Mock api
    class AuthStore,GlobalStore,TabsStore,UserStore security
    class ESLint,Prettier,Husky,Commitlint tools
```
