How aru-0504/chargeguard works
ChargeGuard is a chargeback review workspace. A reviewer submits transaction details through the dashboard; the API scores the transaction, explains and records the decision, and supports case review, outcome tracking, and audit history. For fight decisions, the API can invoke the evidence workflow, whose draft can be reviewed, saved, and exported. Model inspection and retraining are supporting capabilities. Edges reflect the excerpts and README; unsampled route internals are not inferred.
Main entry points: main.py FastAPI routes · retrain_model.py Model retraining · page.tsx Review dashboard · db.py Database access
Components 14
Review workspace
- Review dashboard
frontend/src/app/page.tsx - API client
frontend/src/lib/api.ts - PDF export
frontend/src/app/page.tsx
Scoring service
- FastAPI routes
backend/app/main.py - Fraud model
backend/app/chargeback_model.pkl - Model metrics
backend/app/metrics.json - Case records
backend/app/models.py - Database access
backend/app/db.py - Case database
backend/app/db.py
Evidence workflow
- Evidence agent
agent/evidence_agent.py
Model operations
- Model retraining
backend/retrain_model.py - Training data
ml/data
Other components
- Reviewer
- OpenAI
Connections 14
- Reviewer → Review dashboard: uses
README.md - Review dashboard → API client: requests data
frontend/src/app/page.tsx - API client → FastAPI routes: HTTP requests
README.md - FastAPI routes → Fraud model: scores with
README.md - FastAPI routes → Model metrics: loads settings
backend/app/main.py - FastAPI routes → Database access: uses sessions
backend/app/main.py - Database access → Case records: initializes tables
backend/app/db.py - FastAPI routes → Case records: records cases
README.md - FastAPI routes → Evidence agent: invokes
backend/app/main.py - Evidence agent → OpenAI: drafts with
agent/evidence_agent.py - Review dashboard → PDF export: exports PDF
frontend/src/app/page.tsx - Model retraining → Training data: trains from
README.md - Model retraining → Database access: registers versions
backend/retrain_model.py - Model retraining → Case records: reads outcomes
backend/retrain_model.py