# jordanvieno/project-magang architecture

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

- Interactive diagram: https://gitdiagram.com/jordanvieno/project-magang
- Repository: https://github.com/jordanvieno/project-magang

## Overview

Agen46 is presented primarily as an enterprise deployment pipeline for a Java digital-channel/payment backend. The main workflow runs from a Git trigger through quality checks, image build and security scan, then staged deployment with approvals and production rollback. The repository also includes runtime API/status services, a dashboard, monitoring, load testing, and provisioning. Pipeline relationships and several capabilities are documented in the README; source excerpts show backend endpoint and metrics behavior, but not Jenkins wiring or the frontend implementation.

Main entry points: [`src/main/java/com/channel/digital/App.java`](https://github.com/jordanvieno/project-magang/blob/developmentlinux/src/main/java/com/channel/digital/App.java) (Payment backend), [`Jenkinsfile`](https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile) (Pipeline orchestration), [`monitoring/prometheus.yml`](https://github.com/jordanvieno/project-magang/blob/developmentlinux/monitoring/prometheus.yml) (Prometheus), [`frontend`](https://github.com/jordanvieno/project-magang/tree/developmentlinux/frontend) (Nginx dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["CI/CD Pipeline"]
  node_jenkins["Pipeline orchestration"]
  node_quality["Quality gate"]
  node_package["Image packaging"]
  node_scan["Image security scan"]
  node_registry[("Image registry")]
  node_development["Development deploy"]
  node_testing["Testing deploy"]
  node_production["Production deploy"]
  node_rollback["Auto rollback"]
  node_telegram["Telegram notifications"]
end

subgraph group_runtime["Application Runtime"]
  node_backend["Payment backend<br/>[App.java]"]
  node_database[("Payment test data")]
  node_frontend["Nginx dashboard"]
end

subgraph group_observability["Monitoring and Status"]
  node_status["Deployment status<br/>[StatusServer.java]"]
  node_metrics["Backend metrics<br/>[App.java]"]
  node_prometheus["Prometheus<br/>[prometheus.yml]"]
  node_grafana["Grafana dashboards"]
  node_logs["Loki and Promtail"]
end

subgraph group_operations["Operations"]
  node_loadtest["Load testing<br/>[load-test.js]"]
  node_provision["Infrastructure provisioning<br/>[setup-agen46.yml]"]
  node_kubernetes["Kubernetes manifest"]
end

node_git(("Git trigger"))
node_browser(("Browser"))

node_git -->|"triggers"| node_jenkins
node_jenkins -->|"runs"| node_quality
node_jenkins -->|"runs"| node_package
node_jenkins -->|"runs"| node_scan
node_package -->|"stores image"| node_registry
node_scan -->|"clears for"| node_registry
node_registry -->|"provides image"| node_development
node_registry -->|"promotes image"| node_testing
node_registry -->|"promotes image"| node_production
node_development -->|"deploys"| node_backend
node_testing -->|"deploys"| node_backend
node_production -->|"deploys"| node_backend
node_production -->|"rolls back on failure"| node_rollback
node_jenkins -->|"notifies"| node_telegram
node_jenkins -->|"reports stage"| node_status
node_backend -->|"reads and writes"| node_database
node_backend -->|"serves metrics"| node_metrics
node_prometheus -->|"scrapes"| node_metrics
node_prometheus -->|"feeds dashboards"| node_grafana
node_logs -->|"feeds logs"| node_grafana
node_browser -->|"views"| node_frontend
node_frontend -->|"proxies API"| node_backend
node_loadtest -->|"tests endpoints"| node_backend
node_provision -.->|"provisions"| node_development
node_kubernetes -.->|"configures deployment"| node_backend

click node_jenkins "https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile"
click node_quality "https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile"
click node_package "https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile"
click node_scan "https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile"
click node_development "https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile"
click node_testing "https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile"
click node_production "https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile"
click node_rollback "https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile"
click node_backend "https://github.com/jordanvieno/project-magang/blob/developmentlinux/src/main/java/com/channel/digital/App.java"
click node_database "https://github.com/jordanvieno/project-magang/blob/developmentlinux/src/main/resources/db/migration/V1__init_schema.sql"
click node_frontend "https://github.com/jordanvieno/project-magang/tree/developmentlinux/frontend"
click node_status "https://github.com/jordanvieno/project-magang/blob/developmentlinux/src/main/java/com/channel/digital/StatusServer.java"
click node_metrics "https://github.com/jordanvieno/project-magang/blob/developmentlinux/src/main/java/com/channel/digital/App.java"
click node_prometheus "https://github.com/jordanvieno/project-magang/blob/developmentlinux/monitoring/prometheus.yml"
click node_grafana "https://github.com/jordanvieno/project-magang/tree/developmentlinux/monitoring"
click node_logs "https://github.com/jordanvieno/project-magang/tree/developmentlinux/monitoring"
click node_loadtest "https://github.com/jordanvieno/project-magang/blob/developmentlinux/monitoring/load-test.js"
click node_provision "https://github.com/jordanvieno/project-magang/blob/developmentlinux/monitoring/setup-agen46.yml"
click node_kubernetes "https://github.com/jordanvieno/project-magang/blob/developmentlinux/k8s/backend-deployment.yaml"

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_jenkins,node_quality,node_package,node_scan,node_registry,node_development,node_testing,node_production,node_rollback,node_telegram,node_browser toneBlue
class node_backend,node_database,node_frontend toneAmber
class node_status,node_metrics,node_prometheus,node_grafana,node_logs toneMint
class node_loadtest,node_provision,node_kubernetes toneRose
class node_git toneIndigo
```

## Components

### CI/CD Pipeline

- [Pipeline orchestration](https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile): `Jenkinsfile`
- [Quality gate](https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile): `Jenkinsfile`
- [Image packaging](https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile): `Jenkinsfile`
- [Image security scan](https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile): `Jenkinsfile`
- **Image registry**
- [Development deploy](https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile): `Jenkinsfile`
- [Testing deploy](https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile): `Jenkinsfile`
- [Production deploy](https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile): `Jenkinsfile`
- [Auto rollback](https://github.com/jordanvieno/project-magang/blob/developmentlinux/Jenkinsfile): `Jenkinsfile`
- **Telegram notifications**

### Application Runtime

- [Payment backend](https://github.com/jordanvieno/project-magang/blob/developmentlinux/src/main/java/com/channel/digital/App.java): `src/main/java/com/channel/digital/App.java`
- [Payment test data](https://github.com/jordanvieno/project-magang/blob/developmentlinux/src/main/resources/db/migration/V1__init_schema.sql): `src/main/resources/db/migration/V1__init_schema.sql`
- [Nginx dashboard](https://github.com/jordanvieno/project-magang/tree/developmentlinux/frontend): `frontend`

### Monitoring and Status

- [Deployment status](https://github.com/jordanvieno/project-magang/blob/developmentlinux/src/main/java/com/channel/digital/StatusServer.java): `src/main/java/com/channel/digital/StatusServer.java`
- [Backend metrics](https://github.com/jordanvieno/project-magang/blob/developmentlinux/src/main/java/com/channel/digital/App.java): `src/main/java/com/channel/digital/App.java`
- [Prometheus](https://github.com/jordanvieno/project-magang/blob/developmentlinux/monitoring/prometheus.yml): `monitoring/prometheus.yml`
- [Grafana dashboards](https://github.com/jordanvieno/project-magang/tree/developmentlinux/monitoring): `monitoring`
- [Loki and Promtail](https://github.com/jordanvieno/project-magang/tree/developmentlinux/monitoring): `monitoring`

### Operations

- [Load testing](https://github.com/jordanvieno/project-magang/blob/developmentlinux/monitoring/load-test.js): `monitoring/load-test.js`
- [Infrastructure provisioning](https://github.com/jordanvieno/project-magang/blob/developmentlinux/monitoring/setup-agen46.yml): `monitoring/setup-agen46.yml`
- [Kubernetes manifest](https://github.com/jordanvieno/project-magang/blob/developmentlinux/k8s/backend-deployment.yaml): `k8s/backend-deployment.yaml`

### Other components

- **Git trigger**
- **Browser**

## Connections

- Git trigger → Pipeline orchestration: triggers (evidence: `README.md`)
- Pipeline orchestration → Quality gate: runs (evidence: `README.md`)
- Pipeline orchestration → Image packaging: runs (evidence: `README.md`)
- Pipeline orchestration → Image security scan: runs (evidence: `README.md`)
- Image packaging → Image registry: stores image (evidence: `README.md`)
- Image security scan → Image registry: clears for (evidence: `README.md`)
- Image registry → Development deploy: provides image (evidence: `README.md`)
- Image registry → Testing deploy: promotes image (evidence: `README.md`)
- Image registry → Production deploy: promotes image (evidence: `README.md`)
- Development deploy → Payment backend: deploys (evidence: `README.md`)
- Testing deploy → Payment backend: deploys (evidence: `README.md`)
- Production deploy → Payment backend: deploys (evidence: `README.md`)
- Production deploy → Auto rollback: rolls back on failure (evidence: `README.md`)
- Pipeline orchestration → Telegram notifications: notifies (evidence: `README.md`)
- Pipeline orchestration → Deployment status: reports stage (evidence: `README.md`)
- Payment backend → Payment test data: reads and writes (evidence: `src/main/java/com/channel/digital/App.java`)
- Payment backend → Backend metrics: serves metrics (evidence: `src/main/java/com/channel/digital/App.java`)
- Prometheus → Backend metrics: scrapes (evidence: `README.md`)
- Prometheus → Grafana dashboards: feeds dashboards (evidence: `README.md`)
- Loki and Promtail → Grafana dashboards: feeds logs (evidence: `README.md`)
- Browser → Nginx dashboard: views (evidence: `README.md`)
- Nginx dashboard → Payment backend: proxies API (evidence: `README.md`)
- Load testing → Payment backend: tests endpoints (evidence: `monitoring/load-test.js`)
- Infrastructure provisioning → Development deploy: provisions
- Kubernetes manifest → Payment backend: configures deployment
