This commit introduces a comprehensive, template-based analysis orchestration system, refactoring the entire analysis generation workflow from the ground up.
Key Changes:
1. **Backend Architecture (`report-generator-service`):**
* Replaced the naive analysis workflow with a robust orchestrator based on a Directed Acyclic Graph (DAG) of module dependencies.
* Implemented a full topological sort (`petgraph`) to determine the correct execution order and detect circular dependencies.
2. **Data Models (`common-contracts`, `data-persistence-service`):**
* Introduced the concept of `AnalysisTemplateSets` to allow for multiple, independent, and configurable analysis workflows.
* Created a new `analysis_results` table to persist the output of each module for every analysis run, ensuring traceability.
* Implemented a file-free data seeding mechanism to populate default analysis templates on service startup.
3. **API Layer (`api-gateway`):**
* Added a new asynchronous endpoint (`POST /analysis-requests/{symbol}`) to trigger analysis workflows via NATS messages.
* Updated all configuration endpoints to support the new `AnalysisTemplateSets` model.
4. **Frontend UI (`/config`, `/query`):**
* Completely refactored the "Analysis Config" page into a two-level management UI for "Template Sets" and the "Modules" within them, supporting full CRUD operations.
* Updated the "Query" page to allow users to select which analysis template to use when generating a report.
This new architecture provides a powerful, flexible, and robust foundation for all future development of our intelligent analysis capabilities.
45 lines
1.0 KiB
TOML
45 lines
1.0 KiB
TOML
[package]
|
|
name = "report-generator-service"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
# Web Service
|
|
axum = "0.8.7"
|
|
tokio = { version = "1.0", features = ["full"] }
|
|
tower-http = { version = "0.6.6", features = ["cors"] }
|
|
|
|
# Shared Contracts
|
|
common-contracts = { path = "../common-contracts" }
|
|
|
|
# Message Queue (NATS)
|
|
async-nats = "0.45.0"
|
|
futures = "0.3"
|
|
|
|
# Data Persistence Client
|
|
reqwest = { version = "0.12.4", default-features = false, features = ["json", "rustls-tls"] }
|
|
|
|
# Concurrency & Async
|
|
async-trait = "0.1.80"
|
|
dashmap = "6.1.0" # For concurrent task tracking
|
|
uuid = { version = "1.6", features = ["v4", "serde"] }
|
|
|
|
# Serialization
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
|
|
# Logging & Telemetry
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
# Configuration
|
|
config = "0.15.19"
|
|
secrecy = { version = "0.10.3", features = ["serde"] }
|
|
|
|
# Error Handling
|
|
thiserror = "2.0.17"
|
|
anyhow = "1.0"
|
|
chrono = "0.4.38"
|
|
tera = "1.19"
|
|
petgraph = "0.6.5"
|