# manhumann/devops-capstone architecture

> Architecture diagram of the GitHub repository manhumann/devops-capstone, 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/manhumann/devops-capstone
- Repository: https://github.com/manhumann/devops-capstone

## Overview

This repository is an employee CRUD web application: users access an Express server, which routes requests to home or employee handlers; employee handlers render EJS pages and query PostgreSQL to list, create, edit, update, and delete employees. The browser script provides navigation to employee-add and employee-list pages. The excerpts establish routing, rendering, and database calls; the view templates and SQL initialization file are present in the tree but were not sampled, so their internal behavior is not detailed here.

Main entry points: [`CRUD-Nodejs-PostgreSQL/app.js`](https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/app.js) (Express server), [`CRUD-Nodejs-PostgreSQL/routes/employees.js`](https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/routes/employees.js) (Employee handlers), [`CRUD-Nodejs-PostgreSQL/public/js/main.js`](https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/public/js/main.js) (Browser navigation), [`CRUD-Nodejs-PostgreSQL/routes/index.js`](https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/routes/index.js) (Home handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_browser["Browser navigation<br/>[main.js]"]
  node_server["Express server<br/>[app.js]"]
  node_home["Home handler<br/>[index.js]"]
  node_employee["Employee handlers<br/>[employees.js]"]
  node_employee_views["Employee pages"]
  node_home_view["Home page<br/>[index.ejs]"]
  node_layout["Page layout"]
  node_styles["Page styling<br/>[main.css]"]
end

subgraph group_data["Employee data"]
  node_postgres[("PostgreSQL")]
  node_schema["Database initialization<br/>[init.sql]"]
end

node_user(("User"))

node_user -.->|"uses"| node_browser
node_browser -->|"navigates to"| node_server
node_server -->|"routes home"| node_home
node_server -->|"routes requests"| node_employee
node_home -->|"renders"| node_home_view
node_employee -->|"renders"| node_employee_views
node_employee -->|"queries"| node_postgres
node_server -->|"configures views"| node_layout
node_server -->|"serves static files"| node_styles

click node_browser "https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/public/js/main.js"
click node_server "https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/app.js"
click node_home "https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/routes/index.js"
click node_employee "https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/routes/employees.js"
click node_employee_views "https://github.com/manhumann/devops-capstone/tree/main/CRUD-Nodejs-PostgreSQL/views/employee"
click node_home_view "https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/views/index.ejs"
click node_layout "https://github.com/manhumann/devops-capstone/tree/main/CRUD-Nodejs-PostgreSQL/views/layouts"
click node_styles "https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/public/css/main.css"
click node_schema "https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/db/init.sql"

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_browser,node_server,node_home,node_employee,node_employee_views,node_home_view,node_layout,node_styles,node_user toneBlue
class node_postgres,node_schema toneAmber
```

## Components

### Web application

- [Browser navigation](https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/public/js/main.js): `CRUD-Nodejs-PostgreSQL/public/js/main.js`
- [Express server](https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/app.js): `CRUD-Nodejs-PostgreSQL/app.js`
- [Home handler](https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/routes/index.js): `CRUD-Nodejs-PostgreSQL/routes/index.js`
- [Employee handlers](https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/routes/employees.js): `CRUD-Nodejs-PostgreSQL/routes/employees.js`
- [Employee pages](https://github.com/manhumann/devops-capstone/tree/main/CRUD-Nodejs-PostgreSQL/views/employee): `CRUD-Nodejs-PostgreSQL/views/employee`
- [Home page](https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/views/index.ejs): `CRUD-Nodejs-PostgreSQL/views/index.ejs`
- [Page layout](https://github.com/manhumann/devops-capstone/tree/main/CRUD-Nodejs-PostgreSQL/views/layouts): `CRUD-Nodejs-PostgreSQL/views/layouts`
- [Page styling](https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/public/css/main.css): `CRUD-Nodejs-PostgreSQL/public/css/main.css`

### Employee data

- **PostgreSQL**
- [Database initialization](https://github.com/manhumann/devops-capstone/blob/main/CRUD-Nodejs-PostgreSQL/db/init.sql): `CRUD-Nodejs-PostgreSQL/db/init.sql`

### Other components

- **User**

## Connections

- User → Browser navigation: uses
- Browser navigation → Express server: navigates to (evidence: `CRUD-Nodejs-PostgreSQL/public/js/main.js`)
- Express server → Home handler: routes home (evidence: `CRUD-Nodejs-PostgreSQL/app.js`)
- Express server → Employee handlers: routes requests (evidence: `CRUD-Nodejs-PostgreSQL/app.js`)
- Home handler → Home page: renders (evidence: `CRUD-Nodejs-PostgreSQL/routes/index.js`)
- Employee handlers → Employee pages: renders (evidence: `CRUD-Nodejs-PostgreSQL/routes/employees.js`)
- Employee handlers → PostgreSQL: queries (evidence: `CRUD-Nodejs-PostgreSQL/routes/employees.js`)
- Express server → Page layout: configures views (evidence: `CRUD-Nodejs-PostgreSQL/app.js`)
- Express server → Page styling: serves static files (evidence: `CRUD-Nodejs-PostgreSQL/app.js`)
