# kashishinamdar/githubactions architecture

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

- Interactive diagram: https://gitdiagram.com/kashishinamdar/githubactions
- Repository: https://github.com/kashishinamdar/githubactions

## Overview

This repository demonstrates a Node.js service deployed to AWS EC2 through a GitHub Actions workflow. The documented path runs from a developer push through SSH-based server deployment and Docker Compose to the running Express app. The app route is visible in `index.js`; workflow and container behavior are described in the README, but their implementation files were not sampled, so those relationships rely on the README rather than inspected workflow contents.

Main entry points: [`docker-compose.yml`](https://github.com/kashishinamdar/githubactions/blob/main/docker-compose.yml) (Docker Compose), [`.github/workflows`](https://github.com/kashishinamdar/githubactions/tree/main/.github/workflows) (GitHub Actions), [`index.js`](https://github.com/kashishinamdar/githubactions/blob/main/index.js) (Express Service), [`Dockerfile`](https://github.com/kashishinamdar/githubactions/blob/main/Dockerfile) (Docker Image)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["CI/CD Pipeline"]
  node_github["GitHub Repository"]
  node_actions["GitHub Actions<br/>[workflows]"]
  node_runner["GitHub Runner<br/>[workflows]"]
end

subgraph group_server["EC2 Deployment"]
  node_ec2["Ubuntu EC2"]
  node_pull["Code Pull<br/>[workflows]"]
  node_compose["Docker Compose<br/>[docker-compose.yml]"]
  node_docker["Docker Image"]
end

subgraph group_application["Node.js Application"]
  node_container["Node Container<br/>[docker-compose.yml]"]
  node_app["Express Service<br/>[index.js]"]
end

node_developer(("Developer"))
node_visitor(("App Visitor"))

node_developer -->|"pushes code"| node_github
node_github -->|"triggers workflow"| node_actions
node_actions -->|"runs workflow"| node_runner
node_runner -->|"connects by SSH"| node_ec2
node_ec2 -->|"pulls latest code"| node_github
node_ec2 -->|"runs rebuild"| node_compose
node_compose -->|"builds image"| node_docker
node_compose -->|"recreates container"| node_container
node_container -->|"runs service"| node_app
node_visitor -->|"requests route"| node_app

click node_actions "https://github.com/kashishinamdar/githubactions/tree/main/.github/workflows"
click node_runner "https://github.com/kashishinamdar/githubactions/tree/main/.github/workflows"
click node_pull "https://github.com/kashishinamdar/githubactions/tree/main/.github/workflows"
click node_compose "https://github.com/kashishinamdar/githubactions/blob/main/docker-compose.yml"
click node_docker "https://github.com/kashishinamdar/githubactions/blob/main/Dockerfile"
click node_container "https://github.com/kashishinamdar/githubactions/blob/main/docker-compose.yml"
click node_app "https://github.com/kashishinamdar/githubactions/blob/main/index.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_github,node_actions,node_runner toneBlue
class node_ec2,node_pull,node_compose,node_docker toneAmber
class node_container,node_app toneMint
class node_developer,node_visitor toneIndigo
```

## Components

### CI/CD Pipeline

- **GitHub Repository**
- [GitHub Actions](https://github.com/kashishinamdar/githubactions/tree/main/.github/workflows): `.github/workflows`
- [GitHub Runner](https://github.com/kashishinamdar/githubactions/tree/main/.github/workflows): `.github/workflows`

### EC2 Deployment

- **Ubuntu EC2**
- [Code Pull](https://github.com/kashishinamdar/githubactions/tree/main/.github/workflows): `.github/workflows`
- [Docker Compose](https://github.com/kashishinamdar/githubactions/blob/main/docker-compose.yml): `docker-compose.yml`
- [Docker Image](https://github.com/kashishinamdar/githubactions/blob/main/Dockerfile): `Dockerfile`

### Node.js Application

- [Node Container](https://github.com/kashishinamdar/githubactions/blob/main/docker-compose.yml): `docker-compose.yml`
- [Express Service](https://github.com/kashishinamdar/githubactions/blob/main/index.js): `index.js`

### Other components

- **Developer**
- **App Visitor**

## Connections

- Developer → GitHub Repository: pushes code (evidence: `README.md`)
- GitHub Repository → GitHub Actions: triggers workflow (evidence: `README.md`)
- GitHub Actions → GitHub Runner: runs workflow (evidence: `README.md`)
- GitHub Runner → Ubuntu EC2: connects by SSH (evidence: `README.md`)
- Ubuntu EC2 → GitHub Repository: pulls latest code (evidence: `README.md`)
- Ubuntu EC2 → Docker Compose: runs rebuild (evidence: `README.md`)
- Docker Compose → Docker Image: builds image (evidence: `README.md`)
- Docker Compose → Node Container: recreates container (evidence: `README.md`)
- Node Container → Express Service: runs service (evidence: `README.md`)
- App Visitor → Express Service: requests route (evidence: `index.js`)
