Feature Showcase
Table of Contents
- Introduction
- Project Structure
- Core Components
- Architecture Overview
- Detailed Component Analysis
- Dependency Analysis
- Performance Considerations
- Troubleshooting Guide
- Conclusion
- Appendices
Introduction
This document presents a comprehensive feature showcase for the BI Analysis Platform. It highlights real-time analytics dashboards with interactive visualizations, an AI-powered multi-agent analysis system, metric management and documentation, multi-tenant architecture with role-based access control (RBAC), data synchronization from external systems, and notification automation. For each feature, we describe concrete workflows, user value, and how the platform’s architecture enables performance, scalability, and integrations that differentiate it from alternatives.
Project Structure
The platform is organized around modular microservices built on the Kratos framework, unified by the bi-common component library. Key areas include:
- Analysis service (bi-analysis): exposes APIs for metrics, fields, templates, and dashboard queries.
- Tenant service (bi-tenant): manages multi-tenancy and RBAC.
- Notification service (bi-notify): automates alerts and notifications.
- Data ingestion services (bi-api-leke, bi-api-jushuitan): synchronize external systems via Kafka and HTTP.
- Frontend (ui-web): a Next.js application for dashboards and admin views.
- Common infrastructure (bi-common): Nacos, logging, database, caching, messaging, and OpenAPI tooling.
Diagram sources
- [bi-analysis/cmd/bi-analysis/main.go]
- [bi-common/README.md]
- [bi-api-leke/README.md]
- [bi-api-jushuitan/README.md]
- [bi-tenant/README.md]
- [bi-notify/README.md]
- [ui-web/README.md]
Section sources
Core Components
- Unified API responses and OpenAPI generation for discoverability and consistency.
- SQL builder and validator for safe, dynamic query construction.
- Field, field group, and field metadata management for metric catalogs.
- Template engine for reusable dashboard layouts.
- Multi-tenant and RBAC support for secure, isolated environments.
- Kafka-based asynchronous ingestion from external systems.
- Notification automation for alerting and operational workflows.
Section sources
- [bi-common/apitypes/README.md]
- [bi-analysis/internal/biz/sql_builder.go]
- [bi-analysis/internal/biz/sql_validator.go]
- [bi-analysis/internal/biz/field.go]
- [bi-analysis/internal/biz/field_group.go]
- [bi-analysis/internal/biz/field_meta.go]
- [bi-analysis/internal/biz/template.go]
- [bi-analysis/internal/biz/home.go]
- [bi-tenant/api/tenant/v1/tenant.proto]
- [bi-common/kafkax/README.md]
- [bi-notify/api/notify/v1/notify.proto]
Architecture Overview
The platform follows a microservices architecture with:
- Kratos-based services exposing HTTP/gRPC endpoints.
- bi-common providing shared infrastructure (Nacos, logging, DB, Redis, Kafka, OpenAPI tooling).
- OpenAPI generation and synchronization for API documentation.
- Nacos for configuration and service discovery.
- Kafka for asynchronous data ingestion and decoupling producers/consumers.
Diagram sources
Section sources
Detailed Component Analysis
Real-Time Analytics Dashboards with Interactive Visualizations
- Dashboard composition via templates and field metadata.
- Dynamic query building and validation for safe SQL generation.
- Unified API responses and OpenAPI documentation for client integrations.
Key workflows:
- Define metrics and fields with metadata.
- Compose templates with filters and aggregations.
- Render dashboards with interactive controls and real-time updates.
Value propositions:
- Business analysts: drag-and-drop metric composition and quick pivot analysis.
- Data scientists: programmable templates and validated SQL for reproducible analyses.
- Developers: consistent API responses and OpenAPI docs for rapid UI integration.
Diagram sources
- [bi-analysis/api/anls/v1/query.proto]
- [bi-analysis/internal/service/query.go]
- [bi-analysis/internal/biz/query.go]
- [bi-analysis/internal/biz/sql_builder.go]
- [bi-common/apitypes/middleware/encoder.go]
Section sources
- [bi-analysis/api/anls/v1/template.proto]
- [bi-analysis/internal/biz/template.go]
- [bi-analysis/api/anls/v1/home.proto]
- [bi-analysis/internal/biz/home.go]
- [bi-common/apitypes/README.md]
AI-Powered Multi-Agent Analysis System
- Agent orchestration and workflows orchestrated via TOML manifests and agent definitions.
- Multi-modal agent roles (analyst, architect, dev, PM, UX designer, etc.) for collaborative analysis.
- Workflows for research, story creation, documentation, and testing architecture.
Value propositions:
- Business analysts: guided discovery and hypothesis validation.
- Data scientists: automated EDA and model interpretation support.
- Developers: rapid scaffolding of analysis artifacts and documentation.
- Product managers: story mapping and requirement alignment.
[No sources needed since this diagram shows conceptual workflow, not actual code structure]
Metric Management and Documentation
- Field, field group, and field metadata management for cataloging metrics.
- SQL validator and order field validator to ensure correctness and safety.
- OpenAPI generation and synchronization for centralized documentation.
Value propositions:
- Data stewards: maintain consistent metric definitions and metadata.
- Analysts: discover and compose metrics confidently.
- Administrators: govern and audit metric usage.
Diagram sources
- [bi-analysis/api/anls-m/v1/field.proto]
- [bi-analysis/api/anls-m/v1/field_group.proto]
- [bi-analysis/api/anls-m/v1/field_meta.proto]
- [bi-analysis/internal/biz/sql_validator.go]
- [bi-analysis/internal/biz/order_field_validator.go]
Section sources
- [bi-analysis/internal/biz/field.go]
- [bi-analysis/internal/biz/field_group.go]
- [bi-analysis/internal/biz/field_meta.go]
- [bi-analysis/internal/biz/table.go]
- [bi-analysis/README.md]
Multi-Tenant Architecture with RBAC
- Tenant service defines multi-tenant boundaries and isolation.
- RBAC policies enforced via tenant-aware resource access.
- Nacos-based configuration and service discovery.
Value propositions:
- System administrators: manage tenants, policies, and resource quotas.
- Developers: tenant-aware APIs and consistent RBAC enforcement.
- Business analysts: isolated dashboards and metrics per tenant.
Diagram sources
- [bi-tenant/api/tenant/v1/tenant.proto]
- [bi-tenant/internal/service/tenant_service.go]
- [bi-common/registry/nacos/client.go]
Section sources
Data Synchronization from External Systems
- Asynchronous ingestion via Kafka topics for orders, items, refunds.
- HTTP-based SDK helpers for external APIs (e.g., Taobao LeKe).
- Streamload for StarRocks bulk ingestion.
Value propositions:
- Operations: reliable, scalable data pipelines.
- Data engineers: decoupled ingestion with retries and observability.
- Analysts: fresh, consistent datasets for dashboards.
Diagram sources
- [bi-api-leke/README.md]
- [bi-api-leke/internal/server/consumer_handlers.go]
- [bi-common/starrocks/streamload/README.md]
Section sources
- [bi-api-leke/README.md]
- [bi-api-jushuitan/README.md]
- [bi-api-jushuitan/common/sdkhelper/README.md]
- [bi-common/kafkax/README.md]
Notification Automation
- Notification service defines channels, templates, and triggers.
- Integrates with tenant and RBAC contexts for targeted delivery.
Value propositions:
- System administrators: automated alerts for anomalies and SLAs.
- Product teams: release notifications and status updates.
- Developers: CI/CD and deployment notifications.
Diagram sources
Section sources
Dependency Analysis
The platform leverages bi-common extensively for infrastructure, ensuring consistent behavior across services. Dependencies include:
- Nacos for configuration and service discovery.
- OpenAPI tooling for documentation generation and synchronization.
- Database clients (MySQL/StarRocks), Redis, and Kafka for storage and messaging.
Diagram sources
Section sources
Performance Considerations
- Microservices with Kratos enable horizontal scaling and independent deployments.
- OpenAPI generation and standardized responses reduce client-side complexity and improve throughput.
- Kafka-based ingestion decouples producers from consumers, improving resilience and throughput.
- bi-common components (logging, metrics, tracing) provide observability primitives for performance tuning.
- StarRocks streamload accelerates analytical workloads.
[No sources needed since this section provides general guidance]
Troubleshooting Guide
- Unified error responses: use the standardized response format and error codes to quickly diagnose issues.
- OpenAPI docs: verify endpoint signatures and payload schemas.
- Logs and metrics: leverage structured logging and metrics exposed by bi-common.
- Kafka ingestion: monitor consumer lag and retry policies.
Section sources
Conclusion
The BI Analysis Platform delivers a modern, scalable, and developer-friendly foundation for analytics. Its combination of real-time dashboards, AI-powered multi-agent workflows, robust metric management, multi-tenant isolation with RBAC, asynchronous data ingestion, and notification automation provides differentiated value across personas. The Kratos-based architecture, unified responses, and OpenAPI tooling accelerate development while ensuring reliability and performance.
[No sources needed since this section summarizes without analyzing specific files]
Appendices
- Quick start references for frontend and services.
- Environment-specific configurations and Nacos setup.
Section sources