# comppsyunion/nottinghamwall architecture

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

- Interactive diagram: https://gitdiagram.com/comppsyunion/nottinghamwall
- Repository: https://github.com/comppsyunion/nottinghamwall

## Overview

##### Project type and purpose
- This is a full-stack “University Campus Wall” application with three distinct clients—
– A WeChat Mini-Program (uniapp folder) for students and public users
– A Vue-based Admin Dashboard (admin folder) for management
– A Java Spring Boot Backend (backend folder) exposing REST APIs
- Purpose: allow students to post topics, comments, reports, orders, and admin to manage users, topics, comments, etc.

##### File structure
- Top-level modules:
– backend/ (three Maven modules: wall-common, wall-pojo, wall-server)
– admin/ (Vue3 + Vite web app)
– uniapp/ (Vue-style UniApp mini-program)
- backend: layered MVC
– wall-common: shared constants, exceptions, utilities (JWT, AliOSS, HTTP client)
– wall-pojo: DTOs, Entities, VO classes, MyBatis type handlers
– wall-server: Spring Boot app with config (Redis, OSS, Web MVC), controllers (admin/student), service interfaces & impl, mappers, interceptors (JWT), aspects, global exception handler, MyBatis XML mappers
- admin & uniapp:
– /src/api modules encapsulate HTTP request functions
– /src/views or /src/pages implement UI components, router definitions, Vuex/Pinia store (admin uses Vuex)
- Configuration & deployment: GitHub Actions workflows, pnpm/NPM lockfiles, Vite configs, docs in docs/ (VitePress-based documentation)

##### README for insights
- Confirms 3 parts: server-side, mini-program, management side
- Mentions external dependencies: WeChat Mini-Program test account, business reviews
- Provides API base URL, high-level snapshots of UI
- Points to deployment guides in docs/

##### Don’t overthink—capture every logical component
- Each Vue client’s router/store/api layers
- Each backend Maven module
- All external integrations (Redis, OSS, WeChat)
- JWT auth flow and AOP flow

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer"
        direction TB
        MP["WeChat Mini-Program Client"]:::frontend
        AD["Admin Dashboard Client"]:::frontend
    end

    %% API Layer
    subgraph "API Layer"
        direction TB
        App["WallApplication (Spring Boot)"]:::backend
        Controllers["Controllers (admin/student)"]:::backend
        Interceptors["JWT Interceptors"]:::backend
        Aspect["AutoFill Aspect"]:::backend
        ExceptionHandler["GlobalExceptionHandler"]:::backend
    end

    %% Business & Data Layer
    subgraph "Business & Data Layer"
        direction TB
        ServicesI["Service Interfaces"]:::backend
        ServicesImpl["Service Implementations"]:::backend
        Mappers["Mapper Interfaces"]:::backend
        XMLMappers["MyBatis XML Mappers"]:::backend
        Common["Shared Utils & Constants"]:::backend
        Pojo["DTO/Entity Definitions"]:::backend
        Configs["Configuration Classes"]:::backend
        DB[(MySQL Database)]:::data
        Cache[(Redis Cache)]:::data
        OSS(("AliOss")):::external
        WeChatAPI(("WeChat External APIs")):::external
    end

    %% Relationships
    MP -->|"HTTPS REST"| Controllers
    AD -->|"HTTPS REST"| Controllers
    Controllers -->|"invoke"| ServicesI
    ServicesI -->|"implemented by"| ServicesImpl
    ServicesImpl -->|"uses"| Mappers
    Mappers -->|"SQL in XML"| XMLMappers
    Controllers -->|"uses DTOs/Entities"| Pojo
    ServicesImpl -->|"uses utils/constants"| Common
    ServicesImpl -->|"cache/session"| Cache
    ServicesImpl -->|"store files"| OSS
    ServicesImpl -->|"external calls"| WeChatAPI
    App --> Controllers
    App --> Interceptors
    App --> Aspect
    App --> ExceptionHandler
    App --> Configs

    %% Click Events
    click MP "https://github.com/comppsyunion/nottinghamwall/tree/main/uniapp/"
    click AD "https://github.com/comppsyunion/nottinghamwall/tree/main/admin/"
    click Common "https://github.com/comppsyunion/nottinghamwall/tree/main/backend/wall-common/"
    click Pojo "https://github.com/comppsyunion/nottinghamwall/tree/main/backend/wall-pojo/"
    click App "https://github.com/comppsyunion/nottinghamwall/blob/main/backend/wall-server/src/main/java/cn/yiming1234/NottinghamWall/WallApplication.java"
    click Controllers "https://github.com/comppsyunion/nottinghamwall/tree/main/backend/wall-server/src/main/java/cn/yiming1234/NottinghamWall/controller"
    click ServicesI "https://github.com/comppsyunion/nottinghamwall/blob/main/backend/wall-server/src/main/java/cn/yiming1234/NottinghamWall/service/*.java"
    click ServicesImpl "https://github.com/comppsyunion/nottinghamwall/blob/main/backend/wall-server/src/main/java/cn/yiming1234/NottinghamWall/service/impl/*.java"
    click Mappers "https://github.com/comppsyunion/nottinghamwall/blob/main/backend/wall-server/src/main/java/cn/yiming1234/NottinghamWall/mapper/*.java"
    click XMLMappers "https://github.com/comppsyunion/nottinghamwall/tree/main/backend/wall-server/src/main/resources/mapper/"
    click Interceptors "https://github.com/comppsyunion/nottinghamwall/blob/main/backend/wall-server/src/main/java/cn/yiming1234/NottinghamWall/interceptor/JwtTokenAdminInterceptor.java"
    click Aspect "https://github.com/comppsyunion/nottinghamwall/blob/main/backend/wall-server/src/main/java/cn/yiming1234/NottinghamWall/aspect/AutoFillAspect.java"
    click ExceptionHandler "https://github.com/comppsyunion/nottinghamwall/blob/main/backend/wall-server/src/main/java/cn/yiming1234/NottinghamWall/handler/GlobalExceptionHandler.java"
    click Configs "https://github.com/comppsyunion/nottinghamwall/tree/main/backend/wall-server/src/main/java/cn/yiming1234/NottinghamWall/config/"
    click OSS "https://github.com/comppsyunion/nottinghamwall/blob/main/backend/wall-common/src/main/java/cn/yiming1234/NottinghamWall/utils/AliOssUtil.java"

    %% Legend
    subgraph "Legend"
        direction TB
        FE["Frontend"]:::frontend
        BE["Backend"]:::backend
        DBL["Database"]:::data
        EX["External"]:::external
    end

    %% Styles
    classDef frontend fill:#D6EAF8,stroke:#3498DB,color:#154360;
    classDef backend fill:#D5F5E3,stroke:#27AE60,color:#145A32;
    classDef data fill:#FCF3CF,stroke:#F1C40F,color:#7D6608;
    classDef external fill:#F5EEF8,stroke:#8E44AD,color:#512E5F;
```
