How gcpaas/dataroom works
Components Identification
• Frontend/UI Layer: Represented by the “data-room-ui” folder and its extensive “packages” subdirectory. This part houses the UI components, dashboards, designer modules (big screen design, demo pages), and utilities (configuration files, npm scripts, assets).
• Backend/API Layer: Composed of the “DataRoom/dataroom-core” and “DataRoom/dataroom-server” directories. This layer contains the core business logic, REST controllers, service interfaces and their implementations, exception handling, and configuration classes. It also includes modules such as:
– Basic module: Handling pages and previews.
– Biz, chart, file, map, template, type, and permission modules.
– Utility and configuration packages for FTP, SFTP, Minio, and other integrations.
• Data Sources/Connector Modules: Show external data connections (e.g., SQL data, ElasticSearch, HTTP, JS/Groovy scripts) that are handled via dedicated modules and configuration beans (notice the different config packages and bean classes for FTP, SFTP, and Minio).
• External & Third-Party Services: Represent the integration points such as external authentication (e.g., Shiro, Security integration as mentioned) and the external resource libraries (for logos, images, etc.) that can be hosted separately.
Relationships and Data Flow
• Frontend interacts with the Backend’s REST APIs (from DataRoom/dataroom-server), sending requests for operations such as big screen management, design saving/updating, preview requests, and data fetches.
• The back end orchestrates various modules (from the core package) to process file uploads, manage datasets, schedule tasks (like preview clear tasks), and forward commands to underlying data sources.
• Persistence: The service layer communicates with the database (e.g., MySQL, Oracle) using MyBatisPlus and employs exception handling and custom permissions to protect data.
• External integration points such as file storage (FTP/SFTP/Minio) and data source adapters provide connectors between data-level operations and the business logic.
• Deployment: Docker configuration and script files indicate containerization for deployment.
Architectural Patterns and Design Principles
• MVC Pattern in the back end: Controllers (REST endpoints) → Services → DAOs.
• Modularization: The back end is divided by functionality into modules (basic, chart, file, map, template, type, permission, etc.), each encapsulating its own logic.
• Separation of Concerns: Clear division between visual UI components (Vue modules in “data-room-ui”), business logic (core modules), and infrastructure (data access and configuration).
• Extensibility: The heavy use of “packages” in the UI implies that new visual components or dashboards can be plugged in easily.
Additional Key Details
• Multi-layered integration (UI components, business logic, persistence, external interfaces).
• How the file structure reflects a “plugin-like” architecture in the UI (see the extensive “packages” folder with many independent component directories).
• Scheduling tasks (like PreviewClearTask) and configuration management (DataRoomConfig, Cors configurations, SwaggerBootstrapConfig).
– Include intermediary data flows through RESTful APIs.
– For a more detailed design, break down the backend layer into multiple modules (each representing a functionality area such as chart, file, map, etc.) and show how they interact with the persistence layer and external data sources.
– Incorporate deployment artifacts (Dockerfile, scripts) as part of the infrastructure layer.