How somowhere/albedo works
The Albedo project is a full‐stack enterprise rapid development platform where a robust back end (built on Spring Boot, Spring Security, and Mybatis) provides a suite of common services and modular business functions, while a modern Vue/Element‑UI front end (albedo‑ui) acts as the presentation layer. The project is organized as a multi‑module Maven project, with clear separations between common libraries, feature modules, plugins, and server applications.
Main Components
• Common Library Layer:
– albedo‑common: Contains core utilities, logging (albedo‑common‑log), security (albedo‑common‑security), and module base classes (albedo‑common‑module). This layer provides the foundational functionalities used throughout the system.
– albedo‑dependencies: As a BOM manager for dependency versions.
• Business Modules:
– albedo‑modules: Implements feature domains. Examples include albedo‑appendix (attachments), albedo‑file (file API with multiple storage strategies), albedo‑gen (code generation), albedo‑monitor (system monitoring), albedo‑quartz (scheduling), albedo‑sys (RBAC and permission management), and albedo‑tenant (multi‑tenant support).
• Plugin Layer:
– albedo‑plugins: Provides extendable capabilities such as caching (albedo‑cache‑starter), database enhancements (albedo‑database), dynamic datasource (albedo‑dynamic‑datasource), Swagger API documentation (albedo‑swagger‑api), and UID generation (albedo‑uid).
• Server/Service Layer:
– albedo‑servers: Contains standalone runnable services:
• albedo‑admin: The admin service (typically running on port 4000) which handles backend administrative operations.
• albedo‑app: Provides the main API service for client applications.
• albedo‑quartz: A dedicated task scheduler that runs periodic jobs.
• Presentation Layer:
– albedo‑ui: The front‑end codebase (using Vue with Element‑UI) that interacts with the back‑end services and offers the user interface.
Relationships and Interactions
• The albedo‑ui (front‑end) sends HTTP requests (possibly RESTful calls) to the backend servers (especially albedo‑admin and albedo‑app) for user authentication, RBAC management, file management, code generation, scheduling, and monitoring.
• Each server component leverages the common libraries (albedo‑common) for cross‑cutting concerns such as security, logging, and configuration.
• The feature-specific modules (within albedo‑modules) encapsulate business logic and interact with the database and redis caching systems. They are architected to be plugged into the servers.
• The plugin layer provides additional infrastructure functionality (e.g., caching, dynamic datasource management) that is integrated within the business modules and servers.
• External resources such as the database (MySQL, Oracle) and Redis are integrated into the system, with configurations defined (for example, in the albedo‑admin’s and albedo‑app’s application.yml files).
Architectural Patterns and Design Principles
• Modular Design: The clear separation between common libraries, business modules, plugins, and servers demonstrates a highly modular architecture. Each module is responsible for a distinct business domain.
• Layered Architecture: The design follows presentation, business logic, service, and data layers.
• Dependency Injection and Cross‑cutting Concerns: Use of Spring Boot and Spring Security indicate a reliance on dependency injection, AOP (for logging and transaction management), and centralized exception handling.
• Extensibility via Plugins: The plugin modules allow for extending core functionality (for instance, integration with third‑party caching or database drivers).
Relevant Technologies and Frameworks
• Backend: Spring Boot 2.7.x, Spring Security, Mybatis (Mybatis Plus), Hutool.
• Build/Dependency Management: Maven multi‑module structure.
• Frontend: Vue.js, Element‑UI, with standard tools like webpack, ESLint, and testing frameworks (Jest).
• Infrastructure: MySQL or Oracle database, Redis for caching and session management, and Docker/Docker‑Compose for containerization and deployment.