Ray.Hao ae660f57e9 feat(auth): 新增 App 扫码登录 PC 端
- 新增 auth/qrcode 模块:生成票据、轮询状态、换取会话令牌

- SecurityUser 增加 avatar 字段,UserSocial 支持按用户 ID 查认证信息

- 新增 QR_CODE_LOGIN Redis 票据与 A025x 扫码异常码

- security 白名单放行 /api/v1/auth/qr-code/*
2026-07-18 01:04:04 +08:00
2026-04-25 16:29:32 +08:00
2026-07-17 00:19:13 +08:00
2024-12-25 23:40:23 +08:00
2026-07-17 00:19:14 +08:00

youlai-boot youlai-boot

Enterprise-grade permission management backend based on Spring Boot 4

Spring Boot JDK License Gitee Star GitHub Star GitCode Star

Live Preview Mobile Preview Documentation 简体中文

Introduction

youlai-boot is an enterprise-grade permission management backend built on Spring Boot 4. It ships with the frontend vue3-element-admin and the mobile app youlai-app, and is one of 7 language implementations (Java / Node.js / Go / Python / PHP / C# / Rust) that share the same API specification and database schema. It is suitable for learning, reference, and secondary development of enterprise admin systems.

Core Features

  • 🔐 Security — Spring Security + JWT/Redis dual-session model, token renewal, multi-device mutual exclusion
  • 🛡️ Fine-grained permissions — 5-level RBAC: data → menu → button → API → field
  • Code generator — one-click generation of full-stack CRUD code
  • 📦 Complete modules — users, roles, menus, departments, dictionaries, files, scheduled tasks, message center, operation logs
  • 🌐 Multi-tenant SaaS — data isolation + tenant config, with a standalone youlai-boot-tenant edition
  • 🔌 Real-time communication — SSE push: online user count, dictionary sync, notification broadcast

System Preview

PC

PC Preview 1 PC Preview 2
PC Preview 3 PC Preview 4
PC Preview 5 PC Preview 6

Mobile

App Preview 1 App Preview 2 App Preview 3 App Preview 4

Quick Start

Requirements: JDK 17+ · MySQL 8.0+ · Redis 6.0+

  1. Clone: git clone https://gitee.com/youlaiorg/youlai-boot.git
  2. Import database: sql/youlai-admin.sql
  3. Adjust config (optional, a read-only online data source is configured by default): src/main/resources/application-dev.yml
  4. Start and visit http://localhost:8000/doc.html

Default credentials: admin / 123456

Detailed guide: https://www.youlai.tech/docs/server/spring-boot/quick-start.html

Tech Stack

Tech Version Description
Spring Boot 4.0.5 Core framework
Spring Security 6.x Auth & authorization
MyBatis-Plus 3.5.15 ORM
Druid 1.2.24 Connection pool
Redis + Redisson 6.0+ / 4.1.0 Cache · Session · Distributed lock
Caffeine 2.9.3 Local cache
XXL-Job 3.2.0 Distributed scheduled tasks
Knife4j 4.5.0 API docs
MapStruct 1.6.3 Object mapping
MinIO 8.5.10 Object storage

Directory Structure

youlai-boot/
├── deploy/
│   └── docker/                      # Docker orchestration
├── docs/                            # Docs and image assets
├── sql/                             # Database init scripts
├── src/                             # Source code
│   ├── YouLaiBootApplication.java   # Bootstrap class
│   ├── auth/                        # Auth (login/logout/token)
│   ├── codegen/                     # Code generator
│   ├── common/                      # Common module (constants/enums/response)
│   ├── file/                        # File service (MinIO/local/OSS)
│   ├── framework/                   # Technical framework layer
│   │   ├── apidoc/                  # OpenAPI / Knife4j
│   │   ├── cache/                   # Redis / Caffeine cache
│   │   ├── captcha/                 # Graphic captcha
│   │   ├── integration/             # SMS / Email / WeChat
│   │   ├── job/                     # XXL-Job scheduled tasks
│   │   ├── mybatis/                 # MyBatis-Plus config
│   │   ├── security/                # Security / JWT / Token
│   │   └── web/                     # Global exception / CORS / rate limit
│   ├── message/                     # SSE push
│   └── system/                      # Business (user/role/menu/dept)
└── pom.xml                          # Maven dependency management

Ecosystem

Frontend

Project Stack Description
vue3-element-admin Vue 3 + Element Plus PC admin frontend (recommended)
youlai-app Vue 3 + UniApp Mobile App

Backend

Project Stack Description
youlai-nest NestJS + TypeORM Node.js
youlai-gin Go + Gorm Go
youlai-django Django + DRF Python
youlai-fastapi FastAPI + SQLAlchemy Python
youlai-thinkphp ThinkPHP 8 PHP
youlai-aspnet ASP.NET Core C#
youlai-rust Axum + SeaORM Rust

youlai-boot also provides the following variants and branches: Multi-Tenant (Spring Boot 4) · MyBatis-Flex (Spring Boot 4) · Spring Boot 3 · PostgreSQL · Multi-Module

The seven backends share the same RESTful API specification and database schema, so the frontend can switch seamlessly.

Documentation

Resource Link
📖 Full docs site www.youlai.tech
🖥️ PC live preview vue.youlai.tech
📱 Mobile live preview app.youlai.tech
🔗 Apifox API docs apifox.com
🔗 Local API docs localhost:8000/doc.html

License

Released under the Apache License 2.0; free for commercial use.


Official WeChat Account
Official WeChat Account
     Mini Program
Mini Program
     Add author on WeChat
Add author on WeChat

Technical discussion · Feedback · Business cooperation

Description
No description provided
Readme Apache-2.0 21 MiB
Languages
Java 100%