How sumitmaurya2/veritas-ai-powered-financial-fraud-detection-risk-analysis-system works
Veritas AI is a web application for transaction fraud prediction and history, backed by an Express API and a FastAPI model service. The user flow is: enter transaction and customer details, submit a prediction request, preprocess and score it, return fraud/risk/confidence, and store the prediction for later history viewing. The README also describes model-training and explainability capabilities, but no training scripts or dataset files appear in the tree, so these are noted without implementation nodes. Some frontend component internals and prediction pages were not excerpted; relationships are included only where the index or shown source supports them.
Main entry points: AppRoutes.tsx Page routing · Predict.tsx Prediction page · Layout.tsx Shared layout · prediction.controller.ts Prediction controller
Components 21
User interface
- Page routing
frontend/src/routes/AppRoutes.tsx - Home overview
frontend/src/pages/Home.tsx - Prediction page
frontend/src/pages/Predict.tsx - Transaction form
frontend/src/components/prediction/PredictionForm.tsx - Risk result panel
frontend/src/components/prediction/PredictionPanel.tsx - History page
frontend/src/pages/History.tsx - Shared layout
frontend/src/components/layout/Layout.tsx - Navigation bar
frontend/src/components/layout/Navbar.tsx - Footer
frontend/src/components/layout/Footer.tsx - API client
frontend/src/services/api.ts
Prediction API
- HTTP application
backend/src/app.ts - Prediction routes
backend/src/routes/prediction.routes.ts - Prediction controller
backend/src/controllers/prediction.controller.ts
Model inference
- Inference API
ml-service/main.py - Input preprocessing
ml-service/preprocess.py - Feature schema
ml-service/feature_names.py - Trained model and scaler
ml-service/main.py - Model training and evaluation
- SHAP explanations
Prediction history
- MongoDB predictions
backend/src/models/Prediction.ts
Other components
- Analyst
Connections 22
- Analyst → Page routing: opens app
frontend/src/routes/AppRoutes.tsx - Page routing → Home overview: routes to
frontend/src/routes/AppRoutes.tsx - Page routing → Prediction page: routes to
frontend/src/routes/AppRoutes.tsx - Page routing → History page: routes to
frontend/src/routes/AppRoutes.tsx - Page routing → Shared layout: renders within
frontend/src/routes/AppRoutes.tsx - Shared layout → Navigation bar: renders
frontend/src/components/layout/Layout.tsx - Shared layout → Footer: renders
frontend/src/components/layout/Layout.tsx - Navigation bar → Page routing: navigates via
frontend/src/components/layout/Navbar.tsx - Prediction page → Transaction form: renders
frontend/src/pages/Predict.tsx - Prediction page → Risk result panel: renders
frontend/src/pages/Predict.tsx - Prediction page → API client: requests prediction
frontend/src/pages/Predict.tsx - History page → API client: requests history
frontend/src/pages/History.tsx - API client → HTTP application: HTTP requests
- HTTP application → Prediction routes: mounts at API path
backend/src/app.ts - Prediction routes → Prediction controller: dispatches handlers
backend/src/routes/prediction.routes.ts - Prediction controller → Inference API: posts prediction
backend/src/controllers/prediction.controller.ts - Prediction controller → MongoDB predictions: saves and queries
backend/src/controllers/prediction.controller.ts - Inference API → Input preprocessing: preprocesses input
ml-service/main.py - Input preprocessing → Feature schema: uses feature columns
ml-service/preprocess.py - Inference API → Trained model and scaler: scales and scores
ml-service/main.py - Model training and evaluation → Trained model and scaler: produces saved model
- Model training and evaluation → SHAP explanations: supports explainability