Back to templates

Template details

Sz-Admin

Open-source RBAC admin dashboard scaffold on Spring Boot 4, Java 21/25, Vue 3, and Vite 7 with code generator, data permissions, and WebSocket support.

About this template

Sz-Admin is an open-source RBAC admin dashboard boilerplate that combines a Spring Boot 4 backend with a Vue 3 frontend, delivering role-based access control, code generation, data permissions, and WebSocket messaging as a runnable starting point for enterprise management systems.

What is Sz-Admin?

Sz-Admin is a full-stack scaffolding project maintained by developer feiyuchuixue under the Apache 2.0 license. It is split into three repositories: the sz-boot-parent backend, the sz-admin frontend, and the sz-deploy-v3 deployment scripts, with official documentation hosted at szadmin.cn. The backend uses Spring Boot 4.x, Java 21 LTS (default) or Java 25 LTS, Sa-Token, MyBatis-Flex, Liquibase, and Redis, while the frontend uses Vue 3.5, Vite 7.3, TypeScript 5.2, Element Plus 2.14, Pinia 3, and Vue Router 5. A live preview is available at preview.szadmin.cn, and the default login is admin / sz123456.

What makes Sz-Admin stand out?

  • Complete RBAC permission system — Includes user, role, menu, button permissions, and dynamic routing, with a super-admin fallback strategy that forms a closed permission loop.
  • Data permissions — Controls data access by user, department, or custom scope, integrated into system role authorization in the main workflow.
  • Code generator — Reads table structures, configures fields, previews code, and exports menus and initialization scripts, adapted for both MySQL and PostgreSQL.
  • Liquibase-managed migrations — Replaces the previous Flyway baseline with module-level changelogs for the framework, generator, and demo business modules.
  • Excel import/export — Built on FastExcel with support for import templates, failure records, dictionary formatting, and export field configuration.
  • OSS and file management — Uses a sceneCode-based resource model and AWS S3 SDK to connect to MinIO, Alibaba Cloud OSS, or Tencent Cloud OSS.
  • WebSocket messaging — A separate service (sz-service-websocket) handles real-time messages with multi-node forwarding, heartbeats, and authentication failure handling.
  • Interface anti-duplicate protection — Includes global or per-endpoint duplicate-request prevention built in.

The architecture separates backend concerns into sz-common (generic capabilities), sz-module (business modules such as sz-module-admin and sz-module-generator), and sz-service (deployable services like sz-service-admin and sz-service-websocket). The frontend organizes code into src/core, src/editions, src/modules, and src/views, with dynamic menu resolution trying module registration first, then a convention path in src/modules, then src/views as fallback.

Who is it for?

  • Enterprise back-office developers — Get accounts, roles, menus, departments, parameters, dictionaries, logs, and resource management working without writing them from scratch.
  • SaaS management teams — Build on top of system roles, menu permissions, data permissions, and module registration to extend business domains.
  • Teams doing long-term secondary development — Recommended to place custom business in independent sz-module-* modules, reducing coupling with official core code and making upgrades easier.
  • Rapid prototyping — Use the code generator to produce common CRUD pages, import/export, menus, and initialization scripts quickly.

What can you do with Sz-Admin?

  • Scaffold a new admin system: Clone the backend and frontend repos, configure MySQL or PostgreSQL plus Redis, and start the service — Liquibase creates the table structure automatically on first boot.
  • Add custom business modules: Create a new module such as sz-module-shop or sz-module-crm and register it in sz-service-admin, keeping official RBAC, dictionary, and generator features upgradable.
  • Deploy to a server: Use the sz-deploy-v3 Docker Compose repository to set up Redis, MySQL/PostgreSQL, MinIO, the backend, WebSocket, frontend static files, and a proxy service, with RockyLinux 10 as the preferred target OS.

How does Sz-Admin work?

The quick start for the backend is to clone sz-boot-parent, create an empty database, edit the MySQL or PostgreSQL config in config/local, set the DB_TYPE environment variable (postgresql if switching), modify the Redis config, and launch com.sz.AdminApplication from sz-service/sz-service-admin. The frontend uses corepack to prepare pnpm 10.17.1, then pnpm install and pnpm dev, with .env.development.local providing API base URLs and a proxy target of http://127.0.0.1:9991. WebSocket capabilities require starting the separate sz-service-websocket service.

FAQ

Is Sz-Admin free?

Yes, Sz-Admin is open source under the Apache License 2.0. The brand assets (name, logo, favicon) are independent from the source license, so separate permission is needed for public use of those assets.

What is the default login?

The default admin account is admin with password sz123456. You can change it after first login through the account management page.

Which databases are supported?

MySQL 8.0.17+ and PostgreSQL 16+ are supported, and you enable exactly one at runtime by setting DB_TYPE and including the corresponding sz-common-db-mysql or sz-common-db-postgresql dependency in sz-service-admin/pom.xml.

What Java version is required?

Java 21 LTS is the default and minimum baseline, and Java 25 LTS is also compatible; both compile to Java 21 bytecode. The dual-version support policy runs until 2026-08-31, after which the default and minimum baseline will move to Java 25.

Does Sz-Admin need a separate WebSocket service?

Only for real-time messaging features. The WebSocket service (sz-service-websocket) runs independently on port 9993 by default, while the main admin service runs on port 9991. If you do not need real-time messages, you can skip starting the WebSocket service.

screenshot of Sz-Admin on template0.com