# yxj2018/springboot-vue-onlineexam architecture

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

- Interactive diagram: https://gitdiagram.com/yxj2018/springboot-vue-onlineexam
- Repository: https://github.com/yxj2018/springboot-vue-onlineexam

## Overview

##### Main Components
- Frontend Client: Represented by the “exam” directory where you have Vue components, router configurations, Vuex state management, and assets (including the UI library Element-UI). This component includes several modules such as admin, student, teacher, and chart components.
- Backend Server: Represented by the “springboot” directory which includes Java files such as controllers, services, mappers, and entity classes. This layer handles business logic, API endpoints, and data processing.
- Database Layer: While the file tree shows an “sql” folder containing “exam.sql”, this indicates that a relational database is used (likely MySQL or another RDBMS) for data persistence.
- External Services/UI Libraries: Although not a separate service component, the front-end uses third-party libraries (Vue, Element-UI) that should be noted. Also, there is a web page serving role with “exam/index.html” and a build system to create production-ready assets.

##### Relationships and Interactions
- Optionally, include interactions with external or third-party authentication services if available (information might be extended from configuration files or login endpoints).

##### Architectural Patterns and Design Principles
- Backend: Follows an MVC-like (Controller, Service, Repository/Mapper) pattern. Indicate the layers:
- Controllers manage HTTP requests.
- Services contain business logic.
- Mappers (or DAOs) interact directly with the database.
- Separation of Concern: The system is clearly divided into client and server layers which communicate via APIs.

##### Relevant Technologies and Frameworks
- Frontend: Vue.js, Element-UI, Webpack (build scripts and configuration in the “build” and “config” directories).
- Backend: SpringBoot, MyBatis (for ORM), Maven (see pom.xml and maven wrapper files), and Java.
- Build and Configuration Tools: Babel, Webpack, and other configuration tools used to package the front-end application.
- Database: Likely a relational database system represented by the “sql/exam.sql”.

##### Detailed Representation
- That even though you separate components, inter-component communication is clearly represented.

- The separation between the Vue-based frontend (with its various components and modules) and the SpringBoot backend (with its layered design: controllers, services, mappers).
- Integration with the database as the persistent data store.

This level of detail will help all stakeholders, including technical leads and developers, to quickly understand the structure and flow of the project.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Frontend Client"
        A1["Vue Application"]:::frontend
        A2["Admin Module"]:::frontend
        A3["Student Module"]:::frontend
        A4["Teacher Module"]:::frontend
        A5["Charts Module"]:::frontend
        A6["Build & Config"]:::frontend
        A1 --> A2
        A1 --> A3
        A1 --> A4
        A1 --> A5
        A1 --> A6
    end

    subgraph "Backend Server"
        B1["SpringBoot App"]:::backend
        B2["Controllers"]:::backend
        B3["Services"]:::backend
        B4["Mappers"]:::backend
        B1 --> B2
        B2 --> B3
        B3 --> B4
    end

    DB[(Relational Database)]:::db

    A1 -->|"API_Calls"| B1
    B4 -->|"SQL_Query"| DB

    click A1 "https://github.com/yxj2018/springboot-vue-onlineexam/tree/master/exam/"
    click A2 "https://github.com/yxj2018/springboot-vue-onlineexam/tree/master/exam/src/components/admin/"
    click A3 "https://github.com/yxj2018/springboot-vue-onlineexam/tree/master/exam/src/components/student/"
    click A4 "https://github.com/yxj2018/springboot-vue-onlineexam/tree/master/exam/src/components/teacher/"
    click A5 "https://github.com/yxj2018/springboot-vue-onlineexam/tree/master/exam/src/components/charts/"
    click A6 "https://github.com/yxj2018/springboot-vue-onlineexam/tree/master/exam/build"
    click B1 "https://github.com/yxj2018/springboot-vue-onlineexam/tree/master/springboot/"
    click B2 "https://github.com/yxj2018/springboot-vue-onlineexam/tree/master/springboot/src/main/java/com/exam/controller/"
    click B3 "https://github.com/yxj2018/springboot-vue-onlineexam/tree/master/springboot/src/main/java/com/exam/service/"
    click B4 "https://github.com/yxj2018/springboot-vue-onlineexam/tree/master/springboot/src/main/java/com/exam/mapper/"
    click DB "https://github.com/yxj2018/springboot-vue-onlineexam/blob/master/sql/exam.sql"

    classDef frontend fill:#FFF2CC,stroke:#D79B00,stroke-width:2px;
    classDef backend fill:#D0E0F0,stroke:#376092,stroke-width:2px;
    classDef db fill:#DFF0D8,stroke:#3C763D,stroke-width:2px;
```
