# mdsksadi/multi-stack-devops-infrastructure-automation architecture

> Architecture diagram of the GitHub repository mdsksadi/multi-stack-devops-infrastructure-automation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mdsksadi/multi-stack-devops-infrastructure-automation
- Repository: https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation

## Overview

This is a multi-service voting application: voters submit choices through the Flask service, votes pass through Redis to a .NET worker and are persisted in Postgres, and the Node.js result service broadcasts counts to a live browser view. The graph separates vote intake, processing and storage, and result delivery. The README documents the end-to-end service flow; sampled source confirms the queue, database, and realtime interactions. The Socket.IO client is bundled in the repository and included as a browser runtime dependency.

Main entry points: [`result/server.js`](https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/result/server.js) (Result service), [`vote/app.py`](https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/vote/app.py) (Vote service), [`result/views/app.js`](https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/result/views/app.js) (Results client), [`worker/Program.cs`](https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/worker/Program.cs) (Vote worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Vote intake"]
  node_vote_app["Vote service<br/>[app.py]"]
  node_vote_page["Vote page<br/>[index.html]"]
end

subgraph group_processing["Vote processing"]
  node_redis["Vote queue"]
  node_worker["Vote worker<br/>[Program.cs]"]
  node_postgres[("Vote database")]
end

subgraph group_results["Live results"]
  node_result_server["Result service<br/>[server.js]"]
  node_result_page["Results page<br/>[index.html]"]
  node_result_app["Results client<br/>[app.js]"]
  node_socket_client["Socket.IO client<br/>[socket.io.js]"]
end

node_voter(("Voter"))

node_voter -->|"submits vote"| node_vote_app
node_vote_app -->|"renders"| node_vote_page
node_vote_app -->|"enqueues vote"| node_redis
node_redis -->|"provides votes"| node_worker
node_worker -->|"persists votes"| node_postgres
node_result_server -->|"queries counts"| node_postgres
node_result_server -->|"serves page"| node_result_page
node_result_app -->|"uses client"| node_socket_client
node_result_server -->|"broadcasts scores"| node_result_app
node_result_app -->|"updates display"| node_result_page

click node_vote_app "https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/vote/app.py"
click node_vote_page "https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/vote/templates/index.html"
click node_worker "https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/worker/Program.cs"
click node_result_server "https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/result/server.js"
click node_result_page "https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/result/views/index.html"
click node_result_app "https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/result/views/app.js"
click node_socket_client "https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/result/views/socket.io.js"

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_vote_app,node_vote_page toneBlue
class node_redis,node_worker,node_postgres toneAmber
class node_result_server,node_result_page,node_result_app,node_socket_client toneMint
class node_voter toneIndigo
```

## Components

### Vote intake

- [Vote service](https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/vote/app.py): `vote/app.py`
- [Vote page](https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/vote/templates/index.html): `vote/templates/index.html`

### Vote processing

- **Vote queue**
- [Vote worker](https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/worker/Program.cs): `worker/Program.cs`
- **Vote database**

### Live results

- [Result service](https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/result/server.js): `result/server.js`
- [Results page](https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/result/views/index.html): `result/views/index.html`
- [Results client](https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/result/views/app.js): `result/views/app.js`
- [Socket.IO client](https://github.com/mdsksadi/multi-stack-devops-infrastructure-automation/blob/main/result/views/socket.io.js): `result/views/socket.io.js`

### Other components

- **Voter**

## Connections

- Voter → Vote service: submits vote (evidence: `README.md`)
- Vote service → Vote page: renders (evidence: `vote/app.py`)
- Vote service → Vote queue: enqueues vote (evidence: `vote/app.py`)
- Vote queue → Vote worker: provides votes (evidence: `worker/Program.cs`)
- Vote worker → Vote database: persists votes (evidence: `worker/Program.cs`)
- Result service → Vote database: queries counts (evidence: `result/server.js`)
- Result service → Results page: serves page (evidence: `result/server.js`)
- Results client → Socket.IO client: uses client (evidence: `result/views/app.js`)
- Result service → Results client: broadcasts scores (evidence: `result/server.js`)
- Results client → Results page: updates display (evidence: `result/views/app.js`)
