How furinai/oasys works
Main Components
• API Gateway – Represented by the “oasys-gateway” module. This acts as the front door to the backend microservices, handling routing, security (including WebFlux security), and cross-cutting concerns.
• Authentication Service – Represented by the “oasys-auth” module, which handles authentication, JWT-based security (with key configurations and jks files), and communicates with user-related components.
• Common Library – The “oasys-common” module contains common utilities (e.g., exception handling, global exception handler, JWT utilities) used by various services.
• Microservices – Each business functionality is split into its own service:
▪ Announcement Service (oasys-announcement)
▪ Attendance Service (oasys-attendance)
▪ Chat Service (oasys-chat) including WebSocket configuration and Pulsar messaging
▪ File Service (oasys-file) integrated with MinIO for file storage and management
▪ Search Service (oasys-search) providing file search via repository abstraction
▪ User Service (oasys-user) managing user, department, role, and permission entities
• External Clients & Integrations – Some services include REST client calls, e.g., Chat and File modules call AuthClient or UserClient, so denote external integrations or inter-service communications.
Relationships and Interactions
• The Authentication Service interacts with other services (e.g., via token validation) – illustrate these interactions between “oasys-auth” and other microservices.
• Shared utility functionality in “oasys-common” is used by each service. Indicate this as a common dependency (e.g., via a shared library block) that each backend service consumes.
• For the Chat and File services, include connections to external messaging components (e.g., web sockets in Chat, MinIO in File) and highlight the internal modules like the Interceptors, Containers, and Listeners used to handle real-time messaging.
Architectural Patterns and Design Principles
• Microservices Architecture – Emphasize the separation of concerns by breaking business capabilities into individual services.
• API Gateway – Acts as a façade decoupling the frontend from internal microservices.
• Security Layer – Highlight authentication and authorization responsibilities handled by the “oasys-auth” and the security configuration classes in both auth and gateway.
• Shared Library Pattern – Common utilities and exception handling are abstracted into “oasys-common”.
• Integration via REST Clients – Some services call each other using designated client classes (e.g., UserClient in multiple services).