How anji-plus/report works
Main Components
• Frontend (report-ui):
• A Vue.js-based single-page application.
• Uses libraries such as element-ui, vue-router, vue-echarts, vuedraggable, and luckysheet for interactive dashboards and data visualizations.
• Provides the graphical dashboard designer, login flow, and report viewing interfaces.
• Backend (report-core):
• A Spring Boot application built on Java 1.8 (with Maven dependency management via pom.xml).
• Implements business modules for data source integration, dataset management, report management, user access control (accessAuthority, accessRole, accessUser), dashboard widgets, datasets, file management, and more.
• Uses MyBatis-plus for database operations, Flyway for database migrations, and relies on external JDBC drivers (for MySQL, oracle, postgresql, etc.).
• Database and Data Sources:
• The system requires a MySQL database (with support for other data sources such as Elasticsearch, Kudu, etc. via custom drivers).
• Migration scripts (under report-core/src/main/resources/db/migration) are deployed automatically using Flyway.
• Deployment/Operations Scripts:
• Scripts in the build, deploy, and bin directories (e.g., start.sh, stop.sh) and Docker configurations help containerize and launch the system.
• Documentation and Configuration:
• The ‘doc’ directory holds the user guide and system documentation.
• Configuration files such as bootstrap.yml and pom.xml files neatly organize dependency and environment settings.
Relationships and Data Flow
• The frontend (report-ui) communicates with the backend (report-core) through API endpoints.
• The backend acts as a controller/service layer to process incoming requests, apply business logic (across multiple modules like access control, chart data retrieval, dataset transformation, etc.), and interface with databases.
• Data flows from configured data sources (via JDBC drivers and custom data connectors in report-core/lib) into the backend, and then is pushed to the frontend for rendering dashboards.
• External libraries (such as luckysheet and vue-echarts) in the frontend directly render interactive charts and spreadsheets.
• Docker and Maven build scripts indicate that the system is designed with containerized and automated environment deployment in mind.
Architectural Patterns and Design Principles
• MVC Pattern on the backend is visible through controller, service, and DAO layers (e.g., AccessUserController, AccessUserService, and AccessUserMapper).
• Modular design: The codebase is separated into modules (access authority, user, role, dashboard, dataset, etc.) for clear separation of concerns.
• Frontend uses component-based design (Vue components) with reusable custom components for elements like charts and forms.
• The project supports front-end/back-end separation, which makes it easier to scale the system or update either side independently.
Key Technologies and Frameworks to Highlight
• Backend Technologies:
• Java Spring Boot, MyBatis-plus, Flyway, Maven.
• External JDBC driver libraries (MySQL, Oracle, PostgreSQL, etc.) for database interactions.
• Frontend Technologies:
• Vue.js, vue-router, webpack, ES6.
• UI libraries (element-ui, avue, vue-echarts) and libraries for drag-and-drop (vuedraggable) and interactive spreadsheet (luckysheet).