How baophucs/finreport works
FinReport is a financial-reporting and analysis system: users manage companies and reports through an API, uploaded reports are queued for background extraction and validation, and staff can review and approve the resulting data. The repository also exposes analysis, dashboard, chat, authentication, audit, and notification capabilities. The sampled excerpts establish the report-processing worker and persistence model; several other capabilities are represented by their source paths, but their internal calls were not sampled, so those links are omitted or marked unverified.
Main entry points: Program.cs HTTP API · ReportProcessorWorker.cs Report processor · FinReportContext.cs Application database · FinancialReportService.cs Report lifecycle
Components 24
API capabilities
- HTTP API
FinReport.API/Program.cs - Report endpoints
FinReport.API/Controllers/FinancialReportsController.cs - Company endpoints
FinReport.API/Controllers/CompaniesController.cs - Analysis endpoints
FinReport.API/Controllers/AnalysisReportsController.cs - Dashboard endpoints
FinReport.API/Controllers/DashboardController.cs - Chat endpoints
FinReport.API/Controllers/ChatController.cs - Metric endpoints
FinReport.API/Controllers/MetricsController.cs
Report workflow
- Report lifecycle
FinReport.Infrastructure/Services/FinancialReportService.cs - Report processor
FinReport.Worker/ReportProcessorWorker.cs - Report validation
FinReport.Infrastructure/Services/ReportValidationService.cs
Analysis and insights
- Analysis service
FinReport.Infrastructure/Services/AnalysisService.cs - Financial chat
FinReport.Infrastructure/Services/ChatBotService.cs
Identity and notifications
- Auth endpoints
FinReport.API/Controllers/AuthController.cs - Authentication
FinReport.Infrastructure/Services/AuthService.cs - Notifications
FinReport.Infrastructure/Services/NotificationService.cs - Live notifications
FinReport.Infrastructure/Hubs/NotificationHub.cs
Persistence and integrations
- Domain entities
FinReport.Core/Entity/FinancialReport.cs - Application database
FinReport.Infrastructure/Data/FinReportContext.cs - Repository layer
FinReport.Infrastructure/Data/BaseRepository.cs - File storage adapter
FinReport.Infrastructure/ExternalServices/MinioStorageService.cs - Azure OCR
FinReport.Infrastructure/ExternalServices/AzureOcrService.cs - Gemini analyst
FinReport.Infrastructure/ExternalServices/GeminiFinancialAnalyst.cs - Background job queue
FinReport.Infrastructure/ExternalServices/RedisBackgroundJobQueue.cs
Other components
- User
Connections 23
- User → HTTP API: sends requests
- HTTP API → Report endpoints: routes requests
- HTTP API → Company endpoints: routes requests
- HTTP API → Analysis endpoints: routes requests
- HTTP API → Dashboard endpoints: routes requests
- HTTP API → Chat endpoints: routes requests
- HTTP API → Metric endpoints: routes requests
- HTTP API → Auth endpoints: routes requests
- Report lifecycle → File storage adapter: stores files
- Report lifecycle → Background job queue: enqueues analysis
- Report processor → Background job queue: dequeues jobs
FinReport.Worker/ReportProcessorWorker.cs - Report processor → File storage adapter: retrieves files
FinReport.Worker/ReportProcessorWorker.cs - Report processor → Gemini analyst: requests extraction
FinReport.Worker/ReportProcessorWorker.cs - Report processor → Report validation: validates report
FinReport.Worker/ReportProcessorWorker.cs - Report processor → Live notifications: sends updates
FinReport.Worker/ReportProcessorWorker.cs - Auth endpoints → Authentication: delegates auth
- Report lifecycle → Application database: persists reports
- Report processor → Application database: updates status
- Repository layer → Application database: queries and writes
FinReport.Infrastructure/Data/BaseRepository.cs - Application database → Domain entities: maps entities
FinReport.Infrastructure/Data/FinReportContext.cs - Analysis endpoints → Analysis service: delegates analysis
- Chat endpoints → Financial chat: delegates chat
- Report processor → Azure OCR: extracts text