How chillzhuang/springblade works
Main Components
• Authorization Service (blade-auth): Handles OAuth2-like authentication, token granters, and is responsible for verifying and issuing security tokens.
• API Gateway (blade-gateway): Acts as the single entry point routing requests to downstream services. It includes filters, JWT configuration, and error handling.
• Common Library (blade-common): Contains shared utilities, configurations, cache management, and other factors that are common throughout the microservices.
• Operations Center (blade-ops): A set of modules that includes:
• blade-admin for backend management.
• blade-develop for code generation.
• blade-resource for resource management.
• blade-seata-order and blade-seata-storage demonstrating distributed transaction management using Seata.
• Business Modules (blade-service): These include:
• blade-desk for the workbench or dashboard.
• blade-log for logging.
• blade-system for system management covering the administration of users, departments, roles, and more.
• Service APIs (blade-service-api): This package defines and encapsulates the APIs for business modules (e.g., blade-desk-api, blade-dict-api, blade-system-api, blade-user-api) which decouples the service contracts from their implementations.
Relationships and Interactions
• Authentication is handled separately by blade-auth, and it interacts with the API gateway to secure service calls.
• The service API layer (blade-service-api) illustrates the contracts (interfaces, DTOs) that the business modules implement. Represent these as an abstraction layer between the client-facing components and the service implementations.
• Seata-based transactional demos (blade-seata-order and blade-seata-storage) are integrated to showcase distributed transaction management; these should be shown as specialized modules that interact with each other (and possibly with a shared database resource) using Feign clients or other RPC calls.
Architectural Patterns and Technologies
• Microservices Pattern: Break down the platform into individual services easily deployable and scalable.
• Gateway and API Layer: Illustrate how Spring Cloud Gateway (blade-gateway) routes to microservices.
• Shared Libraries: Use common code encapsulated in blade-common to reduce redundancy.
• Distributed Transaction Management: Show how blade-seata modules incorporate Seata to handle distributed transactions.
• Containerization & Deployment: Note the existence of Dockerfiles in several modules (blade-auth, blade-gateway, blade-ops modules, etc.) and the Kubernetes deployment scripts in the script/kuboard directory.
• Core Technologies: Annotate key tech choices – Java 17+, Spring Boot 3.2, Spring Cloud 2023, Nacos for configuration and service registry, etc.