How 202401206/fingenie works
FinGenie is a financial-document analysis product: users authenticate, upload bank statements (and, for business users, balance sheets), then access owned workspaces, transaction data, dashboards, and an AI assistant. The documented backend also covers private source storage, parsed persistence, upload recovery, preferences, and financial-data deletion. The graph reflects the sampled frontend/API wiring and parser/storage excerpts; several documented backend workflows are represented without detailed call edges because their route and service implementations were not excerpted.
Main entry points: api FastAPI endpoints · App.jsx Application shell · upload.py Upload processing · api.js API client
Components 33
Frontend experience
- Application shell
frontend/src/App.jsx - Sign-in and signup
frontend/src/features/auth - Auth context
frontend/src/context/AuthContext.jsx - Auth hook
frontend/src/hooks/useAuth.js - Upload page
frontend/src/features/upload/UploadPage.jsx - Upload service
frontend/src/features/upload/uploadService.js - Transaction history
frontend/src/features/transactions/TransactionHistoryPage.jsx - Settings
frontend/src/features/settings/SettingsPage.jsx - Display formatters
frontend/src/utils/formatters.js
API and identity
- API client
frontend/src/services/api.js - Supabase client
frontend/src/services/supabase.js - Supabase Auth
- FastAPI endpoints
backend/app/api - Authentication security
backend/app/core/security.py - Request limits
backend/app/core/rate_limits.py - Backend configuration
backend/app/core/config.py
Document ingestion
- Upload processing
backend/app/services/upload.py - File validation
backend/app/services/upload_validation.py - Bank statement parsers
backend/app/parsers/bank_statement - Balance sheet parsers
backend/app/parsers/balance_sheet - Parsed document schemas
backend/app/schemas/bank_statement.py - Balance sheet schema
backend/app/schemas/balance_sheet.py
Financial analysis
- Workspace reads
backend/app/api/workspace_dependencies.py - Bank KPIs
backend/app/analysis/bank_kpis.py - Balance sheet KPIs
backend/app/analysis/balance_sheet_kpis.py - Dashboard metrics
backend/app/analysis/dashboard_metrics.py - AI assistant and summaries
backend/app/ai
Data and recovery
- Private source storage
backend/app/services/source_storage.py - Supabase file storage
- Document repositories
backend/app/db/repositories - Parsed data and settings
backend/app/db/models.py - Upload recovery
backend/app/services/upload_recovery.py
Other components
- User
Connections 36
- User → Application shell: uses
README.md - Application shell → Auth hook: reads session
frontend/src/App.jsx - Sign-in and signup → Auth hook: uses
frontend/src/features/auth/LoginPage.jsx - Auth hook → Auth context: reads context
frontend/src/hooks/useAuth.js - Auth context → Supabase client: uses
frontend/src/context/AuthContext.jsx - Supabase client → Supabase Auth: authenticates
- Application shell → Upload page: renders
frontend/src/App.jsx - Upload page → Upload service: submits upload
frontend/src/features/upload/UploadPage.jsx - Upload service → API client: requests upload
frontend/src/features/upload/uploadService.js - API client → Supabase client: gets access token
frontend/src/services/api.js - API client → FastAPI endpoints: sends requests
README.md - FastAPI endpoints → Authentication security: verifies callers
backend/app/api/routes/auth.py - FastAPI endpoints → Request limits: limits requests
backend/app/api/router.py - Request limits → Backend configuration: reads configuration
backend/app/api/rate_limits.py - FastAPI endpoints → Upload processing: handles uploads
- Upload processing → File validation: validates files
- Upload processing → Bank statement parsers: parses statements
- Upload processing → Balance sheet parsers: parses sheets
- Bank statement parsers → Parsed document schemas: creates parsed data
backend/app/parsers/bank_statement/csv_parser.py - Balance sheet parsers → Balance sheet schema: creates parsed data
backend/app/parsers/balance_sheet/csv_parser.py - Upload processing → Private source storage: stores source
- Private source storage → Supabase file storage: uploads or removes
backend/app/services/source_storage.py - Upload processing → Document repositories: persists parsed data
- Document repositories → Parsed data and settings: reads and writes
- FastAPI endpoints → Upload recovery: supports recovery
- Application shell → API client: loads workspace data
frontend/src/App.jsx - FastAPI endpoints → Workspace reads: resolves workspace
backend/app/api/routes/ai.py - Workspace reads → Document repositories: reads owned data
- Workspace reads → Bank KPIs: analyzes bank data
- Workspace reads → Balance sheet KPIs: analyzes balance data
- FastAPI endpoints → Dashboard metrics: serves dashboards
- FastAPI endpoints → AI assistant and summaries: serves assistant
backend/app/api/routes/ai.py - Application shell → Transaction history: renders
frontend/src/App.jsx - Transaction history → Display formatters: formats values
frontend/src/features/transactions/TransactionHistoryPage.jsx - Application shell → Settings: renders
frontend/src/App.jsx - Settings → API client: requests settings
frontend/src/features/settings/SettingsPage.jsx