How danishdsouza/frie works
FRIE is a financial-readiness assessment app: users sign in, provide profile and financial documents, build assessment features, and view a score, explanations, and recommendations. The graph separates the browser experience, API boundary, backend domain services, and persistence. The README only describes running the code; workflow details come from sampled source and the SOURCE INDEX. Several route and service implementations were not sampled, so uncertain backend connections are omitted rather than inferred.
Main entry points: main.py FastAPI app · analysis.py Analysis routes · feature_engineering.py Feature engineering · api.ts API client
Components 32
Browser app
- App state
src/app/App.tsx - Sign-in view
src/app/views/LoginView.tsx - Dashboard
src/app/views/DashboardView.tsx - Documents view
src/app/views/DocumentsView.tsx - Analysis view
src/app/views/AnalysisView.tsx - Profile view
src/app/views/ProfileView.tsx - Portfolio views
src/app/views/PortfolioViews.tsx - Assessment controls
src/app/components/shared.tsx - API client
src/services/api.ts
API layer
- FastAPI app
backend/app/main.py - Authentication routes
backend/app/api/routes/auth.py - Document routes
backend/app/api/routes/documents.py - Analysis routes
backend/app/api/routes/analysis.py - Feature routes
backend/app/api/routes/features.py - Prediction routes
backend/app/api/routes/prediction.py - Profile routes
backend/app/api/routes/profile.py
Assessment services
- Account sessions
backend/app/services/auth_service.py - Document handling
backend/app/services/document_service.py - Document extraction
backend/app/services/extraction_service.py - File storage
backend/app/services/storage_service.py - Bank import
backend/app/services/bank_import.py - Feature engineering
backend/app/services/feature_engineering.py - Credit records
backend/app/services/credit_records.py - Transaction classifier
backend/app/services/transaction_classifier.py - Feature contract
backend/app/core/feature_contract.py - Scoring service
backend/app/services/prediction_service.py - Recommendations
backend/app/services/recommendation_service.py - Financial indicators
backend/app/services/indicator_service.py - Profile service
backend/app/services/profile_service.py
Persistence
- Database sessions
backend/app/db/session.py - FRIE records
backend/app/db/models.py
Other components
- FRIE user
Connections 39
- FRIE user → App state: uses
- App state → Sign-in view: renders
src/app/App.tsx - App state → Dashboard: renders
src/app/App.tsx - App state → API client: restores session
src/app/App.tsx - Dashboard → Assessment controls: uses
src/app/views/DashboardView.tsx - Documents view → API client: requests documents
src/app/views/DocumentsView.tsx - Profile view → API client: requests profile
src/app/views/ProfileView.tsx - Portfolio views → API client: requests data
src/app/views/PortfolioViews.tsx - Assessment controls → API client: builds and assesses
src/app/components/shared.tsx - API client → FastAPI app: HTTP requests
- FastAPI app → Authentication routes: registers
backend/app/main.py - FastAPI app → Document routes: registers
backend/app/main.py - FastAPI app → Analysis routes: registers
backend/app/main.py - FastAPI app → Feature routes: registers
backend/app/main.py - FastAPI app → Prediction routes: registers
backend/app/main.py - FastAPI app → Profile routes: registers
backend/app/main.py - Authentication routes → Account sessions: calls
backend/app/api/routes/auth.py - Account sessions → FRIE records: reads and writes
backend/app/services/auth_service.py - Document routes → Document handling: calls
backend/app/api/routes/documents.py - Document routes → Document extraction: calls
backend/app/api/routes/documents.py - Document routes → File storage: calls
backend/app/api/routes/documents.py - Document routes → Bank import: calls
backend/app/api/routes/documents.py - Document extraction → File storage: uses
backend/app/services/extraction_service.py - Analysis routes → Feature engineering: calls
backend/app/api/routes/analysis.py - Analysis routes → Scoring service: calls
backend/app/api/routes/analysis.py - Analysis routes → Recommendations: calls
backend/app/api/routes/analysis.py - Analysis routes → Financial indicators: calls
backend/app/api/routes/analysis.py - Analysis routes → Profile service: calls
backend/app/api/routes/analysis.py - Feature routes → Feature engineering: calls
backend/app/api/routes/features.py - Prediction routes → Scoring service: dispatches
- Profile routes → Profile service: dispatches
- Feature engineering → Bank import: reads imported data
backend/app/services/feature_engineering.py - Feature engineering → Credit records: uses
backend/app/services/feature_engineering.py - Feature engineering → Transaction classifier: uses
backend/app/services/feature_engineering.py - Feature engineering → Profile service: uses
backend/app/services/feature_engineering.py - Scoring service → Feature contract: validates inputs
backend/app/services/prediction_service.py - Scoring service → FRIE records: persists results
- Database sessions → FRIE records: creates sessions
backend/app/db/session.py - FastAPI app → Scoring service: loads model
backend/app/main.py