Open-source enterprise-level microservices multi-tenant system architecture, rapid development platform

1. Project Overview
Based on SpringBoot 2.x, SpringCloud, and SpringCloudAlibaba, and adopting a front-end and back-end separation enterprise-level microservice multi-tenant system architecture. And introduce the idea of componentization to achieve high cohesion and low coupling, the project code is concise and rich in comments, easy to get started, suitable for learning and enterprise use. It truly implements a stateless unified permission authentication solution based on RBAC, jwt, and oauth2, facing the Internet design and suitable for B-end and C-end users, supporting CI/CD multi-environment deployment, and providing convenient application management for third-party system access; at the same time, it also collects various microservice governance functions and monitoring functions. The modules include: enterprise-level authentication systems, development platforms, application monitoring, slow SQL monitoring, unified logs, single sign-on, Redis distributed high-speed caching, configuration centers, distributed task scheduling, interface documents, code generation, etc.
2. Open Source License
Licensed under Apache-2.0
3. Screenshots














4. Feature Overview

- The demonstration environment has comprehensive monitoring examples: log systems + APM systems + GPE systems
- Front-end and back-end separated enterprise-level microservice architecture
- Based SpringBoot2.x、Spring Cloud and Spring Cloud Alibaba
- Mainly aimed at solving the common non-functional requirements of microservices and business developmentNon-functional requirements
- Deep CustomizationSpring SecurityTrue implementation of stateless unified permission authentication solution based onRBAC、jwtandoauth2Stateless Unified Authorization Solution
- Internet-facing design, suitable for both B-end and C-end users
- Supports CI/CD multi-environment deployment
- Provides application management, making it easy for third-party systems to accessSupports multi-tenancy (application isolation)
- Introduces component-based thinking to achieve high cohesion, low coupling, and high configurability
- Emphasizes code standards, strictly controls package dependencies, and each project has minimal dependencies
- Very suitable for learning and enterprise use
Core Function
Unified authentication functionGateway unified authentication URL-level permission control supports OAuth2's four modes of login supports username, password, plus graphic verification code login supports phone number, password login supports OpenId login supports single sign-on for third-party systems
Distributed system foundation supportService registration and discovery, routing and load balancing service degradation and circuit breaking service rate limiting (URL/method level) unified configuration center unified log center unified search center unified distributed cache operation class, cacheManager configuration extension distributed lock distributed task scheduler supports CI/CD continuous integration (including front-end and back-end) distributed ID generator distributed transaction (strong consistency/ eventual consistency) log link tracking
System monitoring functionService call chain monitoring application topology graph application unified log query slow query SQL monitoring application throughput monitoring (qps, rt) service degradation, circuit breaking monitoring service rate limiting monitoring microservice monitoring server monitoring redis monitoring mysql monitoring elasticSearch monitoring nacos monitoring prometheus monitoring
Business foundation function support multi-tenant (application isolation) high-performance method-level idempotence support RBAC permission management, implement fine-grained control (method, URL level) quickly implement import, export functions database access layer automatically implement CRUD operations code generator based on Hutool various convenient development tools gateway aggregate all Swagger interface documents unified cross-domain processing unified exception handling
5. Tech Stack
1. Overall architecture diagram

Running environment
Tools
Version
Java
8
Maven
3.5.3
Redis
4+
Mysql
5.7+ ,8.0.14+
Elasticsearch
7.x
Code repository
gitee
Maven mirror
Aliyun mirror
IDE
Strongly recommended IDEA
Docker
1.13.1+
Environment Preparation
Preparation
- Maven configuration Aliyun mirror, modificationsettings.xmlFile inmirrorsBlock add the following content
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
- In IDEA installlombokPlugin
- In IDEA installMybatisX PluginPlugin (optional)
- Prepare database 5.7+ or 8.0.14+
- Initialize database
- Script path: zlt-doc/sql
- Prepare Redis
- Prepare registration center Nacos
- Download address: https://github.com/alibaba/nacos/releases
- Start command address: nacos\bin
- Ensure the machine has already had JDK1.8 's running environment, can be checked through java -version command
- #Windows directly run the following file
- startup.cmd
- nacos2.0After startup.cmd also changed to default cluster mode
- #Linux/Unix/Mac system defaults to cluster mode, so standalone needs to be added to switch to single machine mode
- sh startup.sh -m standalone
- Modify the configuration parameters in zlt-config/src/main/resources/application-dev.properties
- Database configuration
- Redis configuration
- Elasticsearch configurationNot necessary, if log function is not enabled, it can be ignored
- Sentinel configurationNot necessary, mainly used to display application throughput
- Modify the address parameters in zlt-config/src/main/resources/bootstrap.properties filenacosAddress parameters, such asnacosIf started on the local machine, change to the following address
spring.cloud.nacos.server-addr=127.0.0.1:8848

Essential startup modules
Essential startup modules
- Start authentication centerzlt-uaa
Run com.central.UaaServerApp
- Start user centerzlt-bussiness/user-center
Run com.central.UserCenterApp
- Start gatewayzlt-gateway/sc-gateway
Run com.central.SCGatewayApp
- Start front-end projectzlt-web/back-web
Run
com.central.web.BackWebApplication
Access system
http://127.0.0.1:8066 admin/admin
Optional extension modules
- 1. File center
- 2. Code generator
- 3. Microservice application monitoring
- 4. Unified configuration center
- 5. Unified log center
- 6. Slow query SQL
- 7. Distributed task scheduling
- 8. Service limit, degradation, and circuit breaker control panel and application throughput monitoring
- 9. APM monitoring
- 10. Distributed transaction (tx-lcn)
- 11. Search center
- 12. Home page (traffic statistics)
Module explanation
central-platform -- Parent project, public dependencies │ ├─zlt-business -- Business module first-level project │ │ ├─user-center -- User Center[7000] │ │ ├─file-center -- File Center[5000] │ │ ├─code-generator -- Code Generator[7300] │ │ ├─search-center -- Search Center │ │ │ ├─search-client -- Search Center client │ │ │ ├─search-server -- Search Center server[7100] │ │─zlt-commons -- Common tool first-level project │ │ ├─zlt-auth-client-spring-boot-starter -- Encapsulates spring security client end common operation logic │ │ ├─zlt-common-core -- Encapsulates common operation logic │ │ ├─zlt-common-spring-boot-starter -- Encapsulates common operation logic │ │ ├─zlt-db-spring-boot-starter -- Encapsulates database common operation logic │ │ ├─zlt-log-spring-boot-starter -- Encapsulates log common operation logic │ │ ├─zlt-redis-spring-boot-starter -- Encapsulates Redis common operation logic │ │ ├─zlt-loadbalancer-spring-boot-starter -- Encapsulates Loadbalancer and Feign common operation logic │ │ ├─zlt-sentinel-spring-boot-starter -- Encapsulates Sentinel common operation logic │ │ ├─zlt-swagger2-spring-boot-starter -- Encapsulates Swagger common operation logic │ │ ├─zlt-elasticsearch-spring-boot-starter -- Encapsulates Elasticsearch common operation logic │ │ ├─zlt-oss-spring-boot-starter -- Encapsulates object storage common operation logic │ │ ├─zlt-zookeeper-spring-boot-starter -- Encapsulates Zookeeper common operation logic │ ├─zlt-config -- Configuration Center │ ├─zlt-doc -- Project documents │ ├─zlt-gateway -- API gateway first-level project │ │ ├─sc-gateway -- Spring Cloud Gateway[9900] │ ├─zlt-job -- Distributed task scheduling first-level project │ │ ├─job-admin -- Task manager[8081] │ │ ├─job-core -- Task scheduling core code │ │ ├─job-executor-samples -- Task executor executor samples[8082] │ ├─zlt-monitor -- Monitoring first-level project │ │ ├─sc-admin -- Application monitoring[6500] │ │ ├─log-center -- Log Center[7200] │ ├─zlt-uaa -- Spring Security authentication center[8000] │ ├─zlt-register -- Registration center Nacos[8848] │ ├─zlt-web -- Front-end first-level project │ │ ├─layui-web -- Layui front-end[8066] │ │ ├─react-web -- React front-end[8066] │ ├─zlt-transaction -- Transaction first-level project │ │ ├─txlcn-tm -- Tx-lcn transaction manager[7970] │ ├─zlt-demo -- Demo first-level project │ │ ├─txlcn-demo -- Tx-lcn distributed transaction demo │ │ ├─seata-demo -- Seata distributed transaction demo │ │ ├─sharding-jdbc-demo -- Sharding-jdbc database sharding demo │ │ ├─rocketmq-demo -- Rocketmq and mq transaction demo │ │ ├─sso-demo -- Single sign-on demo