|
| 1 | +## ContainerDiagram |
| 2 | + |
| 3 | +```mermaid |
| 4 | +graph LR |
| 5 | + linkStyle default fill:#ffffff |
| 6 | +
|
| 7 | + subgraph diagram ["Full Cycle Gateway - Containers"] |
| 8 | + style diagram fill:#ffffff,stroke:#ffffff |
| 9 | +
|
| 10 | + 1("<div style='font-weight: bold'>Cliente</div><div style='font-size: 70%; margin-top: 0px'>[Software System]</div><div style='font-size: 80%; margin-top:10px'>Sistema que solicita o<br />pagamento.</div>") |
| 11 | + style 1 fill:#ffffff,stroke:#999999,color:#999999 |
| 12 | + 2["<div style='font-weight: bold'>Administradora</div><div style='font-size: 70%; margin-top: 0px'>[Person]</div><div style='font-size: 80%; margin-top:10px'>Acompanha as transações de<br />pagamento.</div>"] |
| 13 | + style 2 fill:#ffffff,stroke:#999999,color:#999999 |
| 14 | + 3["<div style='font-weight: bold'>Administradora da Gateway</div><div style='font-size: 70%; margin-top: 0px'>[Person]</div><div style='font-size: 80%; margin-top:10px'>Acompanha as métricas de<br />transações de pagamento.</div>"] |
| 15 | + style 3 fill:#ffffff,stroke:#ffa505,color:#ffa505 |
| 16 | +
|
| 17 | + subgraph 4 [Full Cycle Gateway] |
| 18 | + style 4 fill:#ffffff,stroke:#1168bd,color:#1168bd |
| 19 | +
|
| 20 | + 11[("<div style='font-weight: bold'>RequisicoesTransacoes</div><div style='font-size: 70%; margin-top: 0px'>[Container: MySQL schema]</div><div style='font-size: 80%; margin-top:10px'>Armazena as requisições de<br />transações de pagamento.</div>")] |
| 21 | + style 11 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 22 | + 13[("<div style='font-weight: bold'>Transacoes</div><div style='font-size: 70%; margin-top: 0px'>[Container: MySQL schema]</div><div style='font-size: 80%; margin-top:10px'>Armazena as transações de<br />pagamento.</div>")] |
| 23 | + style 13 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 24 | + 15("<div style='font-weight: bold'>Métricas de pagamento</div><div style='font-size: 70%; margin-top: 0px'>[Container: Prometheus]</div><div style='font-size: 80%; margin-top:10px'>Armazena métricas de<br />pagamento</div>") |
| 25 | + style 15 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 26 | + 17("<div style='font-weight: bold'>Dashboard de métricas</div><div style='font-size: 70%; margin-top: 0px'>[Container: Grafana]</div><div style='font-size: 80%; margin-top:10px'>Exibe métricas de pagamentos</div>") |
| 27 | + style 17 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 28 | + 21["<div style='font-weight: bold'>Painel de Controle</div><div style='font-size: 70%; margin-top: 0px'>[Container: Next.js]</div><div style='font-size: 80%; margin-top:10px'>Monitora as transações de<br />pagamento e seus status</div>"] |
| 29 | + style 21 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 30 | + 5("<div style='font-weight: bold'>Backend</div><div style='font-size: 70%; margin-top: 0px'>[Container: Nest.js]</div><div style='font-size: 80%; margin-top:10px'>Sistema que recebe a<br />solicitação de pagamento</div>") |
| 31 | + style 5 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 32 | + 8("<div style='font-weight: bold'>Processador de pagamentos</div><div style='font-size: 70%; margin-top: 0px'>[Container: Go]</div><div style='font-size: 80%; margin-top:10px'>Processa pagamento:<br />autorizando ou rejeitando</div>") |
| 33 | + style 8 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 34 | + end |
| 35 | +
|
| 36 | + 8-. "<div>Envia resultado da transação</div><div style='font-size: 70%'>[Através do Kafka pelo tópico transactions_result]</div>" .->5 |
| 37 | + 5-. "<div>Recebe dados do pagamento</div><div style='font-size: 70%'>[MySQL Protocol]</div>" .->11 |
| 38 | + 8-. "<div>Recebe dados do pagamento</div><div style='font-size: 70%'>[MySQL Protocol]</div>" .->13 |
| 39 | + 8-. "<div>Consume métricas de pagamento<br />em</div><div style='font-size: 70%'>[HTTP/TXT]</div>" .->15 |
| 40 | + 17-. "<div>Consume métricas de pagamento<br />em</div><div style='font-size: 70%'>[PromQL]</div>" .->15 |
| 41 | + 3-. "<div>Consume métricas de pagamento<br />em</div><div style='font-size: 70%'>[HTTPS]</div>" .->17 |
| 42 | + 2-. "<div>Solicita dados das transações<br />em</div><div style='font-size: 70%'>[HTTPS]</div>" .->21 |
| 43 | + 21-. "<div>Recupera informações de<br />pagamento</div><div style='font-size: 70%'>[HTTPS/JSON]</div>" .->5 |
| 44 | + 1-. "<div>Solicita pagamento em</div><div style='font-size: 70%'>[HTTP/JSON]</div>" .->5 |
| 45 | + 5-. "<div>Envia dados de pagamento para</div><div style='font-size: 70%'>[Através do Kafka pelo tópico transactions]</div>" .->8 |
| 46 | + end |
| 47 | +``` |
| 48 | + |
| 49 | +## ContextDiagram |
| 50 | + |
| 51 | +```mermaid |
| 52 | +graph TB |
| 53 | + linkStyle default fill:#ffffff |
| 54 | +
|
| 55 | + subgraph diagram ["Full Cycle Gateway - System Context"] |
| 56 | + style diagram fill:#ffffff,stroke:#ffffff |
| 57 | +
|
| 58 | + 1("<div style='font-weight: bold'>Cliente</div><div style='font-size: 70%; margin-top: 0px'>[Software System]</div><div style='font-size: 80%; margin-top:10px'>Sistema que solicita o<br />pagamento.</div>") |
| 59 | + style 1 fill:#ffffff,stroke:#999999,color:#999999 |
| 60 | + 2["<div style='font-weight: bold'>Administradora</div><div style='font-size: 70%; margin-top: 0px'>[Person]</div><div style='font-size: 80%; margin-top:10px'>Acompanha as transações de<br />pagamento.</div>"] |
| 61 | + style 2 fill:#ffffff,stroke:#999999,color:#999999 |
| 62 | + 3["<div style='font-weight: bold'>Administradora da Gateway</div><div style='font-size: 70%; margin-top: 0px'>[Person]</div><div style='font-size: 80%; margin-top:10px'>Acompanha as métricas de<br />transações de pagamento.</div>"] |
| 63 | + style 3 fill:#ffffff,stroke:#ffa505,color:#ffa505 |
| 64 | + 4("<div style='font-weight: bold'>Full Cycle Gateway</div><div style='font-size: 70%; margin-top: 0px'>[Software System]</div>") |
| 65 | + style 4 fill:#ffffff,stroke:#1168bd,color:#1168bd |
| 66 | +
|
| 67 | + 3-. "<div>Consume métricas de pagamento<br />em</div><div style='font-size: 70%'>[HTTPS]</div>" .->4 |
| 68 | + 2-. "<div>Solicita dados das transações<br />em</div><div style='font-size: 70%'>[HTTPS]</div>" .->4 |
| 69 | + 1-. "<div>Solicita pagamento em</div><div style='font-size: 70%'>[HTTP/JSON]</div>" .->4 |
| 70 | + end |
| 71 | +``` |
| 72 | + |
| 73 | +## LiveDeployment |
| 74 | + |
| 75 | +```mermaid |
| 76 | +graph LR |
| 77 | + linkStyle default fill:#ffffff |
| 78 | +
|
| 79 | + subgraph diagram ["Full Cycle Gateway - Deployment - Live"] |
| 80 | + style diagram fill:#ffffff,stroke:#ffffff |
| 81 | +
|
| 82 | + subgraph 25 [US-East-1] |
| 83 | + style 25 fill:#ffffff,stroke:#888888,color:#000000 |
| 84 | +
|
| 85 | + subgraph 26 [Autoscaling group frontend] |
| 86 | + style 26 fill:#ffffff,stroke:#da2e6e,color:#da2e6e |
| 87 | +
|
| 88 | + subgraph 27 [Amazon EC2] |
| 89 | + style 27 fill:#ffffff,stroke:#e5770d,color:#e5770d |
| 90 | +
|
| 91 | + 28["<div style='font-weight: bold'>Painel de Controle</div><div style='font-size: 70%; margin-top: 0px'>[Container: Next.js]</div><div style='font-size: 80%; margin-top:10px'>Monitora as transações de<br />pagamento e seus status</div>"] |
| 92 | + style 28 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 93 | + end |
| 94 | +
|
| 95 | + end |
| 96 | +
|
| 97 | + subgraph 29 [Autoscaling group backend] |
| 98 | + style 29 fill:#ffffff,stroke:#da2e6e,color:#da2e6e |
| 99 | +
|
| 100 | + subgraph 30 [Amazon EC2] |
| 101 | + style 30 fill:#ffffff,stroke:#e5770d,color:#e5770d |
| 102 | +
|
| 103 | + 31("<div style='font-weight: bold'>Backend</div><div style='font-size: 70%; margin-top: 0px'>[Container: Nest.js]</div><div style='font-size: 80%; margin-top:10px'>Sistema que recebe a<br />solicitação de pagamento</div>") |
| 104 | + style 31 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 105 | + end |
| 106 | +
|
| 107 | + end |
| 108 | +
|
| 109 | + subgraph 33 [Amazon EC2 - Processor] |
| 110 | + style 33 fill:#ffffff,stroke:#e5770d,color:#e5770d |
| 111 | +
|
| 112 | + 34("<div style='font-weight: bold'>Processador de pagamentos</div><div style='font-size: 70%; margin-top: 0px'>[Container: Go]</div><div style='font-size: 80%; margin-top:10px'>Processa pagamento:<br />autorizando ou rejeitando</div>") |
| 113 | + style 34 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 114 | + end |
| 115 | +
|
| 116 | + subgraph 37 [Managed Grafana] |
| 117 | + style 37 fill:#ffffff,stroke:#d72b6c,color:#d72b6c |
| 118 | +
|
| 119 | + 38("<div style='font-weight: bold'>Dashboard de métricas</div><div style='font-size: 70%; margin-top: 0px'>[Container: Grafana]</div><div style='font-size: 80%; margin-top:10px'>Exibe métricas de pagamentos</div>") |
| 120 | + style 38 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 121 | + end |
| 122 | +
|
| 123 | + subgraph 39 [Managed Prometheus] |
| 124 | + style 39 fill:#ffffff,stroke:#da2e6e,color:#da2e6e |
| 125 | +
|
| 126 | + 40("<div style='font-weight: bold'>Métricas de pagamento</div><div style='font-size: 70%; margin-top: 0px'>[Container: Prometheus]</div><div style='font-size: 80%; margin-top:10px'>Armazena métricas de<br />pagamento</div>") |
| 127 | + style 40 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 128 | + end |
| 129 | +
|
| 130 | + subgraph 43 [Amazon RDS backend] |
| 131 | + style 43 fill:#ffffff,stroke:#3f51d4,color:#3f51d4 |
| 132 | +
|
| 133 | + subgraph 44 [MySQL] |
| 134 | + style 44 fill:#ffffff,stroke:#888888,color:#000000 |
| 135 | +
|
| 136 | + 45[("<div style='font-weight: bold'>RequisicoesTransacoes</div><div style='font-size: 70%; margin-top: 0px'>[Container: MySQL schema]</div><div style='font-size: 80%; margin-top:10px'>Armazena as requisições de<br />transações de pagamento.</div>")] |
| 137 | + style 45 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 138 | + end |
| 139 | +
|
| 140 | + end |
| 141 | +
|
| 142 | + subgraph 47 [Amazon RDS processor] |
| 143 | + style 47 fill:#ffffff,stroke:#3f51d4,color:#3f51d4 |
| 144 | +
|
| 145 | + subgraph 48 [MySQL] |
| 146 | + style 48 fill:#ffffff,stroke:#888888,color:#000000 |
| 147 | +
|
| 148 | + 49[("<div style='font-weight: bold'>Transacoes</div><div style='font-size: 70%; margin-top: 0px'>[Container: MySQL schema]</div><div style='font-size: 80%; margin-top:10px'>Armazena as transações de<br />pagamento.</div>")] |
| 149 | + style 49 fill:#ffffff,stroke:#438dd5,color:#438dd5 |
| 150 | + end |
| 151 | +
|
| 152 | + end |
| 153 | +
|
| 154 | + end |
| 155 | +
|
| 156 | + 28-. "<div>Recupera informações de<br />pagamento</div><div style='font-size: 70%'>[HTTPS/JSON]</div>" .->31 |
| 157 | + 34-. "<div>Envia resultado da transação</div><div style='font-size: 70%'>[Através do Kafka pelo tópico transactions_result]</div>" .->31 |
| 158 | + 31-. "<div>Envia dados de pagamento para</div><div style='font-size: 70%'>[Através do Kafka pelo tópico transactions]</div>" .->34 |
| 159 | + 34-. "<div>Consume métricas de pagamento<br />em</div><div style='font-size: 70%'>[HTTP/TXT]</div>" .->40 |
| 160 | + 38-. "<div>Consume métricas de pagamento<br />em</div><div style='font-size: 70%'>[PromQL]</div>" .->40 |
| 161 | + 31-. "<div>Recebe dados do pagamento</div><div style='font-size: 70%'>[MySQL Protocol]</div>" .->45 |
| 162 | + 34-. "<div>Recebe dados do pagamento</div><div style='font-size: 70%'>[MySQL Protocol]</div>" .->49 |
| 163 | + end |
| 164 | +``` |
| 165 | + |
0 commit comments