Yudao (ruoyi-vue-pro) Rapid Development Platform

repository·master·Indexed 13 days ago

https://github.com/yunaiv/ruoyi-vue-pro

A comprehensive open-source rapid development platform featuring a Spring Boot backend and multiple frontend options (Vue2/3, uni-app). It includes extensive business modules such as CRM, ERP, Mall, WMS, and MES, alongside a Flowable-based BPM engine, SaaS multi-tenancy, and a robust code generation system. Supports various JDK versions (8, 17/21, 25) and Spring Boot versions (2.7, 3.5, 4.x) across full and mini versions.

Tokens
11.8K
Snippets
31
Records
55
Agent score
99%

What's inside Yudao

  1. Overview of yudao-mall-uniapp

    master

    The yudao-mall-uniapp repository provides a mobile frontend built on the uniapp framework. It is designed to support multiple platforms including WeChat Mini Programs, WeChat Official Accounts, and H5 mobile web. Future support is planned for Alipay Mini Programs and Douyin Mini Programs.

    Key business capabilities include:

    • SaaS Multi-tenancy: Supports multiple tenants.
    • E-commerce Features: Product management, orders, payments, membership, coupons, flash sales (秒杀), group buying (拼团), price bargaining (砍价), distribution (分销), and points (积分).
  2. Overview of Built-in Business Modules

    master

    The project provides a layered architecture of business functions that can be used to quickly build business systems. The modules are categorized into:

    1. Mandatory Common Modules: System functions and Infrastructure.
    2. Optional Common Modules: Workflow (BPM), Payment System, Data Reporting, and Member Center.
    3. On-demand Business Systems: Specialized systems including Mall (E-commerce), OA (Office Automation), ERP (Enterprise Resource Planning), WMS (Warehouse Management), CRM (Customer Relationship Management), CMS (Content Management), MES (Manufacturing Execution), AI Large Model Platform, IoT (Internet of Things), IM (Instant Messaging), Mobile, and Report Data Screens.
  3. Understand the RuoYi-Vue-Pro Module Structure

    master

    The project is organized into several Maven modules that separate core framework logic from specific business domains. This modularity allows you to extend the system by adding new modules or focusing on specific business capabilities.

    Core Modules:

    • yudao-dependencies: Centralized Maven dependency version management.
    • yudao-framework: Extensions to the Java framework.
    • yudao-server: The main backend service serving both the Admin management platform and User mobile apps.

    Business Domain Modules:

    • yudao-module-system: Core system functionalities.
    • yudao-module-member: Membership center.
    • yudao-module-infra: Infrastructure services.
    • yudao-module-bpm: Business Process Management (Workflow).
    • yudao-module-pay: Payment systems.
    • yudao-module-mall: E-commerce/Mall systems.
    • yudao-module-erp: ERP systems.
    • yudao-module-crm: CRM systems.
    • yudao-module-mes: Manufacturing Execution Systems.
    • yudao-module-wms: Warehouse Management Systems.
    • yudao-module-im: Instant Messaging.
    • yudao-module-ai: AI Large Language Model integration.
    • yudao-module-iot: Internet of Things.
    • yudao-module-mp: WeChat Official Account integration.
    • yudao-module-report: Big screen reporting/dashboards.
  4. Workflow (BPM) Engine Capabilities

    master

    The workflow engine is built on Flowable and supports both a lightweight SIMPLE Designer (DingTalk/Feishu style) for quick configuration and a standard BPMN Designer for complex orchestration.

    Key workflow features include:

    • Approval Logic: Multi-person signing (All must agree), OR signing (Any one can approve), Sequential signing (A then B then C), and Delegation/Transfer (A to B, or A to B and back to A).
    • Process Control: Rejection (to initiator or specific nodes), Cancellation (by initiator), Termination (by admin), and Adding/Reducing signers (Add/Reduce sign).
    • Advanced Routing: Condition branches (Exclusive), Parallel branches, Inclusive branches (Condition + Parallel), and Route branches (Redirection).
    • Automation & Nodes: Trigger nodes (HTTP requests/callbacks, data updates), Delay nodes (fixed duration/date), and Parent-Child processes (Sync/Async).
    • Management: Form permissions (Read/Edit/Hide), Timeout approval (auto-trigger actions), and Automatic reminders (SMS/Email/In-app).
  5. Core Platform Architecture and Capabilities

    master

    ruoyi-vue-pro is a rapid development platform with the following technical stack and features:

    Technical Stack

    • Backend: Spring Boot multi-module architecture, MySQL + MyBatis Plus, Redis + Redisson.
    • Database Support: MySQL, Oracle, PostgreSQL, SQL Server, MariaDB, Dameng (DM), TiDB.
    • Message Queues: Event, Redis, RabbitMQ, Kafka, RocketMQ.
    • Security: Spring Security & Token & Redis. Supports multi-terminal authentication, multiple user systems, and SSO (Single Sign-On).
    • Workflow: Flowable (supports dynamic forms, online design, signing/counter-signing, and various task assignment methods).
    • Real-time Communication: Spring WebSocket with built-in Token validation and cluster support.
    • Mobile: uni-app for cross-platform support (App, Mini-program, H5).

    Key Features

    • SaaS Multi-tenancy: Supports custom permissions per tenant with transparent underlying encapsulation.
    • Code Generation: One-click generation of Java, Vue frontend code, SQL scripts, and API documentation (supports single table, tree table, and master-child table).
    • Third-party Integrations: WeChat (Mini-program, Official Account, Work WeChat), DingTalk, Alipay, WeChat Pay, SMS channels (Aliyun, Tencent), and Cloud Storage (MinIO, Aliyun, Tencent, Qiniu).
  6. Initialize SQL Server, DM, Kingbase, and OpenGauss Databases

    master

    For certain databases, you must manually run an initialization command after the container is up. Follow the specific command for your database type:

    SQL Server

    docker compose exec sqlserver bash /tmp/create_schema.sh

    DM (Dameng)

    Note: It is recommended to use PAGE_SIZE=16 and UNICODE_FLAG=1 for DM8 initialization to maintain character length semantics consistent with MySQL. You must run SET DEFINE OFF; to prevent & characters from being treated as variables.

    docker compose exec dm8 bash -c 'printf "SET DEFINE OFF;\n" > /tmp/schema-with-define-off.sql && cat /tmp/schema.sql >> /tmp/schema-with-define-off.sql && /opt/dmdbms/bin/disql SYSDBA/SYSDBA001 `/tmp/schema-with-define-off.sql'

    KingbaseES

    docker compose exec kingbase bash -c 'ksql -U $DB_USER -d test -f /tmp/schema.sql'

    Huawei OpenGauss

    docker compose exec opengauss bash -c '/usr/local/opengauss/bin/gsql -U $GS_USERNAME -W $GS_PASSWORD -d postgres -f /tmp/schema.sql'
    # Example for SQL Server
    docker compose exec sqlserver bash /tmp/create_schema.sh
  7. Convert MySQL SQL to Other Databases

    master

    The sql/tools/convertor.py script converts the project's MySQL database file (sql/mysql/ruoyi-vue-pro.sql) into scripts for other database engines.

    Supported Targets: oracle, postgres, sqlserver, dm8, kingbase, opengauss, highgo.

    Steps:

    1. Install the required dependency: pip install simple-ddl-parser
    2. Run the converter from the sql/tools/ directory. You can print the output to the terminal or redirect it to a file.
    # Install dependency
    pip install simple-ddl-parser
    
    # Generate PostgreSQL script to terminal
    python3 convertor.py postgres
    
    # Generate and save to a file
    python3 convertor.py postgres > tmp.sql
    
    # Generate and save directly to a target directory
    python3 convertor.py highgo ../mysql/ruoyi-vue-pro.sql > ../highgo/ruoyi-vue-pro.sql
  8. Deploy the system using Docker Compose

    master

    You can deploy the entire system using docker compose. The deployment uses a docker.env file for environment variable configuration.

    • Start services: Use docker compose up -d to start services in the background. The first run will automatically build the necessary images.
    • Manual build: Use docker compose build [service] to manually build all images or a specific service image.
    • Environment configuration: While docker-compose.yml provides sufficient defaults, you can explicitly pass an environment file using the --env-file flag.
    docker compose --env-file docker.env up -d