Using AI to Build Grade My Investments
How Claude AI accelerates development and enhances code quality in the Grade My Investments platform.
flowchart LR
subgraph DEV[Development-Time Use]
A[Architecture<br/>Planning]:::app
B[Code Generation<br/>EF - Blazor - APIs]:::app
C[Debugging<br/>Error Analysis]:::app
D[Code Review<br/>Security - QA]:::app
end
subgraph PROD[User-Facing AI Features]
E[File Analysis<br/>Wave 3]:::svc
F[Report Comparison<br/>Wave 4]:::svc
G[Dashboard Ask<br/>Claude]:::svc
end
Claude([Claude AI]):::ext --> A
Claude --> B
Claude --> C
Claude --> D
Claude --> E
Claude --> F
Claude --> G
E --> OUT1[(DOCX - HTML<br/>Output)]:::data
F --> OUT2[(Comparison<br/>DOCX)]:::data
G --> OUT3[Inline<br/>Analysis]:::data
classDef app fill:#1f2630,stroke:#C0894E,color:#F3EFE8;
classDef svc fill:#241c14,stroke:#E2B583,color:#F3EFE8;
classDef data fill:#22201a,stroke:#C0894E,color:#EBD3AE;
classDef ext fill:#1b1f27,stroke:#5A616B,color:#C4C0B8;
classDef sec fill:#1d2733,stroke:#5cc8e0,color:#eafaff;
Claude AI Integration
Claude AI has become an integral part of the Grade My Investments development workflow, providing intelligent assistance across multiple aspects of the development process:
- Code generation and refactoring
- Architecture planning
- Database design optimization
- API endpoint development
- Test creation and debugging
- Documentation generation
- Performance optimization
- Security best practices
Development Workflow Enhancement
- Entity Framework models
- Repository patterns
- Azure Functions
- Blazor components
- Error analysis
- Stack trace review
- Performance issues
- Logic debugging
- Code reviews
- Security audits
- Best practices
- Performance tuning
AI-Assisted Architecture
System Design
Claude assists in designing scalable architectures, microservices patterns, and data flow optimization
Infrastructure Planning
Helps plan Azure resource allocation, deployment strategies, and CI/CD pipeline configurations
Database Optimization
Provides guidance on Entity Framework configurations, query optimization, and schema design
Security Implementation
Ensures proper authentication, authorization, and data protection throughout the application
Claude API File Analysis (Wave 3)
Beyond using Claude as a development assistant, Grade My Investments integrates directly with the Anthropic Claude API to provide users with AI-powered file analysis. The Gmi.ClaudeAnalysis.Console background service processes user-submitted files through Claude's language models, delivering intelligent document analysis results saved as DOCX files alongside the source documents.
- 1. User right-clicks files/folders in ManageFolders and selects "Analyze with Claude"
- 2. Cost estimation is calculated and shown before analysis proceeds
- 3. Analysis requests are queued in the database (claudeanalysisjobs/claudeanalysisrequests)
- 4. The ClaudeAnalysis.Console background service picks up jobs in batches of 5
- 5. Files are sent to the Anthropic Claude API with concurrency of 3 and retry logic (3 attempts)
- 6. Results are saved as DOCX and HTML alongside the original source files
Documents
- DOCX / DOC
- TXT / MD
- JSON / XML
Data & Images
- CSV / XLSX / XLS
- PNG / JPG
- GIF / BMP
- WEBP
- Queue-based: Database-driven job queue
- Batching: 5 jobs per poll cycle
- Concurrency: 3 parallel API calls
- Retry: 3 attempts with backoff
- Rate limiting: Anthropic API throttling
- Billing: Token-based (input + output tokens)
- Markup: 80% over Anthropic API cost
- Estimation: Cost shown before analysis
- Models: Sonnet, Opus, Haiku available
- Transparency: Users approve cost before proceeding
Claude File Analysis API Endpoints (8)
- Estimate - Calculate cost before submission
- Submit - Queue analysis job
- Jobs - List user's analysis jobs
- Job Detail - Get individual job status/results
- Cancel - Cancel a pending analysis job
- Dismiss - Dismiss a completed job from the list
- Console Estimate - Cost estimate for a console question
- Console Ask - Submit a console question
Report Comparison with Claude (Wave 4)
Report Comparison lets users select two ML report generation runs from the same symbol list group and have Claude produce a detailed narrative analysis of what changed between them. The Gmi.ReportComparison.Console background service processes comparison jobs and generates DOCX output with 11 structured sections.
Processing Pipeline
- Batch size: 3 jobs per poll cycle
- Concurrency: 2 parallel API calls
- Stale timeout: 60 minutes
- Output: DOCX saved to "Report Comparisons" folder
API Endpoints (8)
- Groups, Runs, Estimate, Submit
- Jobs, Job Detail, Cancel, Dismiss
- Custom user questions included in output
Dashboard Ask Claude
The AI Report Dashboard includes a "Ask Claude" endpoint that lets users ask questions about their portfolio data directly from the dashboard. Claude receives the full dashboard context and provides specific, actionable analysis using Claude Sonnet 4.6. Admin notifications are sent on each request.
Productivity Metrics
75%
Faster Development
90%
Code Quality
95%
Documentation Coverage
60%
Bug Reduction
AI Capabilities
- Natural language to code
- Context-aware suggestions
- Multi-language support
- Real-time collaboration
Development Tools
- Claude Code (CLI agent)
- Visual Studio integration
- VS Code extensions
- JetBrains Rider support
- Azure DevOps pipelines
Best Practices
- Secure code generation
- Code review automation
- Performance optimization
- Error handling patterns
Innovation Areas
- Machine learning models
- Predictive analytics
- Natural language processing
- Automated testing
Learning Resources
- Claude AI Documentation
- AI-Assisted Development
- Code Quality Guidelines
- Best Practices Guide