# dineshchandika/dinesh-portfolio architecture

> Architecture diagram of the GitHub repository dineshchandika/dinesh-portfolio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dineshchandika/dinesh-portfolio
- Repository: https://github.com/dineshchandika/dinesh-portfolio

## Overview

##### Main components
- Source Code Repository: This includes the project files such as index.html and styles.css.
- Docker Component: Represented by the Dockerfile, which is used to build a container image that packages the static website.
- CI/CD Pipeline: Shown by the Jenkinsfile, indicating an automated build, test, and deployment process.
- User Interaction / Client: A user’s browser that requests the portfolio web page from the deployed container.

##### Relationships and interactions
- The source code is maintained in a version control system (implicitly assumed).
- Jenkins (via the Jenkinsfile) picks up code changes from the repository, triggers the Docker build process to create a container.
- The resulting container (built using the Dockerfile) is deployed to a server or hosting platform.
- Users access the deployed website through their browser which loads the HTML and CSS files.

##### Architectural patterns/design principles
- Separation of Concerns: The project clearly separates static content (frontend) from the build and deployment logic.
- Containerization: Utilization of Docker ensures the website runs consistently across different environments.
- Automated Deployment: Jenkins pipeline automates building, testing, and deploying of the application for consistent delivery.

##### Elements
- From “Source Code Repository” to “CI/CD Pipeline” to indicate code integration
- From “CI/CD Pipeline” to “Docker Build & Container” to show the build process
- From “Docker Build & Container” to “Deployed Web Server” to represent deployment
- From “Deployed Web Server” to “Client Browser” representing the retrieval of the website.

- Developer commits code (HTML, CSS) → Automated CI/CD (Jenkins using Jenkinsfile) → Docker container build (using Dockerfile) → Deployment to a hosting environment → End-user accesses the portfolio via a web browser.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Source Code Repository"
        A1["index.html"]:::source
        A2["styles.css"]:::source
    end

    B["CI/CD Pipeline (Jenkins)"]:::cicd
    C["Docker Build & Container"]:::docker
    D["Deployed Web Server / Hosting Platform"]:::server
    E["Client Browser"]:::client

    A1 -->|"commit"| B
    A2 -->|"commit"| B
    B -->|"triggers"| C
    C -->|"deploys"| D
    D -->|"serves"| E

    click A1 "https://github.com/dineshchandika/dinesh-portfolio/blob/main/index.html"
    click A2 "https://github.com/dineshchandika/dinesh-portfolio/blob/main/styles.css"
    click B "https://github.com/dineshchandika/dinesh-portfolio/tree/main/Jenkinsfile"
    click C "https://github.com/dineshchandika/dinesh-portfolio/tree/main/Dockerfile"

    classDef source fill:#ffcccc,stroke:#333,stroke-width:2px;
    classDef cicd fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef docker fill:#cce5ff,stroke:#333,stroke-width:2px;
    classDef server fill:#ffffcc,stroke:#333,stroke-width:2px;
    classDef client fill:#d9ccff,stroke:#333,stroke-width:2px;
```
