# luciferxbeast/agile-project architecture

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

- Interactive diagram: https://gitdiagram.com/luciferxbeast/agile-project
- Repository: https://github.com/luciferxbeast/agile-project

## Overview

This is a Linux telemetry and remote-remediation platform with a Flutter operator portal. The main workflow samples host metrics, conditionally adds process diagnostics, sends telemetry through AWS for storage, and displays it to operators. A separate remediation workflow verifies a proposed process action and dispatches it through SSM. The graph combines sampled agent code with README-documented cloud and portal capabilities; those unsampled subsystem links are cited to the README rather than presented as inspected implementation details.

Main entry points: [`backend/aws/lambda_function.py`](https://github.com/luciferxbeast/agile-project/blob/main/backend/aws/lambda_function.py) (Telemetry Backend), [`backend/src/utility.cpp`](https://github.com/luciferxbeast/agile-project/blob/main/backend/src/utility.cpp) (Telemetry Agent), [`flutter mobile frontend/lib/main.dart`](https://github.com/luciferxbeast/agile-project/blob/main/flutter%20mobile%20frontend/lib/main.dart) (Live Dashboard), [`backend/aws/schema.sql`](https://github.com/luciferxbeast/agile-project/blob/main/backend/aws/schema.sql) (Telemetry And Audit DB)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent["Linux Agent"]
  node_procfs["Kernel Metrics<br/>[utility.cpp]"]
  node_agent_runtime["Telemetry Agent<br/>[utility.cpp]"]
  node_metric_math["Metric Calculations<br/>[metrics.hpp]"]
  node_offline_queue["Offline Queue<br/>[utility.cpp]"]
end

subgraph group_ingestion["Cloud Ingestion"]
  node_lambda["Telemetry Backend<br/>[lambda_function.py]"]
  node_auth["API Authentication<br/>[lambda_function.py]"]
  node_ingest["Ingestion And Pruning<br/>[lambda_function.py]"]
  node_telemetry_store[("Telemetry And Audit DB<br/>[schema.sql]")]
end

subgraph group_remediation["Remote Remediation"]
  node_ssm{{"AWS Systems Manager"}}
  node_instance_agent["EC2 SSM Agent"]
  node_process_action["Process Termination"]
end

subgraph group_portal["Operator Portal"]
  node_dashboard["Live Dashboard<br/>[main.dart]"]
  node_fleet_filter["Fleet Filter<br/>[main.dart]"]
  node_spike_alert["Spike Alerts<br/>[main.dart]"]
  node_confirmation["Guardrail Confirmation<br/>[main.dart]"]
end

node_operator(("Operator"))
node_host["Linux Host"]
node_api_gateway{{"API Gateway"}}

node_host -->|"provides metrics"| node_procfs
node_procfs -->|"samples"| node_agent_runtime
node_agent_runtime -->|"calculates with"| node_metric_math
node_agent_runtime -->|"queues on failure"| node_offline_queue
node_agent_runtime -->|"posts telemetry"| node_api_gateway
node_api_gateway -->|"routes requests"| node_lambda
node_lambda -->|"authenticates"| node_auth
node_lambda -->|"ingests metrics"| node_ingest
node_lambda -->|"writes telemetry"| node_telemetry_store
node_lambda -->|"records audit"| node_telemetry_store
node_operator -->|"views telemetry"| node_dashboard
node_dashboard -->|"requests metrics"| node_api_gateway
node_fleet_filter -->|"requests servers"| node_api_gateway
node_dashboard -->|"shows alerts"| node_spike_alert
node_operator -->|"confirms action"| node_confirmation
node_confirmation -->|"posts command"| node_api_gateway
node_lambda -->|"dispatches command"| node_ssm
node_ssm -->|"runs command"| node_instance_agent
node_instance_agent -->|"terminates process"| node_process_action

click node_procfs "https://github.com/luciferxbeast/agile-project/blob/main/backend/src/utility.cpp"
click node_agent_runtime "https://github.com/luciferxbeast/agile-project/blob/main/backend/src/utility.cpp"
click node_metric_math "https://github.com/luciferxbeast/agile-project/blob/main/backend/src/metrics.hpp"
click node_offline_queue "https://github.com/luciferxbeast/agile-project/blob/main/backend/src/utility.cpp"
click node_lambda "https://github.com/luciferxbeast/agile-project/blob/main/backend/aws/lambda_function.py"
click node_auth "https://github.com/luciferxbeast/agile-project/blob/main/backend/aws/lambda_function.py"
click node_ingest "https://github.com/luciferxbeast/agile-project/blob/main/backend/aws/lambda_function.py"
click node_telemetry_store "https://github.com/luciferxbeast/agile-project/blob/main/backend/aws/schema.sql"
click node_dashboard "https://github.com/luciferxbeast/agile-project/blob/main/flutter%20mobile%20frontend/lib/main.dart"
click node_fleet_filter "https://github.com/luciferxbeast/agile-project/blob/main/flutter%20mobile%20frontend/lib/main.dart"
click node_spike_alert "https://github.com/luciferxbeast/agile-project/blob/main/flutter%20mobile%20frontend/lib/main.dart"
click node_confirmation "https://github.com/luciferxbeast/agile-project/blob/main/flutter%20mobile%20frontend/lib/main.dart"

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_procfs,node_agent_runtime,node_metric_math,node_offline_queue toneBlue
class node_lambda,node_auth,node_ingest,node_telemetry_store toneAmber
class node_ssm,node_instance_agent,node_process_action,node_api_gateway toneMint
class node_dashboard,node_fleet_filter,node_spike_alert,node_confirmation toneRose
class node_operator,node_host toneIndigo
```

## Components

### Linux Agent

- [Kernel Metrics](https://github.com/luciferxbeast/agile-project/blob/main/backend/src/utility.cpp): `backend/src/utility.cpp`
- [Telemetry Agent](https://github.com/luciferxbeast/agile-project/blob/main/backend/src/utility.cpp): `backend/src/utility.cpp`
- [Metric Calculations](https://github.com/luciferxbeast/agile-project/blob/main/backend/src/metrics.hpp): `backend/src/metrics.hpp`
- [Offline Queue](https://github.com/luciferxbeast/agile-project/blob/main/backend/src/utility.cpp): `backend/src/utility.cpp`

### Cloud Ingestion

- [Telemetry Backend](https://github.com/luciferxbeast/agile-project/blob/main/backend/aws/lambda_function.py): `backend/aws/lambda_function.py`
- [API Authentication](https://github.com/luciferxbeast/agile-project/blob/main/backend/aws/lambda_function.py): `backend/aws/lambda_function.py`
- [Ingestion And Pruning](https://github.com/luciferxbeast/agile-project/blob/main/backend/aws/lambda_function.py): `backend/aws/lambda_function.py`
- [Telemetry And Audit DB](https://github.com/luciferxbeast/agile-project/blob/main/backend/aws/schema.sql): `backend/aws/schema.sql`

### Remote Remediation

- **AWS Systems Manager**
- **EC2 SSM Agent**
- **Process Termination**

### Operator Portal

- [Live Dashboard](https://github.com/luciferxbeast/agile-project/blob/main/flutter%20mobile%20frontend/lib/main.dart): `flutter mobile frontend/lib/main.dart`
- [Fleet Filter](https://github.com/luciferxbeast/agile-project/blob/main/flutter%20mobile%20frontend/lib/main.dart): `flutter mobile frontend/lib/main.dart`
- [Spike Alerts](https://github.com/luciferxbeast/agile-project/blob/main/flutter%20mobile%20frontend/lib/main.dart): `flutter mobile frontend/lib/main.dart`
- [Guardrail Confirmation](https://github.com/luciferxbeast/agile-project/blob/main/flutter%20mobile%20frontend/lib/main.dart): `flutter mobile frontend/lib/main.dart`

### Other components

- **Operator**
- **Linux Host**
- **API Gateway**

## Connections

- Linux Host → Kernel Metrics: provides metrics (evidence: `README.md`)
- Kernel Metrics → Telemetry Agent: samples (evidence: `backend/src/utility.cpp`)
- Telemetry Agent → Metric Calculations: calculates with (evidence: `backend/src/utility.cpp`)
- Telemetry Agent → Offline Queue: queues on failure (evidence: `backend/src/utility.cpp`)
- Telemetry Agent → API Gateway: posts telemetry (evidence: `backend/src/utility.cpp`)
- API Gateway → Telemetry Backend: routes requests (evidence: `README.md`)
- Telemetry Backend → API Authentication: authenticates (evidence: `README.md`)
- Telemetry Backend → Ingestion And Pruning: ingests metrics (evidence: `README.md`)
- Telemetry Backend → Telemetry And Audit DB: writes telemetry (evidence: `README.md`)
- Telemetry Backend → Telemetry And Audit DB: records audit (evidence: `README.md`)
- Operator → Live Dashboard: views telemetry (evidence: `README.md`)
- Live Dashboard → API Gateway: requests metrics (evidence: `README.md`)
- Fleet Filter → API Gateway: requests servers (evidence: `README.md`)
- Live Dashboard → Spike Alerts: shows alerts (evidence: `README.md`)
- Operator → Guardrail Confirmation: confirms action (evidence: `README.md`)
- Guardrail Confirmation → API Gateway: posts command (evidence: `README.md`)
- Telemetry Backend → AWS Systems Manager: dispatches command (evidence: `README.md`)
- AWS Systems Manager → EC2 SSM Agent: runs command (evidence: `README.md`)
- EC2 SSM Agent → Process Termination: terminates process (evidence: `README.md`)
