Skip to content

Add API Trace Viewer, Recipient Verification, Cash Flow Analytics, and Approval Threshold Rules#248

Merged
rohan911438 merged 1 commit into
rohan911438:mainfrom
dimka90:feat/issues-236-237-238-239
May 30, 2026
Merged

Add API Trace Viewer, Recipient Verification, Cash Flow Analytics, and Approval Threshold Rules#248
rohan911438 merged 1 commit into
rohan911438:mainfrom
dimka90:feat/issues-236-237-238-239

Conversation

@dimka90
Copy link
Copy Markdown
Contributor

@dimka90 dimka90 commented May 30, 2026

Summary

This PR implements four features that enhance debugging, verification, analytics, and transfer governance.

Issue #236 - Add API Request Trace Viewer

  • Backend: RequestTraceService captures API request traces with correlation IDs, method, path, status code, timing, and error details. Routes at /admin/traces with filtering by correlation ID, method, status, date range, and pagination.
  • Frontend: AdminApiTraces page with stats cards, filterable trace table, expandable rows showing full request/response details, and auto-refresh.

Issue #237 - Add Recipient Verification Badge System

  • Backend: VerificationService manages recipient verification status, badge assignment, trust scoring, and verification requests. Endpoints for creating/approving/rejecting verification requests.
  • Frontend: VerificationBadge component with tooltip support (verified/trusted/frequent/business/new badges). RecipientVerification admin page with two tabs: verified recipients list and pending verification requests with approve/reject actions.

Issue #238 - Add Cash Flow Analytics Dashboard

  • Backend: CashFlowAnalyticsService with demo data generating 90-day daily trends, 6-month summaries, top recipients, and funding sources.
  • Frontend: CashFlowAnalytics page with summary cards, monthly bar chart (inflow vs outflow), 30-day net flow trend area chart, pie chart of funding sources, top recipients list, and monthly breakdown table.

Issue #239 - Add Transfer Approval Threshold Rules

  • Backend: ApprovalThresholdService with configurable rules engine supporting conditions (amount_above, amount_below, amount_range, destination_country, risk_score, user_tier, daily_volume) and actions (allow, require_approval, require_second_approval, require_compliance_review, block). Full CRUD + toggle endpoints.
  • Frontend: AdminThresholdRules page with approval levels overview, rules list with enable/disable toggle, edit/delete actions, and a create/edit dialog with form fields for all rule properties.

Files Changed

Backend (new):

  • backend/src/modules/traces/requestTraceService.ts
  • backend/src/routes/traces.ts
  • backend/src/modules/verification/verificationService.ts
  • backend/src/routes/verification.ts
  • backend/src/modules/analytics/cashFlowAnalyticsService.ts
  • backend/src/routes/analytics.ts
  • backend/src/modules/approvals/approvalThresholdService.ts
  • backend/src/routes/thresholds.ts

Backend (modified):

  • backend/src/container.ts - register 4 new services
  • backend/src/app.ts - register 4 new route modules

Frontend (new):

  • src/pages/AdminApiTraces.tsx
  • src/components/VerificationBadge.tsx
  • src/pages/RecipientVerification.tsx
  • src/pages/CashFlowAnalytics.tsx
  • src/pages/AdminThresholdRules.tsx

Frontend (modified):

  • src/App.tsx - add routes for new pages
  • src/pages/AdminDashboard.tsx - add links to new admin pages

closes #236
closes #237
closes #238
closes #239

…cs, and approval threshold rules

Issues: rohan911438#236 rohan911438#237 rohan911438#238 rohan911438#239

## Issue rohan911438#236 - Add API Request Trace Viewer
- Backend: RequestTraceService with trace capture, filtering, and stats
- Backend: /admin/traces endpoints with correlation ID search
- Frontend: AdminApiTraces page with expandable trace details
- Builds on existing correlation ID infrastructure in api.ts

## Issue rohan911438#237 - Add Recipient Verification Badge System
- Backend: VerificationService with badge assignment and trust scoring
- Backend: /verification/* and /admin/verifications/* endpoints
- Frontend: VerificationBadge component with tooltip support
- Frontend: RecipientVerification admin page with approve/reject workflow

## Issue rohan911438#238 - Add Cash Flow Analytics Dashboard
- Backend: CashFlowAnalyticsService with summary, trends, monthly data
- Backend: /analytics/cash-flow/* endpoints
- Frontend: CashFlowAnalytics page with Recharts (bar, area, pie charts)
- Monthly summaries, top recipients, funding sources breakdown

## Issue rohan911438#239 - Add Transfer Approval Threshold Rules
- Backend: ApprovalThresholdService with configurable rules engine
- Backend: /admin/thresholds endpoints (CRUD + toggle)
- Configurable conditions: amount, country, risk score, user tier, daily volume
- Multi-level approval support (1-3 levels)
- Frontend: AdminThresholdRules page with create/edit/delete/toggle UI
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@dimka90 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@rohan911438 rohan911438 merged commit 7e2f2ee into rohan911438:main May 30, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Transfer Approval Threshold Rules Add Cash Flow Analytics Dashboard Add Recipient Verification Badge System Add API Request Trace Viewer

2 participants