# thinkgem/jeesite architecture

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

- Interactive diagram: https://gitdiagram.com/thinkgem/jeesite
- Repository: https://github.com/thinkgem/jeesite

## Overview

##### Project Type and Purpose
- This is a frontend monorepo for the JeeSite rapid‐development platform.
- Built with Vue3 + Vite + TypeScript + Ant Design Vue, it provides a fully featured management‑后台 UI.
- The repo is organized as a monorepo (packages/cms, packages/dbm, packages/tests) plus the main “src” app.
- It communicates with a JeeSite Spring Boot backend via REST APIs (proxied in VITE_PROXY).

##### File‑Structure Analysis
Top‑level directories and files:
- bin/ — Dev/build scripts
- build/ — Vite build config, plugins, options, theme customization
- packages/ — Three self‑contained frontend modules:
– cms — content management system UI
– dbm — data‑table modeling UI
– tests — demonstration/test harness (with its own server, controllers, services)
- public/ — Static assets served by Vite (css, images, layer.js, etc.)
- src/ — Main application:
– main.ts, App.vue, index.html
– api/ — API client definitions (grouped by domain)
– components/ — Globally registered reusable Vue components
– layouts/ — Page layout templates (default, iframe, page)
– views/ — Route‑level views (demo, sys, msg, test, etc.)
– router/ — Vue Router setup, routes, guards
– store/ — Pinia/Vuex modules
– utils/, hooks/, directives/, enums/, settings/, design/ — Support libraries
- vite.config.ts, uno.config.ts — Vite & UnoCSS configs
- .env.*, tsconfig.json, package.json

##### README Insights
- Confirms this is the Vue3/Vite frontend of JeeSite (backed by Spring Boot).
- Highlights the tech stack, core modules (org, user, role, menu, data‑modeling, code gen), plugin architecture, microkernel design.
- Mentions monorepo/Turborepo support.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Actors
    DEV["Developer"]:::actor

    %% Frontend Zone
    subgraph "Frontend" 
        direction TB

        subgraph "Build & Tooling"
            direction TB
            BIN["bin/"]:::tool
            BUILD["build/"]:::tool
            VITE["vite.config.ts"]:::tool
            UNO["uno.config.ts"]:::tool
            VITEDEV["Vite Dev Server"]:::tool
        end

        subgraph "Application Shell"
            direction TB
            MAIN["src/main.ts"]:::runtime
            APP["src/App.vue"]:::runtime
            ROUTER["src/router/"]:::runtime
            STORE["src/store/"]:::runtime
            LAYOUTS["src/layouts/"]:::runtime
        end

        subgraph "UI Library"
            direction TB
            COMPONENTS["src/components/"]:::ui
            DESIGN["src/design/"]:::ui
            DIRECTIVES["src/directives/"]:::ui
            HOOKS["src/hooks/"]:::ui
            UTILS["src/utils/"]:::ui
        end

        subgraph "Feature Modules"
            direction TB
            CMS["packages/cms/"]:::ui
            DBM["packages/dbm/"]:::ui
            TESTS["packages/tests/"]:::ui
        end

        subgraph "API Layer"
            direction TB
            API["src/api/"]:::api
        end

        STATIC["public/"]:::tool
    end

    subgraph "External Services"
        BACKEND["JeeSite Spring Boot REST API"]:::external
    end

    %% Relationships
    DEV -->|"run dev/build"| BIN
    BIN -->|"invoke"| VITEDEV
    BUILD -->|"configures"| VITEDEV
    UNO -->|"provides CSS"| VITEDEV

    VITEDEV -->|"serves"| APP
    STATIC -->|"serves assets to"| VITEDEV

    MAIN -->|"boots"| APP
    APP -->|"uses routes from"| ROUTER
    MAIN -->|"registers store"| STORE
    APP -->|"renders via layouts"| LAYOUTS

    CMS -->|"lazy-load routes into"| ROUTER
    DBM -->|"lazy-load routes into"| ROUTER
    TESTS -->|"lazy-load routes into"| ROUTER

    COMPONENTS -->|"provides UI to"| APP
    DESIGN -->|"theme for"| COMPONENTS
    DIRECTIVES -->|"enhance components"| COMPONENTS
    HOOKS -->|"logic for"| COMPONENTS
    UTILS -->|"helpers for"| COMPONENTS

    COMPONENTS -->|"commits mutations to"| STORE
    STORE -->|"provides state to"| COMPONENTS

    APP -->|"calls"| API
    API -->|"HTTP via proxy to"| BACKEND

    %% Click Events
    click BIN "https://github.com/thinkgem/jeesite/tree/main/bin/"
    click BUILD "https://github.com/thinkgem/jeesite/tree/main/build/"
    click VITE "https://github.com/thinkgem/jeesite/blob/main/vite.config.ts"
    click UNO "https://github.com/thinkgem/jeesite/blob/main/uno.config.ts"
    click MAIN "https://github.com/thinkgem/jeesite/blob/main/src/main.ts"
    click APP "https://github.com/thinkgem/jeesite/blob/main/src/App.vue"
    click ROUTER "https://github.com/thinkgem/jeesite/tree/main/src/router/"
    click STORE "https://github.com/thinkgem/jeesite/tree/main/src/store/"
    click LAYOUTS "https://github.com/thinkgem/jeesite/tree/main/src/layouts/"
    click COMPONENTS "https://github.com/thinkgem/jeesite/tree/main/src/components/"
    click DESIGN "https://github.com/thinkgem/jeesite/tree/main/src/design/"
    click DIRECTIVES "https://github.com/thinkgem/jeesite/tree/main/src/directives/"
    click HOOKS "https://github.com/thinkgem/jeesite/tree/main/src/hooks/"
    click UTILS "https://github.com/thinkgem/jeesite/tree/main/src/utils/"
    click CMS "https://github.com/thinkgem/jeesite/tree/main/packages/cms/"
    click DBM "https://github.com/thinkgem/jeesite/tree/main/packages/dbm/"
    click TESTS "https://github.com/thinkgem/jeesite/tree/main/packages/tests/"
    click API "https://github.com/thinkgem/jeesite/tree/main/src/api/"
    click STATIC "https://github.com/thinkgem/jeesite/tree/main/public/"

    %% Styles
    classDef tool fill:#ACE7EF,stroke:#333,stroke-width:1px
    classDef runtime fill:#C2F784,stroke:#333,stroke-width:1px
    classDef ui fill:#FFEAA7,stroke:#333,stroke-width:1px
    classDef api fill:#FFEAA7,stroke:#333,stroke-width:1px
    classDef external fill:#FF6B6B,stroke:#333,stroke-width:1px
    classDef actor fill:#DADFE1,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
```
