# macrozheng/mall-admin-web architecture

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

- Interactive diagram: https://gitdiagram.com/macrozheng/mall-admin-web
- Repository: https://github.com/macrozheng/mall-admin-web

## Overview

##### Main Components

Frontend Layer:
- Vue.js Application Core
- Router (Vue Router)
- State Management (Vuex)
- UI Framework (Element UI)
- Feature Modules:
- Product Management (PMS)
- Order Management (OMS)
- Marketing Management (SMS)
- User Management (UMS)
- Content Management
- Statistics & Reports

API Integration Layer:
- Axios HTTP Client
- API Services
- Authentication/Authorization

##### Detailed Component Breakdown

Core Components:
**[Vue Application Core]**
- Router System
- State Management
- User State
- Permission State
- App State
- UI Components
- Layout Components
- Shared Components
- Feature-specific Components

Feature Modules:
**[Feature Modules]**
- Products (PMS)
- Product Management
- Category Management
- Brand Management
- Orders (OMS)
- Order Processing
- Shipping Management
- Returns Management
- Marketing (SMS)
- Promotions
- Coupons
- Advertising
- Users (UMS)
- Admin Management
- Role Management
- Permission Management

##### Implementation Details

- Frontend-Backend communication via REST APIs
- Authentication flow
- Module dependencies
- Data flow between components
- Integration with external services (if any)

##### Key Relationships to Highlight

- Vue Router ↔ Views
- Vuex Store ↔ Components
- API Services ↔ Backend
- Authentication ↔ Protected Routes
- Component Hierarchy

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Frontend Layer"
        VueCore["Vue Application Core"]
        Router["Router System"]
        StateManagement["State Management"]
        UIFramework["Element UI Framework"]
        
        subgraph "State Modules"
            UserState["User State"]
            PermState["Permission State"]
            AppState["App State"]
        end
        
        subgraph "UI Components"
            Layout["Layout Components"]
            SharedUI["Shared Components"]
            FeatureUI["Feature Components"]
        end
    end
    
    subgraph "Feature Modules"
        PMS["Product Management (PMS)"]
        OMS["Order Management (OMS)"]
        SMS["Marketing Management (SMS)"]
        UMS["User Management (UMS)"]
        CMS["Content Management"]
        Stats["Statistics & Reports"]
    end
    
    subgraph "API Integration Layer"
        APIClient["Axios HTTP Client"]
        APIServices["API Services"]
        Auth["Authentication/Authorization"]
    end
    
    %% Relationships
    VueCore --> Router
    VueCore --> StateManagement
    VueCore --> UIFramework
    
    StateManagement --> UserState
    StateManagement --> PermState
    StateManagement --> AppState
    
    UIFramework --> Layout
    UIFramework --> SharedUI
    UIFramework --> FeatureUI
    
    Router --> PMS
    Router --> OMS
    Router --> SMS
    Router --> UMS
    Router --> CMS
    Router --> Stats
    
    PMS --> APIServices
    OMS --> APIServices
    SMS --> APIServices
    UMS --> APIServices
    CMS --> APIServices
    
    APIServices --> APIClient
    APIClient --> Auth
    
    %% Click Events
    click VueCore "https://github.com/macrozheng/mall-admin-web/blob/master/src/main.js"
    click Router "https://github.com/macrozheng/mall-admin-web/blob/master/src/router/index.js"
    click StateManagement "https://github.com/macrozheng/mall-admin-web/blob/master/src/store/index.js"
    click UserState "https://github.com/macrozheng/mall-admin-web/blob/master/src/store/modules/user.js"
    click PermState "https://github.com/macrozheng/mall-admin-web/blob/master/src/store/modules/permission.js"
    click AppState "https://github.com/macrozheng/mall-admin-web/blob/master/src/store/modules/app.js"
    click Layout "https://github.com/macrozheng/mall-admin-web/blob/master/src/views/layout/Layout.vue"
    click SharedUI "https://github.com/macrozheng/mall-admin-web/tree/master/src/components"
    click PMS "https://github.com/macrozheng/mall-admin-web/tree/master/src/views/pms"
    click OMS "https://github.com/macrozheng/mall-admin-web/tree/master/src/views/oms"
    click SMS "https://github.com/macrozheng/mall-admin-web/tree/master/src/views/sms"
    click UMS "https://github.com/macrozheng/mall-admin-web/tree/master/src/views/ums"
    click CMS "https://github.com/macrozheng/mall-admin-web/tree/master/src/components/Tinymce"
    click APIClient "https://github.com/macrozheng/mall-admin-web/blob/master/src/utils/request.js"
    click APIServices "https://github.com/macrozheng/mall-admin-web/tree/master/src/api"
    click Auth "https://github.com/macrozheng/mall-admin-web/blob/master/src/utils/auth.js"
    
    %% Styling
    classDef core fill:#2196F3,color:white
    classDef feature fill:#4CAF50,color:white
    classDef api fill:#FF9800,color:white
    classDef state fill:#9C27B0,color:white
    classDef ui fill:#607D8B,color:white
    
    class VueCore,Router,StateManagement,UIFramework core
    class PMS,OMS,SMS,UMS,CMS,Stats feature
    class APIClient,APIServices,Auth api
    class UserState,PermState,AppState state
    class Layout,SharedUI,FeatureUI ui
    
    %% Legend
    subgraph Legend
        CoreComp["Core Components"]:::core
        FeatureComp["Feature Modules"]:::feature
        APIComp["API Components"]:::api
        StateComp["State Components"]:::state
        UIComp["UI Components"]:::ui
    end
```
