CC-76: AI Reporting Dashboard Proof of Concept#85
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request introduces an AI-powered reporting dashboard proof of concept that integrates Google's Gemini API to analyze restaurant order data. The implementation adds a "Weekly Report Analysis" section to the dashboard that performs static analysis on CSV data and displays structured insights including metrics, recommendations, and anomaly detection.
Changes:
- Added Google.GenAI SDK dependency (version 0.13.1) for AI-powered analytics
- Created AIReportingService to handle CSV analysis via Gemini API with structured JSON output
- Implemented AI analysis DTOs (AIAnalysisResultDTO, Metric, Section, Anomaly) to structure API responses
- Extended Dashboard.razor with interactive UI cards displaying AI-generated insights
- Added test data CSV with 100 sample order records including intentional anomalies
- Updated documentation to describe the new analytics dashboard functionality
- Configured GOOGLE_API_KEY environment variable in deployment workflow
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| CulinaryCommand.csproj | Adds Google.GenAI package dependency for Gemini API integration |
| Program.cs | Adds namespace import for AI reporting services (currently unused) |
| Dashboard.razor | Implements UI for displaying AI analysis results with loading states and structured data cards |
| AIReportingService.cs | Core service that reads CSV, constructs prompts, calls Gemini API, and deserializes responses |
| AIAnalysisResultDTO.cs | Defines data transfer objects for structured AI analysis results |
| test_data.csv | Provides sample restaurant order data for analysis, including test anomalies |
| docs/index.md | Documents the AI dashboard feature and expands Terraform documentation with accordion UI |
| deploy.yml | Configures GOOGLE_API_KEY environment variable for production deployment |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
antphan12
left a comment
There was a problem hiding this comment.
Everything looks good. Nice demo video!
rrrockey
left a comment
There was a problem hiding this comment.
Looks great, seems doable with the capabilities of MarginEdge
Quick demo of what the changes do here:
AI_PoC.mov
Change Summary:
GOOGLE_API_KEYand attached the API key so that our app has access to the model.test_data.csvso that it can do some static analysis. The GenAI's response is then cleaned up and displayed on our/dashboardendpoint.I also made some changes under the
doc/directory. I included information about Terraform and our dashboard. I'm slowly working on adding documentation on everything that we have so we have something to reference.** NOTE: this is a temporary place holder**
The GitHub copilot review explains what each file is for.