# aduotabilwilfred/dcit313-group-doomsday--atm-expert_system architecture

> Architecture diagram of the GitHub repository aduotabilwilfred/dcit313-group-doomsday--atm-expert_system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system
- Repository: https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system

## Overview

ATM-Expert is a role-based ATM fault diagnosis and advisory system. The primary workflow is staff entering symptoms and error codes in the diagnostic console; the UI service sends the request to the Flask API, which calls the Python-Prolog bridge and returns diagnoses. The console then requests an explanation and remediation workflow for the selected fault. Prolog knowledge and rules underpin the engine. The README also describes fraud detection and predictive maintenance, but those capabilities are not confirmed in the sampled runtime excerpts; their implementation links are therefore omitted. The role dashboards and several supporting UI components are represented; unsampled integrations and data flows are not inferred.

Main entry points: [`ui/src/components/DiagnosticConsole.jsx`](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/DiagnosticConsole.jsx) (Diagnostic console), [`ui/src/App.jsx`](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/App.jsx) (Role selector), [`ui/src/views/EngineerView.jsx`](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/views/EngineerView.jsx) (Engineer view), [`ui/src/components/AlertBanner.jsx`](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/AlertBanner.jsx) (Alert banner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Role-based interface"]
  node_app["Role selector<br/>[App.jsx]"]
  node_console["Diagnostic console"]
  node_api_client["API client<br/>[api.js]"]
  node_alerts["Alert banner<br/>[AlertBanner.jsx]"]
  node_explanation_panel["Explanation panel"]
  node_remediation["Remediation workflow"]
  node_escalation["Escalation screen"]
end

subgraph group_backend["Diagnosis service"]
  node_api["Flask API<br/>[api.py]"]
  node_engine["Prolog bridge<br/>[prolog_bridge.py]"]
end

subgraph group_knowledge["Diagnostic knowledge"]
  node_loader["Knowledge loader<br/>[loader.pl]"]
  node_rules["Diagnostic rules<br/>[rules.pl]"]
  node_fault_profiles["Fault profiles"]
end

subgraph group_operations["Operational views"]
  node_branch["Branch staff view"]
  node_engineer["Engineer view<br/>[EngineerView.jsx]"]
  node_fraud["Fraud team view<br/>[FraudTeamView.jsx]"]
  node_management["Management view<br/>[ManagementView.jsx]"]
  node_kpi["KPI dashboard<br/>[KPIDashboard.jsx]"]
end

node_staff(("ATM operators"))

node_staff -->|"selects role"| node_app
node_app -->|"renders"| node_branch
node_app -->|"renders"| node_engineer
node_app -->|"renders"| node_fraud
node_app -->|"renders"| node_management
node_branch -->|"renders"| node_console
node_engineer -->|"renders"| node_console
node_engineer -->|"renders"| node_explanation_panel
node_engineer -->|"renders"| node_escalation
node_branch -->|"renders"| node_alerts
node_engineer -->|"renders"| node_alerts
node_fraud -->|"renders"| node_alerts
node_management -->|"renders"| node_alerts
node_management -->|"renders"| node_kpi
node_console -->|"requests diagnosis"| node_api_client
node_console -->|"requests workflow"| node_api_client
node_console -->|"requests explanation"| node_api_client
node_console -->|"renders"| node_alerts
node_console -->|"renders"| node_explanation_panel
node_console -->|"renders"| node_remediation
node_api_client -->|"HTTP requests"| node_api
node_api -->|"invokes"| node_engine
node_engine -->|"loads"| node_loader
node_loader -.->|"loads"| node_rules
node_loader -.->|"loads"| node_fault_profiles

click node_app "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/App.jsx"
click node_console "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/DiagnosticConsole.jsx"
click node_api_client "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/services/api.js"
click node_branch "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/views/BranchStaffView.jsx"
click node_engineer "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/views/EngineerView.jsx"
click node_fraud "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/views/FraudTeamView.jsx"
click node_management "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/views/ManagementView.jsx"
click node_alerts "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/AlertBanner.jsx"
click node_explanation_panel "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/ExplanationPanel.jsx"
click node_remediation "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/RemediationWorkflow.jsx"
click node_escalation "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/EscalationScreen.jsx"
click node_kpi "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/KPIDashboard.jsx"
click node_api "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/integration/api.py"
click node_engine "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/inference_engine/prolog_bridge.py"
click node_loader "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/knowledge_base/loader.pl"
click node_rules "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/knowledge_base/rules.pl"
click node_fault_profiles "https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/tree/main/knowledge_base/fault_profiles"

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_app,node_console,node_api_client,node_alerts,node_explanation_panel,node_remediation,node_escalation toneBlue
class node_api,node_engine toneAmber
class node_loader,node_rules,node_fault_profiles toneMint
class node_branch,node_engineer,node_fraud,node_management,node_kpi toneRose
class node_staff toneIndigo
```

## Components

### Role-based interface

- [Role selector](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/App.jsx): `ui/src/App.jsx`
- [Diagnostic console](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/DiagnosticConsole.jsx): `ui/src/components/DiagnosticConsole.jsx`
- [API client](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/services/api.js): `ui/src/services/api.js`
- [Alert banner](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/AlertBanner.jsx): `ui/src/components/AlertBanner.jsx`
- [Explanation panel](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/ExplanationPanel.jsx): `ui/src/components/ExplanationPanel.jsx`
- [Remediation workflow](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/RemediationWorkflow.jsx): `ui/src/components/RemediationWorkflow.jsx`
- [Escalation screen](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/EscalationScreen.jsx): `ui/src/components/EscalationScreen.jsx`

### Diagnosis service

- [Flask API](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/integration/api.py): `integration/api.py`
- [Prolog bridge](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/inference_engine/prolog_bridge.py): `inference_engine/prolog_bridge.py`

### Diagnostic knowledge

- [Knowledge loader](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/knowledge_base/loader.pl): `knowledge_base/loader.pl`
- [Diagnostic rules](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/knowledge_base/rules.pl): `knowledge_base/rules.pl`
- [Fault profiles](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/tree/main/knowledge_base/fault_profiles): `knowledge_base/fault_profiles`

### Operational views

- [Branch staff view](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/views/BranchStaffView.jsx): `ui/src/views/BranchStaffView.jsx`
- [Engineer view](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/views/EngineerView.jsx): `ui/src/views/EngineerView.jsx`
- [Fraud team view](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/views/FraudTeamView.jsx): `ui/src/views/FraudTeamView.jsx`
- [Management view](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/views/ManagementView.jsx): `ui/src/views/ManagementView.jsx`
- [KPI dashboard](https://github.com/aduotabilwilfred/dcit313-group-doomsday--atm-expert_system/blob/main/ui/src/components/KPIDashboard.jsx): `ui/src/components/KPIDashboard.jsx`

### Other components

- **ATM operators**

## Connections

- ATM operators → Role selector: selects role (evidence: `ui/src/App.jsx`)
- Role selector → Branch staff view: renders (evidence: `ui/src/App.jsx`)
- Role selector → Engineer view: renders (evidence: `ui/src/App.jsx`)
- Role selector → Fraud team view: renders (evidence: `ui/src/App.jsx`)
- Role selector → Management view: renders (evidence: `ui/src/App.jsx`)
- Branch staff view → Diagnostic console: renders (evidence: `ui/src/views/BranchStaffView.jsx`)
- Engineer view → Diagnostic console: renders (evidence: `ui/src/views/EngineerView.jsx`)
- Engineer view → Explanation panel: renders (evidence: `ui/src/views/EngineerView.jsx`)
- Engineer view → Escalation screen: renders (evidence: `ui/src/views/EngineerView.jsx`)
- Branch staff view → Alert banner: renders (evidence: `ui/src/views/BranchStaffView.jsx`)
- Engineer view → Alert banner: renders (evidence: `ui/src/views/EngineerView.jsx`)
- Fraud team view → Alert banner: renders (evidence: `ui/src/views/FraudTeamView.jsx`)
- Management view → Alert banner: renders (evidence: `ui/src/views/ManagementView.jsx`)
- Management view → KPI dashboard: renders (evidence: `ui/src/views/ManagementView.jsx`)
- Diagnostic console → API client: requests diagnosis (evidence: `ui/src/components/DiagnosticConsole.jsx`)
- Diagnostic console → API client: requests workflow (evidence: `ui/src/components/DiagnosticConsole.jsx`)
- Diagnostic console → API client: requests explanation (evidence: `ui/src/components/DiagnosticConsole.jsx`)
- Diagnostic console → Alert banner: renders (evidence: `ui/src/components/DiagnosticConsole.jsx`)
- Diagnostic console → Explanation panel: renders (evidence: `ui/src/components/DiagnosticConsole.jsx`)
- Diagnostic console → Remediation workflow: renders (evidence: `ui/src/components/DiagnosticConsole.jsx`)
- API client → Flask API: HTTP requests (evidence: `README.md`)
- Flask API → Prolog bridge: invokes (evidence: `integration/api.py`)
- Prolog bridge → Knowledge loader: loads (evidence: `inference_engine/prolog_bridge.py`)
- Knowledge loader → Diagnostic rules: loads
- Knowledge loader → Fault profiles: loads
