# manoj-debug-source/cyberfoxxx architecture

> Architecture diagram of the GitHub repository manoj-debug-source/cyberfoxxx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/manoj-debug-source/cyberfoxxx
- Repository: https://github.com/manoj-debug-source/cyberfoxxx

## Overview

This repository implements a document-screening and identity-risk review product: an officer submits a document, the backend coordinates screening and risk services, and the frontend presents results for review. Separate subsystems provide OCR/document fraud checks, anomaly detection, identity and watchlist functions, audit, and blockchain-backed records. The excerpts confirm the main routing and some service calls; several listed capabilities are represented at subsystem level because their implementation was not sampled.

Main entry points: [`frontend/backend/main.py`](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/main.py) (Backend API), [`Anomaly_Detection/document_engine/screener.py`](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/document_engine/screener.py) (Document screening), [`frontend/backend/routes/pipeline.py`](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/routes/pipeline.py) (Screening pipeline), [`frontend/src/App.jsx`](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/src/App.jsx) (Screening UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Officer experience"]
  node_webapp["Screening UI<br/>[App.jsx]"]
  node_api_client["API client<br/>[client.js]"]
  node_review["Results and review<br/>[Results.jsx]"]
end

subgraph group_backend["Screening backend"]
  node_backend_app["Backend API<br/>[main.py]"]
  node_pipeline["Screening pipeline<br/>[pipeline.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_jwt["Token security<br/>[jwt.py]"]
end

subgraph group_analysis["Analysis services"]
  node_document_service["Document screening<br/>[screener.py]"]
  node_doc_api["Document API<br/>[doc_routes.py]"]
  node_ocr["OCR extraction<br/>[ocr_extractor.py]"]
  node_mrz["MRZ validation<br/>[mrz_validator.py]"]
  node_forensics["Image forensics<br/>[image_forensics.py]"]
  node_face_verify["Face verification<br/>[face_verifier.py]"]
  node_anomaly_api["Anomaly detection API<br/>[routes.py]"]
  node_anomaly_service["Anomaly inference<br/>[service.py]"]
  node_anomaly_pipeline["Anomaly pipeline<br/>[pipeline.py]"]
  node_risk["Risk calibration<br/>[calibration.py]"]
end

subgraph group_records["Identity and records"]
  node_identity["Identity validation"]
  node_watchlist["Watchlist screening<br/>[watchlist.py]"]
  node_database[("Screening database<br/>[mongodb.py]")]
  node_ledger["Blockchain audit<br/>[blockchain.py]"]
end

node_officer(("Officer"))

node_officer -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_review
node_review -->|"requests data"| node_api_client
node_api_client -.->|"calls API"| node_backend_app
node_backend_app -->|"registers route"| node_pipeline
node_backend_app -->|"registers route"| node_auth
node_auth -->|"uses tokens"| node_jwt
node_pipeline -->|"requests screening"| node_doc_api
node_doc_api -->|"screens fields"| node_document_service
node_document_service -->|"uses extraction"| node_ocr
node_document_service -->|"validates MRZ"| node_mrz
node_document_service -->|"checks images"| node_forensics
node_document_service -->|"verifies faces"| node_face_verify
node_anomaly_api -->|"dispatches inference"| node_anomaly_service
node_anomaly_service -->|"runs predictions"| node_anomaly_pipeline
node_pipeline -->|"requests calibration"| node_risk
node_pipeline -->|"updates records"| node_database
node_backend_app -->|"connects"| node_database
node_backend_app -->|"registers route"| node_identity
node_backend_app -->|"registers route"| node_watchlist
node_backend_app -->|"registers route"| node_ledger

click node_webapp "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/src/App.jsx"
click node_api_client "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/src/api/client.js"
click node_review "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/src/pages/Results.jsx"
click node_backend_app "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/main.py"
click node_pipeline "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/routes/pipeline.py"
click node_auth "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/routes/auth.py"
click node_jwt "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/utils/jwt.py"
click node_document_service "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/document_engine/screener.py"
click node_doc_api "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/api/doc_routes.py"
click node_ocr "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/document_engine/ocr_extractor.py"
click node_mrz "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/document_engine/mrz_validator.py"
click node_forensics "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/document_engine/image_forensics.py"
click node_face_verify "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/document_engine/face_verifier.py"
click node_anomaly_api "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/api/routes.py"
click node_anomaly_service "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/anomaly_engine/service.py"
click node_anomaly_pipeline "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/anomaly_engine/pipeline.py"
click node_risk "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/risk-calibration/services/calibration.py"
click node_identity "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/idenity-validation/identity_service.py"
click node_watchlist "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/routes/watchlist.py"
click node_database "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/database/mongodb.py"
click node_ledger "https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/services/blockchain.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapp,node_api_client,node_review toneBlue
class node_backend_app,node_pipeline,node_auth,node_jwt toneAmber
class node_document_service,node_doc_api,node_ocr,node_mrz,node_forensics,node_face_verify,node_anomaly_api,node_anomaly_service,node_anomaly_pipeline,node_risk toneMint
class node_identity,node_watchlist,node_database,node_ledger toneRose
class node_officer toneIndigo
```

## Components

### Officer experience

- [Screening UI](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API client](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`
- [Results and review](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/src/pages/Results.jsx): `frontend/src/pages/Results.jsx`

### Screening backend

- [Backend API](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/main.py): `frontend/backend/main.py`
- [Screening pipeline](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/routes/pipeline.py): `frontend/backend/routes/pipeline.py`
- [Authentication](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/routes/auth.py): `frontend/backend/routes/auth.py`
- [Token security](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/utils/jwt.py): `frontend/backend/utils/jwt.py`

### Analysis services

- [Document screening](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/document_engine/screener.py): `Anomaly_Detection/document_engine/screener.py`
- [Document API](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/api/doc_routes.py): `Anomaly_Detection/api/doc_routes.py`
- [OCR extraction](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/document_engine/ocr_extractor.py): `Anomaly_Detection/document_engine/ocr_extractor.py`
- [MRZ validation](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/document_engine/mrz_validator.py): `Anomaly_Detection/document_engine/mrz_validator.py`
- [Image forensics](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/document_engine/image_forensics.py): `Anomaly_Detection/document_engine/image_forensics.py`
- [Face verification](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/document_engine/face_verifier.py): `Anomaly_Detection/document_engine/face_verifier.py`
- [Anomaly detection API](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/api/routes.py): `Anomaly_Detection/api/routes.py`
- [Anomaly inference](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/anomaly_engine/service.py): `Anomaly_Detection/anomaly_engine/service.py`
- [Anomaly pipeline](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/Anomaly_Detection/anomaly_engine/pipeline.py): `Anomaly_Detection/anomaly_engine/pipeline.py`
- [Risk calibration](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/risk-calibration/services/calibration.py): `risk-calibration/services/calibration.py`

### Identity and records

- [Identity validation](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/idenity-validation/identity_service.py): `idenity-validation/identity_service.py`
- [Watchlist screening](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/routes/watchlist.py): `frontend/backend/routes/watchlist.py`
- [Screening database](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/database/mongodb.py): `frontend/backend/database/mongodb.py`
- [Blockchain audit](https://github.com/manoj-debug-source/cyberfoxxx/blob/main/frontend/backend/services/blockchain.py): `frontend/backend/services/blockchain.py`

### Other components

- **Officer**

## Connections

- Officer → Screening UI: uses (evidence: `frontend/src/App.jsx`)
- Screening UI → Results and review: routes to (evidence: `frontend/src/App.jsx`)
- Results and review → API client: requests data (evidence: `frontend/src/pages/Results.jsx`)
- API client → Backend API: calls API
- Backend API → Screening pipeline: registers route (evidence: `frontend/backend/main.py`)
- Backend API → Authentication: registers route (evidence: `frontend/backend/main.py`)
- Authentication → Token security: uses tokens (evidence: `frontend/backend/routes/auth.py`)
- Screening pipeline → Document API: requests screening (evidence: `frontend/backend/routes/pipeline.py`)
- Document API → Document screening: screens fields (evidence: `Anomaly_Detection/api/doc_routes.py`)
- Document screening → OCR extraction: uses extraction (evidence: `Anomaly_Detection/document_engine/screener.py`)
- Document screening → MRZ validation: validates MRZ (evidence: `Anomaly_Detection/document_engine/screener.py`)
- Document screening → Image forensics: checks images (evidence: `Anomaly_Detection/document_engine/screener.py`)
- Document screening → Face verification: verifies faces (evidence: `Anomaly_Detection/document_engine/screener.py`)
- Anomaly detection API → Anomaly inference: dispatches inference (evidence: `Anomaly_Detection/api/routes.py`)
- Anomaly inference → Anomaly pipeline: runs predictions (evidence: `Anomaly_Detection/anomaly_engine/service.py`)
- Screening pipeline → Risk calibration: requests calibration (evidence: `frontend/backend/routes/pipeline.py`)
- Screening pipeline → Screening database: updates records (evidence: `frontend/backend/routes/pipeline.py`)
- Backend API → Screening database: connects (evidence: `frontend/backend/main.py`)
- Backend API → Identity validation: registers route (evidence: `frontend/backend/main.py`)
- Backend API → Watchlist screening: registers route (evidence: `frontend/backend/main.py`)
- Backend API → Blockchain audit: registers route (evidence: `frontend/backend/main.py`)
