How yash-gif-pixel/momentum works
Momentum is a prototype with three user-facing capabilities: Credify underwriting, simulated climate cash-flow analysis, and on-device Scam Guard warnings. Borrowers and lenders use the Flutter app to submit or select a profile and inspect decision-support results; the backend validates submissions, applies a sufficiency gate, scores eligible histories, and returns explanations and portfolio views. The graph also includes the synthetic-data and shared cash-flow layers that underpin scoring. Some frontend and Scam Guard implementation details were not sampled, so those links are documented or left unverified.
Main entry points: main.py FastAPI routes · scorecard.py Analysis and response · router.py Climate API · main.dart App shell
Components 28
Flutter app
- App shell
frontend/lib/main.dart - Underwriting screens
frontend/lib/screens - Credify API client
frontend/lib/services/credify_http_service.dart - Climate screens
frontend/lib/features/climate - Scam Guard UI
frontend/lib/features/scam_guard
Credify underwriting
- FastAPI routes
backend/api/main.py - Startup profile cache
backend/api/dependencies.py - Analysis and response
backend/model/scorecard.py - Feature extraction
backend/features/feature_engine.py - Sufficiency gate
backend/features/sufficiency.py - Reason codes
backend/model/reason_codes.py - Authenticity checks
backend/model/authenticity.py - Scorecard artifact
backend/model/artifact.py - Validation metrics
backend/model/artifacts/metrics.json
Climate analysis
- Climate API
backend/climate/router.py - Impact estimation
backend/climate/impact.py - Scenario rainfall data
data/climate - Climate response schema
backend/climate/schemas.py
Scam Guard
- On-device heuristic
packages/scam_guard/lib/src/scam_guard_impl.dart - Warning rules
packages/scam_guard/lib/src/rules.dart
Data and scoring
- Synthetic profiles
backend/generator/generate_dataset.py - Profile schema
backend/generator/schema.py - Cash-flow primitives
backend/common/cashflow.py - History windows
backend/common/windows.py - Holdout labels
backend/labels/label_engine.py - API data contract
backend/contract/api_schema.py
Other components
- Borrower
- Lender
Connections 37
- Borrower → App shell: uses
README.md - Lender → App shell: uses
README.md - App shell → Underwriting screens: presents
- Underwriting screens → Credify API client: requests scoring
- Credify API client → FastAPI routes: calls API
README.md - App shell → Climate screens: presents
- Climate screens → Climate API: requests estimates
README.md - App shell → Scam Guard UI: presents
- Scam Guard UI → On-device heuristic: uses heuristics
- On-device heuristic → Warning rules: applies rules
- FastAPI routes → Startup profile cache: resolves profiles
backend/api/main.py - FastAPI routes → Analysis and response: analyzes profile
backend/api/main.py - FastAPI routes → Climate API: mounts routes
backend/api/main.py - FastAPI routes → API data contract: validates responses
backend/api/main.py - Analysis and response → Feature extraction: extracts features
backend/model/scorecard.py - Analysis and response → Sufficiency gate: checks sufficiency
backend/model/scorecard.py - Analysis and response → Scorecard artifact: predicts score
backend/model/scorecard.py - Analysis and response → Reason codes: builds explanations
backend/model/scorecard.py - Analysis and response → Authenticity checks: checks authenticity
backend/model/scorecard.py - Feature extraction → Cash-flow primitives: uses primitives
backend/features/feature_engine.py - Feature extraction → History windows: checks history
backend/features/feature_engine.py - Feature extraction → Profile schema: reads profiles
backend/features/feature_engine.py - Sufficiency gate → Cash-flow primitives: measures history
backend/features/sufficiency.py - Sufficiency gate → Profile schema: assesses profile
backend/features/sufficiency.py - Reason codes → Scorecard artifact: reads coefficients
backend/model/reason_codes.py - Authenticity checks → API data contract: returns result
backend/model/authenticity.py - Startup profile cache → Synthetic profiles: loads demo profiles
backend/api/dependencies.py - Synthetic profiles → Profile schema: creates profiles
backend/generator/generate_dataset.py - Holdout labels → Cash-flow primitives: derives labels
backend/labels/label_engine.py - Holdout labels → History windows: checks holdout
backend/labels/label_engine.py - Climate API → Startup profile cache: loads profiles
backend/climate/router.py - Climate API → Impact estimation: calculates impact
backend/climate/router.py - Climate API → Climate response schema: validates output
backend/climate/router.py - Climate API → Scenario rainfall data: reads scenarios
backend/climate/router.py - Impact estimation → Cash-flow primitives: uses cash-flow data
backend/climate/impact.py - Impact estimation → Profile schema: reads profile
backend/climate/impact.py - FastAPI routes → Validation metrics: serves model card
backend/api/main.py