How dromara/ruoyi-cloud-plus works
Major layers and components
a. External Client and Frontend Applications:
– Although the core backend source code is here, note that there is an associated front‑end project (plus‑ui, ruoyi‑plus‑vben5) as mentioned in the README. Represent front‑end clients (web, mobile, and admin dashboards) as separate entry points.
b. API Gateway:
– The “ruoyi‑gateway” module implements the gateway using Spring Cloud Gateway. This component is responsible for routing, cross-cutting concerns (authentication, logging, CORS, etc.), and possibly internal request filtering.
c. Authentication Service:
d. Core API-Layer and Common Libraries:
– The “ruoyi‑api” module and “ruoyi‑common” modules provide common API definitions (including remote API interfaces for resource, system, and workflow functionalities) along with shared utility classes, validations, and exception constants.
e. Business Microservices (Modules):
– Under “ruoyi‑modules” you have multiple business services such as:
• ruoyi‑gen (code generation),
• ruoyi‑job (distributed job scheduling),
• ruoyi‑resource (file, email, SMS, OSS management),
• ruoyi‑system (user, role, department, menu management),
• ruoyi‑workflow (workflow and process management).
Each module offers specific business functionality. They use common building blocks and APIs as defined in the common and API modules.
f. Messaging & Test Components:
g. Visual and Monitoring Components:
– The “ruoyi‑visual” grouping includes several components for monitoring and platform management (ruoyi‑monitor, ruoyi‑nacos, ruoyi‑seata‑server, ruoyi‑sentinel‑dashboard, ruoyi‑snailjob‑server). These modules handle system visualization, distributed configuration, transaction management, and service protection (sentinel, skywalking tracing).
Infrastructure and External Services
– Distributed Configuration and Service Registry: Highlight that the system integrates with Alibaba Nacos (for configuration and service discovery).
– RPC and Service Communication: Note that the system uses Apache Dubbo 3.x for high-performance RPC calls between microservices.
– Distributed Transaction Management: The project integrates Alibaba Seata for distributed transaction support.
– Distributed Caching & Messaging: Redis (with Redisson) is used extensively for caching, rate limiting, and session management. External message queues such as Kafka, RocketMQ, and RabbitMQ form the backbone for asynchronous communication.
– Additional elements include distributed security (Sa‑Token and JWT), file storage (Minio or cloud storage via S3 protocols), and built‑in support for code generation, Excel processing, and data permission filtering.
How to visually represent the architecture
– Group common libraries (ruoyi‑common, ruoyi‑api) in a shared “Common Infrastructure” section that all microservices depend on.
b. Interconnections and Data Flow:
– The API Gateway routes authentication requests to the Auth Service and business requests to the corresponding microservices.
– Illustrate inter-service communication – for example, the business services call each other’s remote APIs (via Dubbo) as needed.
– Indicate connections to infrastructure components like the database, Redis cache, message queues, and the Nacos configuration center.
– Optionally, mention external monitoring systems (Spring Boot Admin, Prometheus/Grafana, SkyWalking) that subscribe to logs and traces from various services.
d. Annotations and Legends:
– Include annotations for key frameworks (e.g., Spring Cloud Gateway, Apache Dubbo, MyBatis-Plus, Sa‑Token) next to the component they support.
a. Sketching out the core modules (Gateway, Auth, Business Services) in a rough layout.
b. External clients to the gateway, then cascade to individual services.
c. Insert infrastructure services at the base (configuration, registry, databases, caches, messaging, monitoring).
d. Verify directional flows (for example, API Gateway login requests to Auth Service, business requests routed to ruoyi‑system or ruoyi‑workflow, etc.).