How guyc21/mailtoexcelautomation works
GoldenCare automates Hebrew finance-document intake and provides a backoffice for review, prompt management, sandbox testing, and regression evaluation. Its main workflow accepts email attachments or sandbox uploads, stores and extracts each document, applies deterministic business checks, records an audit trail, and syncs pending results to the Excel workbook. The graph also preserves dashboard, review, prompt, and ground-truth regression capabilities. Some subsystems are represented from README and source-index references; unsampled UI/API wiring is not inferred.
Main entry points: App.jsx Backoffice app · ingestion_pipeline.py Ingestion orchestrator · email.py Email endpoints · ingestion.py Ingestion audit records
Components 31
Backoffice UI
- Backoffice app
frontend/src/App.jsx - Dashboard
frontend/src/pages/DashboardPage.jsx - Prompt management
frontend/src/pages/HomePage.jsx - Sandbox
frontend/src/pages/SandboxPage.jsx - Document review
frontend/src/pages/ReviewPage.jsx - Regression testing
frontend/src/pages/RegressionPage.jsx - Ground-truth labeling
frontend/src/pages/LabelingPage.jsx - Prompt endpoints
backend/api/routes/prompts.py - Review endpoints
backend/api/routes/documents.py - Dashboard endpoints
backend/api/routes/dashboard.py
Document Intake
- FastAPI application
backend/main.py - Email endpoints
backend/api/routes/email.py - Sandbox upload
backend/api/routes/ingestion.py - Email parsing
backend/services/email_parser.py - File storage
backend/services/file_storage.py - Ingestion orchestrator
backend/services/ingestion_pipeline.py
Extraction and Validation
- Document extractor
backend/services/extraction/extractor.py - System envelope
backend/services/extraction/system_envelope.py - Provider adapters
backend/services/extraction/providers - Business validation
backend/services/validation/business_rules.py
Audit and Excel
- Operational database
backend/database.py - Ingestion audit records
backend/models/ingestion.py - Workbook synchronization
backend/services/excel_sync.py - Excel workbook
backend/repositories/excel_repository.py
Regression Suite
- Regression endpoints
backend/api/routes/regression.py - Regression runner
backend/services/regression/runner.py - Regression scorer
backend/services/regression/scorer.py - Labeling service
backend/services/regression/labeling.py
Other components
- Finance staff
- Email provider
- LLM providers
Connections 29
- Backoffice app → Dashboard: routes to
frontend/src/App.jsx - Backoffice app → Prompt management: routes to
frontend/src/App.jsx - Backoffice app → Sandbox: routes to
frontend/src/App.jsx - Backoffice app → Document review: routes to
frontend/src/App.jsx - Backoffice app → Regression testing: routes to
frontend/src/App.jsx - Backoffice app → Ground-truth labeling: routes to
frontend/src/App.jsx - Finance staff → Backoffice app: uses
- Email provider → Email endpoints: posts messages
- FastAPI application → Email endpoints: registers route
backend/main.py - FastAPI application → Sandbox upload: registers route
backend/main.py - Email endpoints → Email parsing: parses email
backend/api/routes/email.py - Email endpoints → Ingestion orchestrator: submits attachments
backend/api/routes/email.py - Sandbox upload → Ingestion orchestrator: submits document
backend/api/routes/ingestion.py - Ingestion orchestrator → File storage: stores file
backend/services/ingestion_pipeline.py - Ingestion orchestrator → Document extractor: extracts data
backend/services/ingestion_pipeline.py - Ingestion orchestrator → Business validation: validates result
backend/services/ingestion_pipeline.py - Ingestion orchestrator → Ingestion audit records: records outcome
backend/services/ingestion_pipeline.py - Ingestion orchestrator → Workbook synchronization: syncs pending
backend/services/ingestion_pipeline.py - Document extractor → System envelope: builds instructions
backend/services/extraction/extractor.py - Document extractor → Provider adapters: dispatches extraction
backend/services/extraction/extractor.py - Provider adapters → LLM providers: requests extraction
- Workbook synchronization → Excel workbook: upserts rows
backend/services/excel_sync.py - Workbook synchronization → Ingestion audit records: reads pending rows
backend/services/excel_sync.py - Prompt endpoints → System envelope: builds technical view
backend/api/routes/prompts.py - Review endpoints → Ingestion audit records: reads and edits
backend/api/routes/documents.py - Dashboard endpoints → Ingestion audit records: reads metrics
backend/api/routes/dashboard.py - Regression endpoints → Regression runner: runs suite
backend/api/routes/regression.py - Regression endpoints → Labeling service: labels cases
backend/api/routes/regression.py - Regression runner → Regression scorer: scores results