How shey66830-blip/bfsi-intelligence-risk-analyzer- works
Context Guard is a synthetic-data financial investigation platform, not a fraud-verdict system. Analysts sign in, monitor transactions, and open cases when anomaly thresholds are met; investigators can expand case scope across linked entities, request consent-scoped bank context, correlate structured reports, review an explainable assessment, and record an attributed decision. The React dashboard calls a Flask API backed by MongoDB, with simulated bank services. The graph preserves documented workflow and product areas; some route and service wiring is based on the README or source-index references rather than inspected implementation excerpts.
Main entry points: cases.py Case routes · pipeline.py Pipeline routes · api.js API client · app.py Flask application
Components 26
Investigator dashboard
- Dashboard shell
frontend/src/App.jsx - Role session
frontend/src/context/RoleContext.jsx - API client
frontend/src/api.js - Pipeline view
frontend/src/components/PipelinePanel.jsx - Login view
frontend/src/components/LoginPage.jsx - Case workspace
frontend/src/components/CaseDetail.jsx - Network graph view
frontend/src/components/GraphView.jsx
API and access
- Flask application
backend/app.py - Authentication routes
backend/routes/auth.py - Case routes
backend/routes/cases.py - Transaction ingestion
backend/routes/ingest.py
Investigation workflow
- Pipeline routes
backend/routes/pipeline.py - Behavioral graph
backend/services/graph_engine.py - Bank gateway
backend/services/bank_gateway.py - Simulated banks
backend/services/mock_banks.py - Bank report review
backend/services/bank_review.py - Investigation reports
backend/services/reports.py
Governance and evidence
- Evidence service
backend/services/evidence.py - Restricted access
backend/services/access.py - Security policy
backend/security/policy.py - Request authorization
backend/middleware.py - Users and sessions
backend/services/users.py - Audit trail
backend/services/audit.py
Persistent state
- MongoDB
backend/config.py - Document operations
backend/models/__init__.py
Other components
- Investigator
Connections 33
- Investigator → Login view: signs in
- Investigator → Dashboard shell: uses
- Dashboard shell → Role session: provides session
frontend/src/App.jsx - Login view → Role session: authenticates through
frontend/src/context/RoleContext.jsx - Role session → API client: requests session
frontend/src/context/RoleContext.jsx - Dashboard shell → API client: fetches dashboard data
frontend/src/App.jsx - Pipeline view → API client: runs pipeline
frontend/src/components/PipelinePanel.jsx - Case workspace → API client: loads case
- Network graph view → API client: loads graph
- API client → Flask application: calls API
- Flask application → Authentication routes: registers routes
backend/app.py - Flask application → Case routes: registers routes
backend/app.py - Flask application → Transaction ingestion: registers routes
backend/app.py - Flask application → Pipeline routes: registers routes
backend/app.py - Authentication routes → Users and sessions: authenticates
backend/routes/auth.py - Case routes → Request authorization: guards requests
backend/routes/cases.py - Transaction ingestion → Request authorization: guards requests
backend/routes/ingest.py - Pipeline routes → Behavioral graph: expands entities
backend/routes/pipeline.py - Pipeline routes → Bank gateway: sends bank requests
backend/routes/pipeline.py - Bank gateway → Simulated banks: uses simulated banks
backend/services/bank_gateway.py - Pipeline routes → Bank report review: reviews responses
- Pipeline routes → Investigation reports: drafts report
- Case routes → Evidence service: manages evidence
backend/routes/cases.py - Case routes → Restricted access: checks access
backend/routes/cases.py - Request authorization → Users and sessions: resolves session
backend/middleware.py - Request authorization → Security policy: enforces policy
- Authentication routes → Audit trail: records actions
backend/routes/auth.py - Case routes → Audit trail: records actions
backend/routes/cases.py - Pipeline routes → Audit trail: records actions
backend/routes/pipeline.py - Document operations → MongoDB: reads and writes
backend/config.py - Case routes → Document operations: uses documents
backend/routes/cases.py - Transaction ingestion → Document operations: uses documents
backend/routes/ingest.py - Behavioral graph → MongoDB: queries entities
backend/services/graph_engine.py