How hariharan024/genai-management-decision-system works
The system turns customer reviews, sales records, and store images into management insights, exposed through a FastAPI dashboard and a generated report. The main pipeline orchestrates the analysis stages; review analysis can use Gemini or a local fallback. Edges follow the sampled source and README. The React-to-dashboard request and documented Gemini integration are shown; unsampled routes and data flows are omitted where their wiring is not evidenced.
Main entry points: main.py Pipeline Orchestrator · api.py FastAPI · batch_analyzer.py Batch Review Analysis · sentiment.py Sentiment Analysis
Components 18
Dashboard and API
- Dashboard UI
frontend/src/main.jsx - FastAPI
app/api.py
Customer Feedback
- Review File
data/feedback/reviews.txt - Batch Review Analysis
app/batch_analyzer.py - Sentiment Analysis
app/sentiment.py - Sentiment Prompt
app/prompts.py - Analysis Cache
data/feedback/analysis_results.json
Business Analysis
- Pipeline Orchestrator
app/main.py - Feedback Aggregation
app/aggregation.py - Sales CSV
data/sales/sales_data.csv - Sales Analytics
app/sales_analysis.py - Store Images
data/images/store - Image Analysis
app/image_analysis.py
Decision and Reporting
- Decision Engine
app/decision_engine.py - Report Generator
app/report_generator.py - Management Report
outputs/reports/management_report.md
Other components
- Manager
- Gemini API
Connections 19
- Manager → Dashboard UI: uses
frontend/src/main.jsx - Dashboard UI → FastAPI: fetches dashboard
frontend/src/main.jsx - FastAPI → Pipeline Orchestrator: runs pipeline
app/api.py - FastAPI → Sentiment Analysis: analyzes review
app/api.py - FastAPI → Store Images: serves images
app/api.py - Pipeline Orchestrator → Batch Review Analysis: analyzes reviews
app/main.py - Batch Review Analysis → Review File: loads reviews
app/batch_analyzer.py - Batch Review Analysis → Sentiment Analysis: analyzes uncached
app/batch_analyzer.py - Batch Review Analysis → Analysis Cache: reads and writes
app/batch_analyzer.py - Sentiment Analysis → Sentiment Prompt: formats prompt
app/sentiment.py - Sentiment Analysis → Gemini API: requests analysis
app/sentiment.py - Pipeline Orchestrator → Feedback Aggregation: aggregates reviews
app/main.py - Pipeline Orchestrator → Sales Analytics: analyzes sales
app/main.py - Sales Analytics → Sales CSV: reads CSV
- Pipeline Orchestrator → Image Analysis: analyzes images
app/main.py - Image Analysis → Store Images: scans directory
- Pipeline Orchestrator → Decision Engine: builds decision
app/main.py - Pipeline Orchestrator → Report Generator: generates report
app/main.py - Report Generator → Management Report: writes report
app/report_generator.py